CI: desktop-runner workspace pollution inflates lint and pyright ratchets (47→144 / 121→225) #2552

Open
opened 2026-10-22 13:33:00 +01:00 by conductor · 2 comments
Owner

In plain English:

In plain English

Every PR CI run on the desktop runner fails the two ratchet jobs although the scanned tree has zero Python changes. Silent-handler ratchet (BLE001 47→144, S110 31→203 max) and pyright ratchet (errors 121→225, warnings 450→573) roughly tripled — census-shaped pollution: the checker is scanning venv/cache dirs inside the runner workspace. Reproduces on unrelated branches; master (ba63d15a) carries the red set at 12:0x.

Evidence (2026-10-22, runs 33004/33038, jobs 91714/91721)

  • lint 91714: Silent-handler count increased BLE001: 47 -> 144 (max 47); S110: 31 -> 203 (max 31) — scripts/lint_ratchet.py
  • type-check 91721: Type errors increased: 121 -> 225 (max 121); warnings 450 -> 573
  • Attribution proof: fix/2535-pane-scrollback (Go+docs only, zero .py) fails identically; local ratchet/pyright/pytest for the same commit are green

What would let us close this

  • ratchet scripts produce identical counts on runner and locally for one pinned commit (run twice, compare)
  • ratchet jobs green on clean rerun without manual baseline bumping
  • root cause documented: which directories the census picked up and why

What is this about:

Why do we need it: <the itch — what happens today that shouldn't, or what becomes possible>

Why is it still open: <"not started yet" | "part done, X remains" | "deliberately parked as a future idea">

Example

What would let us close this

  • <condition 1 — observable>
  • <condition 2>

Version impact (declared at submission — verified at merge)

  • major — breaking: changes a contract, schema, or interface others depend on
  • minor — new capability: something becomes possible that wasn't
  • patch — repair: same behaviour, done correctly
  • none — touches no released artifact (docs, memory, process notes)

Technical details

WHAT:
WHY:
FILES:
ACCEPTANCE:
DEPENDENCIES:

Pipeline requirements

  • TDD: frozen tests written first, red → green (N passed)
  • ruff check and ruff format --check clean
  • Spec-compliance review gate: PASS
  • Code-quality review gate: Approved
  • Full orchestration suite regression green (suite total)
  • Canary passes (name)
  • Closed with a properly formatted closing comment + commit/PR references

Cognitive invariants (memory/cognition issues — both handoffs)

  • Owner — which existing subsystem owns this (audit before creating modules)
  • Trigger — what event activates it
  • Read/write authority — which canonical state it reads/changes
  • Provenance — derived state traceable to evidence
  • Verification — how we know the change helped
  • Failure visibility — how failure surfaces
  • Reversibility — bad learned state can be superseded/replayed/rolled back
  • Dormant cost — what it costs when irrelevant
  • Benchmark + ablation — what measurable behaviour improves; what happens when disabled
  • No duplicate authority — why extend vs create

Hard invariants: derived cognition preserves evidentiary ancestry · epistemic confidence ≠ attentional utility ≠ current applicability · retrieval never increases utility · self-model-induced behaviour is not independent evidence · historical truth survives present-state change · raw evidence is never destroyed by promotion.

