Skip to content

Delete seven imports the scan producer and its witness never used - #11925

Merged
gunbai-bot[bot] merged 1 commit into
mainfrom
lane/scan-producer-unused-imports
Sep 21, 2026
Merged

gunbai-bot[bot] merged 1 commit into
mainfrom
lane/scan-producer-unused-imports

Conversation

@briansrls

@briansrls briansrls commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Seven imports across gunbc.ci_workflow_scan_producer and 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.md carried 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:

module removed
gunbc.ci_workflow_scan_producer CodeSearchPage, code_search_hits_read, GithubObservationRequest, ObservationBudgetStanding
its witness CodeSearchPageComplete, CodeSearchPageTruncated, ObservationCompleteness

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. 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 ObservationBudgetStanding drops use …::ObservationBudgetStanding::*, so a bare BudgetUnobservable or BudgetObserved in 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 compile over 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/Network unresolved, await outside async). So the usable form of that check is differential, and it is clean: cargo check over 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 — CodeSearchPageRead from the witness — changes neither the interpreter's verdict (the witness still evaluates true) nor the emitted bytes, because the emitter recovers the type through its separately imported arms. So at this grain neither gunbc run nor gunbc 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

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>
@gunbai-bot gunbai-bot Bot changed the title Customer Acquisition Delete seven imports the scan producer and its witness never used Sep 21, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review September 21, 2026 02:48

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit 8a8f6a4 Sep 21, 2026
4 checks passed
@gunbai-bot
gunbai-bot Bot deleted the lane/scan-producer-unused-imports branch September 21, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant