fix(kerykeion): drop the redundant Instrument import from collector_tests - #471
Merged
Merged
Conversation
…ests
`collector.rs` declares `collector_tests.rs` as a child module via
`#[cfg(test)] #[path = "collector_tests.rs"] mod tests;`, and the test file opens
with `use super::*;`. That glob already re-exposes the parent's private
`use tracing::{Instrument as _, instrument};`, so the file's own
`use tracing::Instrument as _;` binds a name that is in scope either way.
Under `RUSTFLAGS: -D warnings` the gate's `cargo check --workspace --all-targets`
rejects it as `unused_imports`, failing `full-gate-build` and, downstream,
`gate / gate`.
The two `.instrument()` call sites keep resolving through `use super::*;`, and
`collector.rs` keeps its own import — it uses both the trait and the
`#[instrument(...)]` attribute directly.
WARNING for whoever sees this recur: the same command over these byte-identical
files passed on a main-push run 15 hours earlier under the same pinned toolchain.
The import is unconditionally redundant, but its DETECTION is not deterministic —
`Swatinem/rust-cache` shares one key across the push and pull_request triggers, so
an incremental cache hit can skip re-linting this unit. A green run is therefore
not evidence the lint is absent.Uh oh!
There was an error while loading. Please reload this page.
forkwright added a commit
that referenced
this pull request
Aug 26, 2026
## Finding Release PRs here arrive with their required contexts **absent rather than red**, because release-please creates them with `GITHUB_TOKEN` and GitHub raises no workflow-triggering events for that token. Branch protection holds a PR with a missing context forever. ## Evidence #465 (`chore(main): release 0.6.2`) sat **8 days** at `mergeStateStatus: BLOCKED` with an **empty** `statusCheckRollup` while five workflow runs waited at `action_required`. `gh api repos/forkwright/akroasis/actions/runs?status=action_required` currently returns **51** held runs. ## Why this matters A missing check is worse than a failing one — a red check advertises itself; an absent one looks exactly like a PR still waiting on CI. Releases stop, and nothing surfaces the cause. ## Desired correction Adopt the reusable healer merged as `forkwright/.github#56`. This file asks for it and declares nothing about how it works, so it cannot drift from the other 17 repos that will carry it. **Done when:** a subsequent release PR here reaches a non-empty `statusCheckRollup` without a human approving runs by hand. ## The permissions block is load-bearing It is not the usual boilerplate. For `workflow_call`, the caller's `permissions` is a **cap** — a called workflow can only *downgrade* the token, never upgrade it. A caller declaring the customary `contents: read` alone would leave the healer unable to approve a single run, and the only symptom would be a release that stayed stuck. `actions: write` approves the held runs; `pull-requests: read` finds the release PR and its head SHA. Nothing here writes to a PR. ## Note This is the first adopter, deliberately — akroasis is the only repo with an open stuck release PR right now, so it is where the end-to-end path can actually be observed rather than assumed. The remaining 17 follow once a run here is read. Independent of this, #465 is also blocked by a real compile failure that #471 fixes; the two are unrelated causes on the same PR. Co-authored-by: forkwright <cody@forkwright.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finding
gate / full-gate-buildfails onmain, which blocks release PR #465 (chore(main): release 0.6.2, open 8 days).gate / gatereports failure too, but it is a downstream reporter of thesame result — one cause, not two.
Evidence
gate / full-gate-buildstepcheck, verbatim:gate / gate(job 98205969995) then reports:This is not the release commit's doing.
gh pr diff 465touches only.release-please-manifest.json,CHANGELOG.md,Cargo.lock,Cargo.toml.crates/kerykeion/src/collector_tests.rsis byte-identical betweenorigin/mainand the releasehead, so the fix belongs here on
main.Why this matters
collector.rs:688-690declares the test file as a child module:collector.rs:15already carriesuse tracing::{Instrument as _, instrument};, andcollector_tests.rs:6opens withuse super::*;. A non-pubitem is visible to its definingmodule and its descendants, so that glob already brings
Instrumentinto scope — the file's ownline 4 binds a name it would have either way.
Desired correction
Delete line 4 and its trailing blank. The two
.instrument()call sites (lines 258, 332) keepresolving through
use super::*;, andcollector.rskeeps its own import — it uses both the traitand the
#[instrument(...)]attribute macro directly.Done when:
full-gate-buildpasses onmainand #465'sgate / gategoes green.WARNING — the detection is non-deterministic, the defect is not
The same
checkcommand over these byte-identical files passed on a main-push run 15 hoursearlier (run 32907547269, job 97994832002, same pinned toolchain
1.97.1) and failed here.Swatinem/rust-cacheshares one key (gate-attestation) across thepushandpull_requesttriggers, so an incremental cache hit can let rustc skip re-linting this compilation unit.
The import is unconditionally redundant and removing it is correct regardless of cache state — but
treat a green run on this workspace as not evidence that a
-D warningslint is absent. Thatshared cache key is worth a separate look.