Skip to content

chore: reword history comments to clear the lint gate on main - #9802

Merged
chenmingwei23 merged 1 commit into
mainfrom
chore/heal-comment-history
Sep 10, 2026
Merged

chore: reword history comments to clear the lint gate on main#9802
chenmingwei23 merged 1 commit into
mainfrom
chore/heal-comment-history

Conversation

@pepmach

@pepmach pepmach commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Main is above its history-narration baseline in 25 files. A PR that touches one of those files gets a red Backend Lint & Type Check (3.12) result even when it adds no matching comment.

Why it matters

Unrelated PRs are blocked by comments already on main. Fixing the same inherited lines in each PR would repeat work and hide the real cause.

What changed (motivation → approach → change)

The 73 excess markers state what the code does in present tense. The recorded baseline does not move. No executable code changes.

Tests

The comment-history gate passes for the PR diff and the whole tree.

  • python3 scripts/check_comment_history.py --test
  • python3 scripts/check_comment_history.py
  • RATCHET_SCOPE_WHOLE_TREE=1 python3 scripts/check_comment_history.py
  • Black, isort, and flake8 on every changed file
  • pytest -n0 on every touched test path: 2,710 passed, 5 skipped

Manual verification

N/A — the whole-tree gate proves every count is at or below its recorded baseline.

Why no screenshot: Only comments and docstrings change. No rendered surface changes.

Related Issues

no linked issue: this repairs inherited lint failures seen by open PRs.

Pattern harvest

Rule candidate: lint
Pattern: Ratchet checks on protected-base pushes must inspect the integrated whole tree, not an empty base-to-HEAD diff.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Reword the 75 comment and docstring markers that current main added beyond the recorded baseline. Keep each invariant in present tense and leave executable behavior unchanged.
@pepmach
pepmach requested a review from a team as a code owner September 10, 2026 00:02
@pepmach
pepmach requested a review from buluoray September 10, 2026 00:02
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 10, 2026
@pepmach

pepmach commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Intent: Restore the comment-history ratchet on current main by rewording only the inherited markers above each file's recorded baseline.
Not a goal: Change executable behavior, raise the baseline, or clean markers that remain within the recorded allowance.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 8ad8eb9326dd69e64276e034c32563badef0e9a5 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 8ad8eb9

Verdict parsed from the review's SHA-scoped output markers for commit 8ad8eb9326dd69e64276e034c32563badef0e9a5.

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

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

The heal pays down today's drift but leaves open the gate hole that let ten merged commits grow past baseline, so the red will recur.

Watch

  • Symptom paid, cause deferred: the PR's own evidence shows the excess came from commits that "landed after the gate" — the ratchet demonstrably admits marker growth on the way into main (diff-scoped or race-window), so nothing prevents the next accumulation and the next fleet heal. The author names the fix themselves ("Ratchet checks on protected-base pushes must inspect the integrated whole tree") but ships only the paydown.
    Clears when: a follow-up PR (or linked issue) makes the ratchet run whole-tree on protected-branch pushes / in the merge gate, so drift cannot re-accumulate silently.

Suggestions

  • Land the gate fix first (or in the same series): every day it's absent, concurrently merging PRs can re-grow the counts this PR just healed, invalidating the heal before the follow-up exists.

[DESIGN-REVIEWED] 8ad8eb9

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 8ad8eb9326dd69e64276e034c32563badef0e9a5 — 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.

The root-cause mechanism is confirmed: main-ratchet-audit.yml already runs the gate whole-tree on every main push, and the gate's own error text prescribes exactly this remedy ("Rewording the matched lines is what clears it"). Every hunk in the diff removes at least one pattern the gate matches ((#NNNN), bare #NNNN, issue/PR N, used to, no longer, previously, round N), no executable line changes, and the replacement text introduces no new markers. The change is mandated by the documented code-style invariant and unwedges inherited-red PRs, which the contract classes as derived. Final review follows.

First-Principles-Verdict: PASS

Two rewrites assert current behavior instead of trimming a ref — confirm "there is no text-path fence" and "lost, with no restart notice" are still true.

What this change ships

Inventory (6 items) — 6 justified

Intent: FIX — reword the 73 history-narration markers main accumulated above the ratchet baseline, so unrelated PRs stop inheriting a red check_comment_history gate.

  1. Issue/PR numbers stripped from comments and docstrings across 25 files, reasons kept — justified
  2. "used to" / "no longer" / "previously" narration restated in present tense — justified
  3. "round 2/3" test section headers renamed to descriptive titles — justified
  4. The measured-commit provenance line in test_options_marker_label_closers.py rewritten as a present-tense claim about unconditional closers — justified
  5. The ~/.ssh history aside in test_llm_helpers_edit_gate.py rewritten as "there is no text-path fence" — justified
  6. The WhatsApp group-route tracking pointer replaced with a plain statement of the degraded behavior ("lost, with no restart notice") — justified

Every hunk removes a marker check_comment_history.py's PATTERNS match (verified against the pattern list); none of the replacement text matches any pattern; no executable line, assertion, or baseline entry changes. The cause layer — drift landing on main unmeasured — is already owned by main-ratchet-audit.yml (whole-tree scope on every main push), so this heal sits exactly where the mechanism points it.

[FIRST-PRINCIPLES-REVIEWED] 8ad8eb9

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 8ad8eb9326dd69e64276e034c32563badef0e9a5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8ad8eb9

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

@pepmach

pepmach commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Provenance and local gate evidence

git log -p traced the excess comment markers to these commits on main:

The first three landed around the gate's baseline capture and were absent from its source snapshot. The others landed after the gate.

Local verdicts on the final diff:

self-test passed: 21 flagged probes, 15 clean probes
comment-history gate scope: origin/main...HEAD (25 changed files): PASS
comment-history gate scope: whole tree: PASS
Black / isort / flake8: PASS
pytest -n0 on every touched test path: 2710 passed, 5 skipped

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Sep 10, 2026
@pepmach

pepmach commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Symptom paid, cause deferred span=1675acc084d7 — accepted-and-deferred

The ratchet hole is real and is tracked in #9814 (label deferred-finding, assignee pepmach, due 2026-09-24): run the comment-history gate whole-tree on protected-branch pushes so growth is caught where it lands.
This PR is a comment-only paydown by design; it changes no CI workflow or gate code, and the class of finding "the gate should measure the integrated tree" is covered by that issue rather than by this diff.

@pepmach

pepmach commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Land the gate fix first (or in the same series) span=598744cf9138 — rebutted

Ordering the other way blocks two open PRs (#9676, #9681) that are red today only because main is above baseline in files they touch; the paydown is what unblocks them, and it is safe to land alone because the gate already forbids any PR from growing a healed count.
The gate change is a CI-workflow edit with its own review surface and is tracked in #9814; folding it into a comment-only diff would widen this PR past its stated scope. Any re-growth before #9814 lands is caught by the same whole-tree run this PR used and healed the same way.

@chenmingwei23
chenmingwei23 merged commit c9ccdac into main Sep 10, 2026
75 checks passed
@chenmingwei23
chenmingwei23 deleted the chore/heal-comment-history branch September 10, 2026 02:02
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 10, 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