Repository navigation
Delete seven imports the scan producer and its witness never used - #11925
Conversation
These predate #11656 and were deliberately left out of it, to avoid widening a head-pinned repair. The population is exactly the seven named in docs/plans/review-sheet-and-census-lane-handoff.md: CodeSearchPage, code_search_hits_read, GithubObservationRequest and ObservationBudgetStanding in gunbc.ci_workflow_scan_producer, and CodeSearchPageComplete, CodeSearchPageTruncated and ObservationCompleteness in its witness. Each was verified unused by counting occurrences in the module body with the import blocks stripped, rather than by a whole-file grep that would have counted the import itself. Three of the names removed from the witness ARE used in the producer, and the producer's four ARE used in the witness -- so a file-blind grep would have cleared none of them, and a name-blind one would have deleted names in use. No import block is emptied; an empty import list silently changes emission. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
LAND / SOURCE APPROVE — exact head d14114d1d5b27acf88c388cea8420bc00ff6e39f.
GitHub will not let this connected account formally approve its own PR, so this COMMENT is the explicit source sign-off.
The diff is exactly the promised cleanup: four unused imports removed from gunbc.ci_workflow_scan_producer and three from its witness, with no logic, claim, type, annotation, or generated-surface change beyond the corresponding narrowed re-exports.
The per-file occurrence census and emitted differential are the right evidence for this change. The PR also correctly avoids overclaiming a red control that the current interpreter/emitter cannot discriminate.
Exact-head required checks are green. No blocking source finding. Freeze this SHA and land it.
Seven imports across
gunbc.ci_workflow_scan_producerand its witness were never used. They predate #11656 and were deliberately left out of it to avoid widening a head-pinned repair;docs/plans/review-sheet-and-census-lane-handoff.mdcarried them as the lane's one small unblocked item. This is that item.The population
Exactly the seven the handoff names, and the split matters:
gunbc.ci_workflow_scan_producerCodeSearchPage,code_search_hits_read,GithubObservationRequest,ObservationBudgetStandingCodeSearchPageComplete,CodeSearchPageTruncated,ObservationCompletenessThree of the names removed from the witness are used in the producer, and the producer's four are used in the witness. So a file-blind grep would have cleared none of them and a name-blind one would have deleted names in use. Each was counted per-file, in the module body with the import blocks stripped, rather than by a whole-file grep that would have counted the import itself. No import block is emptied — an empty import list silently changes emission.
The census was then re-run at variant grain, because the emitter re-exports a coproduct's arms through a glob: removing
ObservationBudgetStandingdropsuse …::ObservationBudgetStanding::*, so a bareBudgetUnobservableorBudgetObservedin the body would have broken emission while the type-name count read zero. Both are zero, as are the arms behind the witness's two.What executes
gunbc compileover the witness closure, base vs head, emits exactly and only the intended removals — two re-export lines narrowed, one variant glob dropped in the producer, one variant use-list narrowed in the witness. Nothing else in the 82 emitted files differs.The emitted crate does not build at either revision — 28 distinct pre-existing errors from emitter gaps unrelated to this change (
UInt/MachineWidth/Networkunresolved,awaitoutsideasync). So the usable form of that check is differential, and it is clean:cargo checkover the emitted crate yields identical error sets at base and at head. That establishes this change introduces nothing; it does not establish that the closure emits correctly, and is not offered as that.One thing this PR does not claim
I could not build a control that flips. Deleting a genuinely used import —
CodeSearchPageReadfrom the witness — changes neither the interpreter's verdict (the witness still evaluatestrue) nor the emitted bytes, because the emitter recovers the type through its separately imported arms. So at this grain neithergunbc runnorgunbc compile's blocking diagnostics discriminate an import deletion, and the grounding for this change is the occurrence census plus the emission differential, not a red that went green. Whether a genuinely load-bearing import can be deleted silently is a further question this probe does not answer, and I am not asserting it as a failure class on this evidence.🤖 Generated with Claude Code