GeezerVison is showing github.com — ci(production-line-guard): the guard counts Cargo target/ build output as production code — every built tree fails on generated files · Issue #6960 · developing-today/code
ci(production-line-guard): the guard counts Cargo target/ build output as production code — every built tree fails on generated files #6960DescriptionProblem
check-production-line-limit.sh enumerates production sources with find and never excludes build output, so in any tree that has been built it counts Cargo's generated .rs files under target/ as production code and fails on them. CI never sees this (a fresh checkout has no target/ — **/target is gitignored, .gitignore:33), but every local/worktree verification run does — which is precisely how the grandfather splits (#4704/#4715/#4716/#4717) and any fix to this guard would be verified.
Evidence (verified 2026-11-07 on laptop primary @ e238c85)
.github/scripts/check-production-line-limit.sh (enumeration at the bottom of the script): find "$ROOT/$base" -name "*.rs" -type f over pkgs and apps, with only two exclusions — paths under a tests/ directory and files named tests.rs. No target/ (or any build-directory) exclusion.
- Fixture probe (laptop,
~/git/fleet/probe-line-guard-target): a tree with one 10-line pkgs/demo/src/lib.rs plus one 2,600-line pkgs/demo/target/debug/build/gen-abc/out/generated.rs → guard reports ::error::OVER LIMIT pkgs/demo/target/.../generated.rs: 2600 production lines, "checked 2 production .rs files", exit 1. Control with target/ removed → "checked 1 production .rs file", OK, exit 0.
- Real tree: running the guard in the laptop primary (which has build output) produced dozens of
OVER LIMIT errors, all under pkgs/id/target/debug/build/cranelift-codegen-*/out/*.rs (generated ISLE code, up to 45,726 "production lines") plus libsqlite3-sys-*/out/bindgen.rs — exit 1 for reasons unrelated to the source tree. The same guard on a clean git archive export gives the true verdict (524 files; one real over-limit file, pkgs/id/src/directory.rs).
- The contract suite
check-production-line-limit.test.sh passes and has no fixture with a target/ directory, so this case is untested.
Why it matters
A guard that cries wolf on every built tree trains everyone to ignore or bypass it locally: a worker splitting a grandfathered module cannot get a trustworthy local verdict, and the failure output buries the real over-limit files among pages of generated-code noise. The fix must not weaken CI: excluding gitignored build output keeps the CI verdict identical (CI has no target/), it only makes local runs mean the same thing.
Acceptance criteria
- The enumeration skips
target/ directories (at any depth under the scanned roots, matching the repo's **/target ignore) — and the skipped set is named in the script header alongside the existing tests/ exclusions.
- A contract-test fixture with an over-limit
.rs file under a target/ directory passes the guard, while an over-limit file in normal source still fails it (both directions pinned in check-production-line-limit.test.sh).
- Guard verdict on the laptop primary's built tree matches the clean-export verdict for real sources (generated files no longer reported).
Related: #1411 (guard origin). Filed alongside the production-line guard's missing-triggers issue from the same run. Activitydeveloping-today commented on Nov 7, 2026 dezren39 commented on Nov 7, 2026 🤖 Agent note · state: filed
- Agent: new-issue-creator-code-a
- Session / ID: cron new-issue-creator-code-a, run 2026-11-07 15:35 CST
- Found via: filed this run
- Task: Filed after verifying on the laptop primary @ e238c85: the guard's find enumeration excludes only tests/ dirs and tests.rs, never target/. Fixture probe (~/git/fleet/probe-line-guard-target): a 2,600-line generated.rs under target/debug/build/ fails the guard (checked 2, exit 1); control without target/ passes (checked 1, exit 0). Real built tree: dozens of OVER LIMIT errors, all under pkgs/id/target/debug/build/** (gitignored, .gitignore:33). Sibling finding: issue ci(production-line-guard): the F11.10 line guard never runs — dispatch-only since the Nov 4 sweep, and main already fails it (directory.rs 2,610 lines, ungrandfathered) #6959 (same guard never runs).
- Expectation: effort s — exclude target/ from the enumeration plus a both-directions contract fixture; done when a built tree and a clean export give the same verdict for real sources.
- Links: queue packet enqueued this run (repo-health-code-pilot)
dezren39 commented on Nov 9, 2026 agent-note:v1
task 11350 — picked up by lane code-p (shift 2026-11-09 16:57 CST), revalidated: issue #6960 OPEN, no hard-stop labels (held/user/owned/do-not-merge/do-not-auto-edit absent). Execution lane: opencode (assignment row 3654). Handing off to the opencode claimant; parking task 11350 for claimant launch. dezren39 commented on Nov 11, 2026 🤖 Agent note · done (fixed_merged)
Implemented direct (lane assignment returned direct). PR #8699 MERGED 2026-11-11T14:11:34Z (merge commit 5010cef); issue #6960 CLOSED by the merge. The production-line guard's find enumeration now prunes target/ directories at any depth and the header documents the exclusion; two new contract fixtures pin both directions (over-limit under target/ passes and is not counted; over-limit source in the same tree still fails, generated file never reported). Full contract suite passed on the laptop against the PR head; git diff --check clean.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|