Report a partly compiling source as a warning when recovery still stands - #2407
Report a partly compiling source as a warning when recovery still stands#2407woksin wants to merge 3 commits into
Conversation
Any compilation error at all made SP0024 an error saying "nothing recovered from it describes the application reliably". That claim is false whenever recovery succeeded, and it usually did: a host handing over a compilation assembled without the compile items a build generates leaves every reference to a generated type unresolved, and the errors then sit in code declaring no artifact while every command, event and reactor is read exactly as written. One real application produced 607 such errors alongside a complete and accurate document, which the host then discarded on the error alone. The severity now follows how many artifacts were recovered from a declaration no compilation error sits inside. None - nothing recovered at all, or every declaration something came out of being one the compiler could not make sense of - stays an error, because no part of that document can be trusted. Any at all is a warning stating how many errors there were, how many artifacts came through anyway and what usually causes it, so the result is successful and the document is kept. A count is used rather than a proportion because any threshold would make the same recovery pass for a large application and fail for a small one. Zero is the only number that means recovery was prevented rather than dented. Suppressing "declares nothing" is unchanged and, in the warning branch, can never apply - a warning is only reached when something was recovered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
SP0024 suppressed the document check on the code alone, which was right while it was always an error: a model recovered from symbols the compiler never accepted describes an application that does not exist, so a document made from it being poor is the broken build rather than a second defect. Now that it can be a warning, that reasoning inverts. A warning says what was recovered stands, and a document built from a model that stands is exactly what the check exists for. Suppressing it there would hand back a document the language rejects with nothing wrong reported and a successful result, which is the one outcome the check was added to make impossible. The suppression therefore follows the severity rather than the code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The generator takes a Compilation and nothing else, so assembling one the way a real build would is the caller's job - and nothing said so. The part hosts get wrong is source generators: no workspace loading mode runs them, and an Arc application leans on generation heavily enough that a compilation loaded without them is missing every type they emit. Documents the contract, how to run the generators before handing the compilation over, and what the generator does when a host does not - which is now two different things depending on how much survived. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Reviewer context — deliberately kept out of the description. This is agent-authored code that no human has read yet. Green CI is not sign-off. Do not merge without explicit review. Stacked on #2406 — this targets The rule. A threshold ("near-zero", or a proportion) was deliberately rejected: the same recovery would pass for a large application and fail for a small one, and no cut-off is defensible. Zero is the only count that means recovery was prevented rather than dented. "Inside a declaration" is measured against every The suppression change is the part worth reviewing hardest.
A live demonstration of the issue, found by accident. While verifying, the end-to-end gate reported Verification
One imprecision, left deliberately. The Warning's "N artifacts recovered" counts what the readers read. Where two queries in a slice collide irreconcilably, one is dropped and reported separately as |
|
Superseded by #2408, which now targets The SP0024 calibration and its narrowing of the SP0034 suppression are both described in the consolidated reviewer comment on #2408. |
Changed