Skip to content
Source
Sign inSign up
pingdotgg/t3code

refactor: prune narration and history comments #19559

Mergedmaria-rcksmerged 11 commits intomain fromrefs/pull/19559/headmerged by maria-rcks View on GitHub

maria-rckscommented

Which version did the judges prefer? With comments 21, without comments 18, no difference 21, out of 60 blind verdicts.

Quality score by judge model, with vs without comments: Claude Opus 5.5 8.0 vs 7.9, GPT-6.1-Sol 8.5 vs 8.7, GPT-6-Astra 8.3 vs 8.5.

Same work, same cost: checks passed 85% vs 95%, tokens 857k vs 844k, files read 7.9 vs 8.1, minutes 3.2 vs 3.0.

Removes comments that repeat the code, document the obvious, or record history, in source and tests. Agents copy these into new files, where they go stale. A comment stays only when someone reading the code would likely break something without it: a security check, a race, a provider or OS quirk, or an invariant another file relies on. Lint directives, knip tags, and suppression reasons stay. Comment lines in the touched files drop from 63,684 to 18,432. Outside the lint rule below, code is unchanged: every pruned file parses to the same syntax tree as main.

A new t3code/no-low-value-comments lint rule keeps the mechanical cases out: section dividers, Arrange/Act/Assert labels, TODOs without an issue link, JSDoc types in TypeScript, empty @param/@returns tags, commented-out code, and comments that only repeat the name below them. AGENTS.md now tells agents that comments say why.

To check the effect on agents, gpt-6.1-sol did the same 10 tasks on main and on an earlier cut of this branch. 6 judges compared each pair without knowing which was which. 21 verdicts favored main, 18 favored the branch, and 21 were ties. Tokens, files read, and time stayed within 6%. The bench has not been rerun on this cut.

Done by claude-opus-5-5 (Claude Code) coordinating gpt-6.1-sol (Codex) subagents.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. github-actions[bot](GitHub profile, opens in a new tab) added labels📱 Native Change

    3. juliusmarminge added labelsmacroscope-review

    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs Human Approval

      Macroscope's review found this PR requires human approval — The PR is largely a mechanical comment cleanup with a development-only lint rule and no apparent product behavior changes. Its mobile fingerprint inputs nevertheless trigger the repository's native-change flow, which can block production OTA delivery until a new store build ships.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB4.9 KiB−30 B (−0.6%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB−30 B (−2.5%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.9 KiB20.8 KiB−41 B (−0.2%)29.3 KiB✅
      CodexLive turn messages21−1 (−50.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB+31 B (+0.6%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB+31 B (+2.6%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB+41 B (+0.2%)29.3 KiB✅
      ClaudeLive turn messages12+1 (+100.0%)8✅

      Baseline: ba35822 · PR result: 391c8d3 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    6. Note

      Written by claude-opus-5-5 on behalf of Maria

      The frozen-lockfile change in scripts/setup-worktree.ts comes from main (#19747) via the merge. Against main, this PR only removes the doc comment in that file. Every changed file has the same syntax tree as main once comments are stripped, so this PR changes no runtime code.

    7. oxlint-plugin-t3code/rules/no-low-value-comments.ts line 11OutdatedResolvedby maria-rcks
    8. maria-rcks merged this86534db

    9. maria-rcks closed this

Sign in to join this conversation.