master CI is red (ratchet baselines) + Windows-only Python tooling/test bugs
Summary
Two classes of problem, both verified on a Windows host with no Rust toolchain (so this covers only the Python/CI surface; no .rs touched):
1. master CI is currently RED (highest priority)
On a clean checkout of origin/master (ccf6153e), three ratchet checkers fail because merged growth outran their baselines:
check_code_size_budget.pycheck_test_size_budget.pycheck_swallowed_error_budget.py
.github/workflows/ci.yml runs all three as hard gates, so the Quality-Guardrails job fails on every push/PR. The fix is a baseline --update, the same remedy as prior commits e376f74a / 92498403.
2. Windows-only Python tooling/test bugs (invisible in Linux CI)
analyze_runtime_memory_log.pyreads logs withpath.read_text()(no encoding), so on Windows (cp1252) it crashes withUnicodeDecodeErroron any UTF-8 log containing multi-byte chars (emoji/curly quotes in session titles).reload_recovery_audit.pyreads durable recovery*.jsonand session transcripts with no encoding, insideexcept Exception: continue, so on Windows non-ASCII recovery records are silently dropped from the audit rather than crashing.test_openrelay_discovery_test.pylaunches its fixture server by executing a.pypath directly (shebang), which raisesWinError 193on Windows, making all 3 tests unrunnable.check_powershell_syntax.ps1only scannedscripts/, leaving.github/scripts/*.ps1(run by Windows CI) unguarded.
Fix
A branch with 6 low-risk commits (all under scripts/, 0 .rs) fixes each of the above, each with a regression test where applicable. Every non-compile CI gate verified green via a one-command reproducer. PR incoming.
Environment
Windows, cp1252 locale, no cargo/rustc (so Rust-gated jobs were not run; unaffected since no Rust source changed).
The ratchet baseline failures (code size, test size, swallowed-error budgets) are addressed in #550, which re-baselines all three with --update and verifies they pass on top of master.
The Windows-only Python issues are intentionally left out of that PR. We look forward to your Windows tooling PR for those.
— Jcode agent (automated triage), on behalf of @1jehuang
Master's Quality Guardrails job went red again after #550 merged: the code-size and test-size baselines drifted, so every open PR failed on inherited debt.
Re-baselined in #587 (code-size: anthropic-runtime lib.rs 2439→2444, inline_interactive.rs 4047→4063; test-size: remote_startup_input_02/part_01.rs 1834→1972). All ratchets plus the full CI matrix are green on that PR.
The Windows-only Python tooling items in this issue are still open.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Measured today against pristine master 04c7d2b0, all four ratchets this issue names are still red, and there is now a fifth gate ahead of them. Exact counts (script exit codes included):
| gate | result on 04c7d2b0 |
|---|---|
check_warning_budget.sh |
rc=1 current=2 baseline=0 |
check_code_size_budget.py |
rc=1 45 violations (tracked=119, threshold=1200 LOC) |
check_test_size_budget.py |
rc=1 10 violations |
check_panic_budget.py |
rc=1 2 violations (total 166 -> 167) |
check_swallowed_error_budget.py |
rc=1 32 violations (total 3667 -> 3730) |
check_dependency_boundaries.py |
rc=0 |
check_wildcard_reexport_budget.py |
rc=0 (total=17) |
Order inside scripts/check_guardrails.sh (Quality job) is: cargo check -> clippy -> Cargo.lock -> warning budget -> oversized-file -> oversized-test -> panic-prone -> swallowed-error -> dependency boundaries -> wildcard re-export -> onboarding invariants.
Three consequences worth recording here:
-
A three-ratchet refresh is not enough. #1701 refreshed code-size, test-size and panic baselines, and its Quality run (job
111391674358, base77f4f9d5) passed the warning budget (current=0), code-size, and panic, then failed on the fourth ratchet:Swallowed-error budget exceeded: - new swallowed-error-like usage: crates/jcode-tui/src/tui/app/commands_dispatch.rs (1) - swallowed-error-like usage grew: crates/jcode-tui/src/tui/app/helpers.rs (19 -> 30) ... Run scripts/check_swallowed_error_budget.py --update only after intentional cleanup.So
check_swallowed_error_budget.pyneeds to be in the same change for Quality to go green. -
The ratchets are currently masked by the fmt gate. On master's ubuntu Quality job (run
37901522973, job113724955675)cargo fmt --all -- --checkfails first (crates/jcode-provider-openai-runtime/src/lib.rs:966,crates/jcode-tui/src/tui/app/onboarding_flow_control.rs:633,874) and the job exits beforecheck_guardrails.shruns at all. Fixing fmt alone (as in #1740) will surface the warning budget and the four ratchets on the next run. -
The warning budget now fails before any ratchet: baseline is
0(scripts/warning_budget.txt) and master emits 2 warnings (unusedstd::path::PathBufimport, never-constructedSuggestionsvariant), platform-independent, so it is not a baseline refresh but a code fix. Platform scoping of that gate is tracked in #1177.
Recipe that reproduces a green chain from a current master base, each step verified locally against 04c7d2b0:
# 1. clear the two warnings (or --update if intentional; they are not)
bash scripts/check_warning_budget.sh
# 2. refresh every ratchet that is red, not just three
python3 scripts/check_code_size_budget.py --update
python3 scripts/check_test_size_budget.py --update
python3 scripts/check_panic_budget.py --update
python3 scripts/check_swallowed_error_budget.py --update
# 3. unblock the gate that hides all of the above
cargo fmt --all
#692 is the single-file case of the code-size ratchet (desktop2/transcript.rs). Happy to open a PR carrying exactly the recipe above if a baseline-refresh PR is wanted, but #1701 already exists, so I am not opening a competing one.