Skip to content

chore(comments): drop the history narration main outgrew its baseline on - #9364

Merged
bolichen97 merged 2 commits into
mainfrom
fix/comment-history-baseline-drift
Sep 8, 2026
Merged

chore(comments): drop the history narration main outgrew its baseline on#9364
bolichen97 merged 2 commits into
mainfrom
fix/comment-history-baseline-drift

Conversation

@CrysisDeu

Copy link
Copy Markdown
Collaborator

Summary

scripts/check_comment_history.py only scans the files a diff touches, so the change-history narration that landed on main in src/kiro_crew/dashboard/chat_runner.py (109 spans against a baseline entry of 103) and src/kiro_crew/context.py (12 against 11) went unnoticed on main's own pushes — and then failed any PR that touches either file with history narration in comments grew from 103 to 109 on lines that PR never wrote (first hit: #8862, round 17).

This rewords the newest spans (the issue #6189 / issue #8132 references and previously / Until #6189 phrasing in the redaction-notice docstrings of chat_runner.py; the used to be appended comment in context.py) to present-tense statements of current behavior with no issue numbers, per docs/system-specs/common/code-style.md. --write-baseline then lowers chat_runner.py to 99 (the ratchet only ever lowers). No behavior change; comments and one JSON baseline entry only.

Verification

  • python3 scripts/check_comment_history.py on this branch: comment-history gate passed.
  • Pristine main (fd6684b40) measured with the gate's own violations_in_source: chat_runner.py 109 vs baseline 103, context.py 12 vs 11 — the drift this PR removes.
  • scripts/check_black_formatting.py and flake8 on the two files: clean.

Unblocks #8862 (and any other PR touching these two files).

@CrysisDeu
CrysisDeu requested a review from a team as a code owner September 8, 2026 03:30
@CrysisDeu
CrysisDeu requested a review from bolichen97 September 8, 2026 03:30
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 87ea82fc64c9d554dab6d435ce56710d6ed56897 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Correct unblocker: rewording the drifted narration and lowering the ratchet fixes the gate failure without touching behavior or weakening any pin.

Suggestions

  • The drift recurred because the gate scans only diff-touched files, so main can outgrow its baseline again and re-block unrelated PRs; a follow-up full-tree scan on main pushes would close that class permanently.

[DESIGN-REVIEWED] 87ea82f

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 87ea82fc64c9d554dab6d435ce56710d6ed56897 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 87ea82f

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 87ea82fc64c9d554dab6d435ce56710d6ed56897: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 87ea82fc64c9d554dab6d435ce56710d6ed56897 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All verification is done. The gate script, code-style rule, and audit workflow confirm the description's mechanism; I counted the removed spans in the patch (10 in chat_runner.py: 109→99 matching the new baseline entry; 1 in context.py: 12→11 matching its untouched entry of 11), and the baseline lowering is itself mandated by the gate's shrink rule. No pins are deleted; the "why" content of each docstring survives in present tense. Final review:

First-Principles-Verdict: PASS

Verify whole-tree scope once: run RATCHET_SCOPE_WHOLE_TREE=1 python3 scripts/check_comment_history.py on the merge — the PR's own diff-scoped run cannot see any third drifted file.

What this change ships

Inventory (3 items)

Intent: unblock PRs failing the comment-history gate on drift they never wrote, by removing main's over-baseline narration. FIX.

  1. Redaction-notice docstrings in chat_runner.py now state current behavior, no issue numbers or past tense — justified
  2. The context.py prefix-channel comment states current behavior instead of "used to be appended" — justified
  3. The chat_runner.py baseline entry drops from 103 to 99 — justified

The defect is derived, not asserted: the gate's grown-count verdict (scripts/check_comment_history.py:401) fires on any PR touching a file whose main count exceeds baseline, and I re-counted the patch's removed spans (10 and 1) against the gate's own patterns — the arithmetic in the description checks out. The rewording is mandated by docs/system-specs/common/code-style.md ("Comments explain the WHY"); the baseline lowering is mandated by the gate's must-lower rule, so neither is a rider. Recurrence is already owned by main-ratchet-audit.yml, which runs this gate whole-tree on every main push — no new mechanism needed, and none added.

[FIRST-PRINCIPLES-REVIEWED] 87ea82f

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 87ea82fc64c9d554dab6d435ce56710d6ed56897 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 87ea82f

Verdict parsed from the review's SHA-scoped output markers for commit 87ea82fc64c9d554dab6d435ce56710d6ed56897.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 87ea82fc64c9d554dab6d435ce56710d6ed56897: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 8, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 8, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 8, 2026
…aseline on

The comment-history gate scans only the files a diff touches, so the
seven narrated spans that landed in chat_runner.py (109 vs a baseline of
103) and context.py (12 vs 11) went unnoticed on main until a PR touched
either file -- and then failed that PR on lines it never wrote. Reword the
newest spans to present tense with no issue numbers, bringing both files
back under their baseline entries; no behavior change.
@CrysisDeu
CrysisDeu force-pushed the fix/comment-history-baseline-drift branch from 4dfaa84 to 3479a40 Compare September 8, 2026 05:44
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 8, 2026
@bolichen97
bolichen97 merged commit c02cdd6 into main Sep 8, 2026
34 checks passed
@bolichen97
bolichen97 deleted the fix/comment-history-baseline-drift branch September 8, 2026 06:43
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants