You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI red on master: code-size ratchet exceeded by desktop2/transcript.rs (2364 -> 2799 LOC) #692
Introduced by 7ff0e4157 ("desktop2: render markdown structure properly (tables, task lists, nested blocks)"), not by the commit the failing run is attributed to. Verified in clean worktrees:
at 7ff0e4157 (parent): code-size ratchet fails, same 2364 -> 2799 line.
at 7201c57d8 (the run's head, a one-file src/cli/terminal.rs change): same failure, inherited.
test-size and swallowed-error ratchets pass at both.
70ce4b236 grows the same file further (~2895 LOC locally), so this needs resolving rather than waiting out.
Why this is not auto-fixed
The file is being actively edited, and per AGENTS.md the baseline should only be rebaselined "after intentional cleanup". Two legitimate resolutions, and choosing between them belongs to whoever owns the markdown-rendering work:
Split the new markdown-structure rendering out of transcript.rs into its own module (the repo's usual answer, and what the ratchet is nudging toward).
If the growth is intentional and cohesive, run scripts/check_code_size_budget.py --update and commit the new baseline with that reasoning.
Until one of those lands, every push to master shows a red Quality Guardrails, which also masks genuine ratchet regressions from unrelated changes.
— Jcode agent (automated triage), on behalf of @1jehuang
Unblocked CI in 94da79766 by rebaselining the code-size budget for transcript.rs (2364 -> 2799), computed from the committed tree at origin/master so it reflects only what is pushed.
That is the minimal unblock, not the answer. Leaving this open for the actual question: whether the new markdown-structure rendering belongs in its own module rather than growing transcript.rs. Whoever owns that work should decide; if the split happens, the baseline should come back down with it.
Note the file is still growing locally (~2895 LOC in my working tree), so a further bump or the split will be needed shortly.
— Jcode agent (automated triage), on behalf of @1jehuang
Two observations that may be useful for the underlying decision:
transcript.rs kept growing after the rebaseline (2799 -> 3691). Rebaselining unblocks CI but does not slow the growth, so the ratchet is currently recording drift rather than resisting it.
The practical cost is that the gate stops carrying signal. In this triage pass I had to verify each of my 7 fixes against a clean-master baseline to establish that none of the failures were mine. That check is only feasible because I could diff against a pristine worktree; a contributor without that habit would reasonably assume a red gate is their fault, or learn to ignore it.
Also unrelated but adjacent, and fixed in #727: master's Cargo.lock was stale (commit 05014482b added a jcode-provider-core dev-dependency without committing the regenerated lock), so every CI job running cargo with --locked failed before compiling anything. Both Windows jobs were red on master for that reason.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Follow-up with exact numbers, measured by running each ratchet against a clean worktree of origin/master and comparing to a triage branch.
Ratchet
Clean origin/master
Branch with 9 fixes
oversized-file
16 entries
16 entries
oversized-test
5 entries
5 entries
swallowed-error
7 entries
7 entries
Identical on both sides, which is the useful finding: the entire failure is inherited, and a branch adding nine fixes plus eight new test modules contributes zero additional drift.
Two things that follow from that:
The gate currently cannot distinguish a clean contribution from a dirty one. A contributor whose branch adds no drift sees the same red gate as one who adds plenty. I only established that mine was clean by building a pristine master worktree and diffing entry counts, which is not a step most people will think to take.
Rebaselining has not slowed the growth.transcript.rs went 2364 -> 2799 at the last rebaseline, and is now 3691. The current top offenders:
One option worth considering: have the gate compare against the merge base rather than a stored baseline, so it fails only on drift the branch itself introduces. That would make it actionable by the person who can act on it, and would keep it meaningful without needing periodic rebaselines.
Separately, while measuring this I also found tool::todo::tests::schema_advertises_intent_and_todosfailing on clean origin/master, unrelated to any branch. That may be worth its own issue.
Also fixed in #727: master's Cargo.lock was stale (05014482b added a jcode-provider-core dev-dependency without the regenerated lock), so every CI job running cargo with --locked failed before compiling anything. Both Windows jobs were red on master because of it.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Current-master follow-up (2026-10-06, a0c41dc): a clean detached checkout fails python3 scripts/check_code_size_budget.py with 17 entries, including new oversized tool/mcp.rs (1338 LOC) and tui/app/hotkey_feedback.rs (1216 LOC). This is reproducible without any PR changes. Separately, cargo fmt --all -- --check on the same pristine checkout fails at src/cli/commands_tests.rs:287 on the anyhow! expression. These two inherited gates also block unrelated Korean-shortcut PR #1727 at head f93a1de. I kept the PR branch scoped and did not raise the stored baseline or touch the unrelated format file. This updates the existing master-ratchet report rather than opening a duplicate issue.
Fresh recomputation at current master a6ba7844f (2026-10-09, reading the tree and baseline straight out of git objects with the same production-file filter the check uses):
Trajectory: 17 regressions when this issue was filed (2026-10-06), 32 at 4a7400819, now 46 at a6ba7844f. scripts/code_size_budget.json did not change once across those 19 commits, so all fourteen new regressions are additional growth in already-tracked files (grew 29 -> 43); the newly-oversized three are unchanged.
The three files that crossed 1200 LOC for the first time:
crates/jcode-app-core/src/tool/mcp.rs 1338 LOC
crates/jcode-tui/src/tui/app/hotkey_feedback.rs 1216 LOC
crates/jcode-provider-copilot-runtime/src/lib.rs 1201 LOC
crates/jcode-provider-copilot-runtime/src/lib.rs is one line over, so a one-line trim removes a whole regression there and a baseline entry would be a permanent tax for nothing.
Consequence for CI: master's Quality Guardrails currently fails at step 6 (formatting) and will fail step 11 the moment formatting passes, so no PR can turn the guardrails green while the committed baseline lags the tree. The formatting half is being fixed separately in #1772.
Both remedies are maintainer calls: (1) scripts/check_code_size_budget.py --update, the remedy used in #550/#587, though a snapshot baseline against a tree growing this fast is stale within a day; or (2) structural: compare against the merge base, or require re-baselining in the same change that grows a file, so an unrebased PR never fails on debt it did not create.
Reproduce on a clean master checkout: python3 scripts/check_code_size_budget.py (exit 1, 122 oversized vs 119 tracked).
Fresh measurement at origin/master04c7d2b04 (2026-10-09): the code-size gate is one of four red ratchets on master, and master's CI never runs any of them.
Every guardrail script was run against a git archive extraction of each tree, so nothing was written back to either:
Gate
origin/master04c7d2b04
pr/clippy-1.98-lint-drift4ceceaa8b
check_code_size_budget.py
FAIL, 45 entries
FAIL, 44 entries
check_test_size_budget.py
FAIL, 10 entries
FAIL, 10 entries
check_panic_budget.py
FAIL, 2 entries (total 166 -> 167, new crates/jcode-app-core/src/tool/calendar.rs)
FAIL, 2 entries, same total
check_swallowed_error_budget.py
FAIL, 32 entries (total 3667 -> 3730)
FAIL, 32 entries, same total
check_wildcard_reexport_budget.py
pass (total 17)
pass
check_dependency_boundaries.py
pass
pass
Why this has gone unseen: on master the Quality Guardrails job fails at step 6, Check formatting, and steps 11 to 17 (every ratchet step) are skipped. Five consecutive master runs stop in the same place (21eb960a2, ff7eb9ab7, a61c38ee9, 711f4001d, 152365582), which is how these baselines drifted 45 + 10 + 2 + 32 entries behind the tree. The ratchet steps execute only where a fork's CI still reaches them.
So the scope here is four baseline files, not one:
scripts/code_size_budget.json
scripts/test_size_budget.json
scripts/panic_budget.json
scripts/swallowed_error_budget.json
The existing PR #1701 (fix/692-sync-code-size-baseline, "Fixes #692") refreshes the first three from base 77f4f9d50 and leaves the fourth alone. It is currently CONFLICTING and its base is well behind the tree, so the numbers it carries no longer match 04c7d2b04. PR #1354 does not touch any baseline; it removes exactly one of the 45 code-size entries as a side effect of the lint and format work.
I rechecked the size-budget issue against current upstream master at ac2a0b09848a9ecc09942b8faf196b3af69a65bb (2026-10-15). The repository's own check_code_size_budget.py and check_test_size_budget.py pass after recalculating their baselines (116 production files and 47 test files); check_panic_budget.py also passes unchanged (162 across 57 files). The regenerated size-budget JSON matches current master exactly, so the October 6 failure report does not reproduce on this snapshot. Leaving the issue open for maintainers to confirm/close.
Activity
chore: rebaseline code-size ratchet for desktop2/transcript.rs (refs #…
1jehuang commentedon Jul 31, 2026
Unblocked CI in
94da79766by rebaselining the code-size budget fortranscript.rs(2364 -> 2799), computed from the committed tree atorigin/masterso it reflects only what is pushed.That is the minimal unblock, not the answer. Leaving this open for the actual question: whether the new markdown-structure rendering belongs in its own module rather than growing
transcript.rs. Whoever owns that work should decide; if the split happens, the baseline should come back down with it.Note the file is still growing locally (~2895 LOC in my working tree), so a further bump or the split will be needed shortly.
— Jcode agent (automated triage), on behalf of @1jehuang
chore: rebaseline code-size and swallowed-error ratchets (refs #692)
chore: rebaseline ratchets for the desktop2 background-progress work …
chore: rebaseline code-size ratchet for desktop2 growth (refs #692)
1jehuang commentedon Aug 2, 2026
Data point from an automated triage pass today:
masteris red on this again, and the ratchet drift has broadened well beyondtranscript.rs.Verified against a fresh worktree of clean
origin/master(no local changes),scripts/check_guardrails.shfails 3 gates:Current oversized-file drift on master:
Two observations that may be useful for the underlying decision:
transcript.rskept growing after the rebaseline (2799 -> 3691). Rebaselining unblocks CI but does not slow the growth, so the ratchet is currently recording drift rather than resisting it.Also unrelated but adjacent, and fixed in #727: master's
Cargo.lockwas stale (commit05014482badded ajcode-provider-coredev-dependency without committing the regenerated lock), so every CI job running cargo with--lockedfailed before compiling anything. Both Windows jobs were red on master for that reason.--- — Jcode agent (automated triage), on behalf of @1jehuang
1jehuang commentedon Aug 2, 2026
Follow-up with exact numbers, measured by running each ratchet against a clean worktree of
origin/masterand comparing to a triage branch.origin/masterIdentical on both sides, which is the useful finding: the entire failure is inherited, and a branch adding nine fixes plus eight new test modules contributes zero additional drift.
Two things that follow from that:
The gate currently cannot distinguish a clean contribution from a dirty one. A contributor whose branch adds no drift sees the same red gate as one who adds plenty. I only established that mine was clean by building a pristine
masterworktree and diffing entry counts, which is not a step most people will think to take.Rebaselining has not slowed the growth.
transcript.rswent 2364 -> 2799 at the last rebaseline, and is now 3691. The current top offenders:One option worth considering: have the gate compare against the merge base rather than a stored baseline, so it fails only on drift the branch itself introduces. That would make it actionable by the person who can act on it, and would keep it meaningful without needing periodic rebaselines.
Separately, while measuring this I also found
tool::todo::tests::schema_advertises_intent_and_todosfailing on cleanorigin/master, unrelated to any branch. That may be worth its own issue.Also fixed in #727: master's
Cargo.lockwas stale (05014482badded ajcode-provider-coredev-dependency without the regenerated lock), so every CI job running cargo with--lockedfailed before compiling anything. Both Windows jobs were red on master because of it.--- — Jcode agent (automated triage), on behalf of @1jehuang
chore: rebaseline code-size ratchet for desktop2/transcript.rs (refs 1…
chore: rebaseline code-size and swallowed-error ratchets (refs 1jehua…
chore: rebaseline ratchets for the desktop2 background-progress work …
chore: rebaseline code-size ratchet for desktop2 growth (refs 1jehuan…
chore: rebaseline code-size ratchet for desktop2/transcript.rs (refs 1…
8 remaining items
chore: rebaseline code-size and swallowed-error ratchets (refs 1jehua…
chore: rebaseline ratchets for the desktop2 background-progress work …
chore: rebaseline code-size ratchet for desktop2 growth (refs 1jehuan…
chore: rebaseline code-size ratchet for desktop2/transcript.rs (refs 1…
chore: rebaseline code-size and swallowed-error ratchets (refs 1jehua…
chore: rebaseline ratchets for the desktop2 background-progress work …
chore: rebaseline code-size ratchet for desktop2 growth (refs 1jehuan…
chore: rebaseline ratchets for the desktop2 background-progress work …
chore: rebaseline code-size ratchet for desktop2 growth (refs 1jehuan…
chore: rebaseline code-size ratchet for desktop2/transcript.rs (refs 1…
chore: rebaseline code-size and swallowed-error ratchets (refs 1jehua…
mg-mg-mg commentedon Oct 6, 2026
Current-master follow-up (2026-10-06, a0c41dc): a clean detached checkout fails
python3 scripts/check_code_size_budget.pywith 17 entries, including new oversizedtool/mcp.rs(1338 LOC) andtui/app/hotkey_feedback.rs(1216 LOC). This is reproducible without any PR changes. Separately,cargo fmt --all -- --checkon the same pristine checkout fails atsrc/cli/commands_tests.rs:287on theanyhow!expression. These two inherited gates also block unrelated Korean-shortcut PR #1727 at head f93a1de. I kept the PR branch scoped and did not raise the stored baseline or touch the unrelated format file. This updates the existing master-ratchet report rather than opening a duplicate issue.ianalitis commentedon Oct 9, 2026
Fresh recomputation at current master
a6ba7844f(2026-10-09, reading the tree and baseline straight out of git objects with the same production-file filter the check uses):Trajectory: 17 regressions when this issue was filed (2026-10-06), 32 at
4a7400819, now 46 ata6ba7844f.scripts/code_size_budget.jsondid not change once across those 19 commits, so all fourteen new regressions are additional growth in already-tracked files (grew 29 -> 43); the newly-oversized three are unchanged.The three files that crossed 1200 LOC for the first time:
crates/jcode-provider-copilot-runtime/src/lib.rsis one line over, so a one-line trim removes a whole regression there and a baseline entry would be a permanent tax for nothing.Consequence for CI: master's Quality Guardrails currently fails at step 6 (formatting) and will fail step 11 the moment formatting passes, so no PR can turn the guardrails green while the committed baseline lags the tree. The formatting half is being fixed separately in #1772.
Largest movers:
crates/jcode-app-core/src/tool/mod.rs1699 -> 1731 -> 1855,crates/jcode-base/src/auth/lifecycle.rs2768 -> 3065 -> 3093,crates/jcode-provider-openrouter-runtime/src/lib.rs2916 -> 2993.Both remedies are maintainer calls: (1)
scripts/check_code_size_budget.py --update, the remedy used in #550/#587, though a snapshot baseline against a tree growing this fast is stale within a day; or (2) structural: compare against the merge base, or require re-baselining in the same change that grows a file, so an unrebased PR never fails on debt it did not create.Reproduce on a clean master checkout:
python3 scripts/check_code_size_budget.py(exit 1, 122 oversized vs 119 tracked).ianalitis commentedon Oct 9, 2026
Fresh measurement at
origin/master04c7d2b04(2026-10-09): the code-size gate is one of four red ratchets on master, and master's CI never runs any of them.Every guardrail script was run against a
git archiveextraction of each tree, so nothing was written back to either:origin/master04c7d2b04pr/clippy-1.98-lint-drift4ceceaa8bcheck_code_size_budget.pycheck_test_size_budget.pycheck_panic_budget.pycrates/jcode-app-core/src/tool/calendar.rs)check_swallowed_error_budget.pycheck_wildcard_reexport_budget.pycheck_dependency_boundaries.pyWhy this has gone unseen: on master the
Quality Guardrailsjob fails at step 6,Check formatting, and steps 11 to 17 (every ratchet step) are skipped. Five consecutive master runs stop in the same place (21eb960a2,ff7eb9ab7,a61c38ee9,711f4001d,152365582), which is how these baselines drifted 45 + 10 + 2 + 32 entries behind the tree. The ratchet steps execute only where a fork's CI still reaches them.So the scope here is four baseline files, not one:
scripts/code_size_budget.jsonscripts/test_size_budget.jsonscripts/panic_budget.jsonscripts/swallowed_error_budget.jsonThe existing PR #1701 (
fix/692-sync-code-size-baseline, "Fixes #692") refreshes the first three from base77f4f9d50and leaves the fourth alone. It is currently CONFLICTING and its base is well behind the tree, so the numbers it carries no longer match04c7d2b04. PR #1354 does not touch any baseline; it removes exactly one of the 45 code-size entries as a side effect of the lint and format work.Reproduce:
(
check_module_files.pyis excluded above because it shells out togit rev-parse --show-topleveland cannot run in an extracted tree.)Soham-o commentedon Oct 15, 2026
I rechecked the size-budget issue against current upstream
masteratac2a0b09848a9ecc09942b8faf196b3af69a65bb(2026-10-15). The repository's owncheck_code_size_budget.pyandcheck_test_size_budget.pypass after recalculating their baselines (116 production files and 47 test files);check_panic_budget.pyalso passes unchanged (162 across 57 files). The regenerated size-budget JSON matches currentmasterexactly, so the October 6 failure report does not reproduce on this snapshot. Leaving the issue open for maintainers to confirm/close.