Related umbrella

  • Memory
  • Governance
  • Identity
  • Growth
  • Perception
  • Infrastructure
  • Life (Nick's)
  • Custodian
  • Orchestration

Priority (REQUIRED — the priority gate)

  • P0 — critical — breaks the spine / core correctness, or blocks other work
  • P1 — high — material user value or a real defect (money, correctness bugs, next-stage dependency)
  • P2 — medium — quality/consolidation improvement (check the fold-into mapping first)
  • P3 — low — measurement / benchmark / deferred policy
## In plain English: <restate the issue title here in everyday words> <!-- The heading ITSELF must carry the summary — a scan of issue headings alone should tell the whole story of the board. TOP PRIORITY: if a technical detail below contradicts this section, the issue is buggy — fix the issue. A non-technical reader must be able to retell this section. 3-6 sentences, no jargon. --> ## In plain English Every PR CI run on the desktop runner fails the two ratchet jobs although the scanned tree has zero Python changes. Silent-handler ratchet (BLE001 47→144, S110 31→203 max) and pyright ratchet (errors 121→225, warnings 450→573) roughly tripled — census-shaped pollution: the checker is scanning venv/cache dirs inside the runner workspace. Reproduces on unrelated branches; master (ba63d15a) carries the red set at 12:0x. ## Evidence (2026-10-22, runs 33004/33038, jobs 91714/91721) - lint 91714: Silent-handler count increased BLE001: 47 -> 144 (max 47); S110: 31 -> 203 (max 31) — scripts/lint_ratchet.py - type-check 91721: Type errors increased: 121 -> 225 (max 121); warnings 450 -> 573 - Attribution proof: fix/2535-pane-scrollback (Go+docs only, zero .py) fails identically; local ratchet/pyright/pytest for the same commit are green ## What would let us close this - [ ] ratchet scripts produce identical counts on runner and locally for one pinned commit (run twice, compare) - [ ] ratchet jobs green on clean rerun without manual baseline bumping - [ ] root cause documented: which directories the census picked up and why What is this about: <what> Why do we need it: <the itch — what happens today that shouldn't, or what becomes possible> Why is it still open: <"not started yet" | "part done, X remains" | "deliberately parked as a future idea"> ## Example <!-- A concrete before/after in plain terms: "If X happens, the system will Y instead of Z." --> ## What would let us close this <!-- Checkable statements, verifiable by looking at something that EXISTS — a file, a log line, a passing test. Not "when appropriate". --> - [ ] <condition 1 — observable> - [ ] <condition 2> ## Version impact (declared at submission — verified at merge) <!-- The pipeline derives the real bump from merged conventional commits and compares against this declaration. A mismatch is flagged, not fatal: either the declaration was wrong or the work grew. Both facts matter. --> - [ ] major — breaking: changes a contract, schema, or interface others depend on - [ ] minor — new capability: something becomes possible that wasn't - [ ] patch — repair: same behaviour, done correctly - [ ] none — touches no released artifact (docs, memory, process notes) ## Technical details <!-- WHAT — one-line objective. WHY — design-spec reference (S#) or reason. FILES — affected components. ACCEPTANCE — frozen-test file + test count + canary name. DEPENDENCIES — parent epic + preceding stage/plan refs. --> **WHAT:** **WHY:** **FILES:** **ACCEPTANCE:** **DEPENDENCIES:** ## Pipeline requirements <!-- Every stage must clear these before the issue closes. --> - [ ] TDD: frozen tests written first, red → green (N passed) - [ ] `ruff check` and `ruff format --check` clean - [ ] Spec-compliance review gate: PASS - [ ] Code-quality review gate: Approved - [ ] Full orchestration suite regression green (suite total) - [ ] Canary passes (name) - [ ] Closed with a properly formatted closing comment + commit/PR references ## Cognitive invariants (memory/cognition issues — both handoffs) <!-- Complete ONLY if this issue touches memory, learning, or self-model state. --> - [ ] **Owner** — which existing subsystem owns this (audit before creating modules) - [ ] **Trigger** — what event activates it - [ ] **Read/write authority** — which canonical state it reads/changes - [ ] **Provenance** — derived state traceable to evidence - [ ] **Verification** — how we know the change helped - [ ] **Failure visibility** — how failure surfaces - [ ] **Reversibility** — bad learned state can be superseded/replayed/rolled back - [ ] **Dormant cost** — what it costs when irrelevant - [ ] **Benchmark + ablation** — what measurable behaviour improves; what happens when disabled - [ ] **No duplicate authority** — why extend vs create Hard invariants: derived cognition preserves evidentiary ancestry · epistemic confidence ≠ attentional utility ≠ current applicability · retrieval never increases utility · self-model-induced behaviour is not independent evidence · historical truth survives present-state change · raw evidence is never destroyed by promotion. ## Related umbrella - [ ] Memory - [ ] Governance - [ ] Identity - [ ] Growth - [ ] Perception - [ ] Infrastructure - [ ] Life (Nick's) - [ ] Custodian - [ ] Orchestration ## Priority (REQUIRED — the priority gate) <!-- Pick exactly one. An issue without a priority is not filed. --> - [ ] **P0 — critical** — breaks the spine / core correctness, or blocks other work - [ ] **P1 — high** — material user value or a real defect (money, correctness bugs, next-stage dependency) - [ ] **P2 — medium** — quality/consolidation improvement (check the fold-into mapping first) - [ ] **P3 — low** — measurement / benchmark / deferred policy
conductor added the infrastructurefeatureP1 — high labels 2026-10-22 13:33:00 +01:00
Author
Owner

In flight on branch fix/2552-runner-pollution. Plan: reproduce the census pollution locally by simulating a runner workspace, identify which directories the ratchet/pyright scanners pick up that they shouldn't, scope the scanners to the repo tree, and document the root cause. TDD: red test proving pollution changes counts, green after scoping.

In flight on branch `fix/2552-runner-pollution`. Plan: reproduce the census pollution locally by simulating a runner workspace, identify which directories the ratchet/pyright scanners pick up that they shouldn't, scope the scanners to the repo tree, and document the root cause. TDD: red test proving pollution changes counts, green after scoping.
Author
Owner

Correction to the earlier premise: runner workspace pollution is not the cause. On a clean local worktree at gitea/master 79ff61b3, python3 scripts/lint_ratchet.py reproduces BLE001 145 vs baseline 47 and S110 203 vs baseline 31, matching CI's approximately 144/203 counts. The raw inventory is 348 targeted rule hits at 284 unique handlers across 77 files. The ratchet is honest; the silent handlers are real.

Triage is in PR #2629: http://127.0.0.1:3000/conductor/rune/pulls/2629

  • 111 non-migration handlers fixed with stack-capturing exc_info while preserving existing fallback/result behavior.
  • 173 intentional #2479 native-migration fallbacks documented site by site with the retained Python authority and retirement-map reference; no Python authority deleted.
  • Warm-router loader/native/history failures now fail loud instead of impersonating cold start with -2.0; three red-first regressions cover this.
  • Ratchet now passes at 0/0, with the baseline re-recorded shrink-only to 0/0.
  • Native-backed affected run: 1,466 passed, 12 skipped, 34 subtests passed, with two independently documented pre-existing checks deselected. Changed-file Ruff/syntax and henxels are green; full details and residual pre-existing failures are in the PR body.
Correction to the earlier premise: **runner workspace pollution is not the cause**. On a clean local worktree at `gitea/master` `79ff61b3`, `python3 scripts/lint_ratchet.py` reproduces **BLE001 145 vs baseline 47** and **S110 203 vs baseline 31**, matching CI's approximately 144/203 counts. The raw inventory is 348 targeted rule hits at 284 unique handlers across 77 files. The ratchet is honest; the silent handlers are real. Triage is in PR #2629: http://127.0.0.1:3000/conductor/rune/pulls/2629 - 111 non-migration handlers fixed with stack-capturing `exc_info` while preserving existing fallback/result behavior. - 173 intentional #2479 native-migration fallbacks documented site by site with the retained Python authority and retirement-map reference; no Python authority deleted. - Warm-router loader/native/history failures now fail loud instead of impersonating cold start with `-2.0`; three red-first regressions cover this. - Ratchet now passes at **0/0**, with the baseline re-recorded shrink-only to **0/0**. - Native-backed affected run: **1,466 passed, 12 skipped, 34 subtests passed**, with two independently documented pre-existing checks deselected. Changed-file Ruff/syntax and henxels are green; full details and residual pre-existing failures are in the PR body.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conductor/rune#2552