Repository navigation
fix(docs-sync): intercept revert PRs and calibrate prompts - #12708
Conversation
|
(bot) Post-merge runbook: after this merges, regenerate the full window with |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Resolved since previous review
Notes and assumptions
Previous Review Summaries (4 snapshots, latest commit 0d8f9eb)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 0d8f9eb)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (3 files)
Resolved since previous review
Notes and assumptions
Fix these issues in Kilo Cloud Previous review (commit 7673a09)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Resolved since previous review
Notes and assumptions
Fix these issues in Kilo Cloud Previous review (commit b2f7cbd)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Resolved since previous review
Notes and assumptions
Fix these issues in Kilo Cloud Previous review (commit 9943f0d)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Notes and assumptions
Reviewed by claude-opus-5 · Input: 26 · Output: 6K · Cached: 579.5K Review guidance: REVIEW.md from base branch |
…esign cancellations
…12708) * fix(docs-sync): calibrate triage/edit prompts against over-documentation * fix(docs-sync): intercept revert PRs and annotate reverted digest entries * fix(docs-sync): harden revert trailer parsing and surface unannotated reverts * fix(docs-sync): report per-target unannotated reverts, excluding by-design cancellations * fix(docs-sync): surface revert chains in the step summary without resolving them * test(docs-sync): fix depth-3 chain fixture and split mixed chain signals correctly
Issue
No tracking issue — driven by review remarks on auto-docs PR #12521 (see Context). Checklist exception explained below.
Context
Review of the auto-generated docs PR #12521 surfaced three mistake classes in the docs-sync pipeline (
.github/docs-sync/):revert(cli): restore opt-in stream idle timeouts), but the rolling PR documented it — collect'sDROP_TITLEfilter silently dropsrevert(...)PRs, so the pipeline never learns the feature is gone.Revert "original title"(no colon) does not matchDROP_TITLE, so a revert PR can itself be triaged docs-worthy.Root cause for 1–2 is deterministic:
DROP_TITLE = /^(chore|test|ci|build|docs|style|refactor|revert)(\(.+\))?!?:/idrops conventional revert titles (hiding the signal) while GitHub-native titles pass through.A fourth remark (command aliases "made up" in the docs) was verified incorrect — the aliases exist on main, added by the documented PR itself — so no rule was added for it.
Implementation
reverts.mjs(no I/O, no imports):revertTitleKind(both title conventions),parseRevertTargets(line-anchoredRevertstrailers; bare#Nandowner/repo#Nforms),computeRevertAnnotations(revert-of-revert cancels — a reverter that is itself reverted in-window annotates nothing),applyRevertAnnotations(applies to digest entries in place, returns applied pairs for reporting).collect.mjsintercepts revert PRs after the label check and beforeDROP_TITLE: fetches the full PR, parses its targets, excludes the revert from the digest, and annotates affected entries withreverted_by: { url, merged_at }before the digests are written (the slim digest inherits it via...rest).DROP_TITLEis byte-identical — itsrevertalternative is now unreachable (comment explains). One dead revert fetch countsfetch_erroronly and never aborts the run.reverted_byrule requiring thereasonto cite the revert. Edit: verify-against-current-tree step scoped to kilocode PRs (the edit agent runs on the kilocode checkout; cloud PRs rely on diff/body +reverted_by), skip-is-a-first-class-outcome lead, and areverted_byskip rule.selftest.mjscase 9: unit tests againstreverts.mjs(including the full verbatim revert(cli): restore opt-in stream idle timeouts #12497 body as a no-false-positives fixture), source-order guards pinning the interception beforeDROP_TITLEand the annotation before digest writes, and prompt-text guards locking the calibration strings.No
docs-sync.ymlchanges; no retroactive doc removal (locked non-goals).Screenshots / Video
N/A — CI workflow/prompt logic, no UI. Visual Changes: N/A.
How to Test
Manual/local verification
node .github/docs-sync/selftest.mjs— all 9 cases pass, including the new case 9 (executed by agent).collect.mjs --since 2026-07-17T01:19:29.999Z, executed by agent, fail-closedjq -egate):revert: 5intercepted, zero revert-titled digest entries, and exactly the expected annotations:[ { "repo": "Kilo-Org/kilocode", "number": 12249, "reverted_by": { "url": "https://github.com/Kilo-Org/kilocode/pull/12497" } }, { "repo": "Kilo-Org/kilocode", "number": 12481, "reverted_by": { "url": "https://github.com/Kilo-Org/kilocode/pull/12497" } }, { "repo": "Kilo-Org/cloud", "number": 4653, "reverted_by": { "url": "https://github.com/Kilo-Org/cloud/pull/4731" } }, { "repo": "Kilo-Org/cloud", "number": 4685, "reverted_by": { "url": "https://github.com/Kilo-Org/cloud/pull/4735" } } ]The step summary also renders the chain explicitly (final-head replay):
Kilo-Org/cloud#4698(reverted by #4709, itself reverted by #4759 in-window) correctly carries no annotation — the revert-of-revert cancellation working on the live chain. (#4653's body notes a partial re-land in #4712; annotate-anyway is intended — documenting or not is triage's call via the new prompt rule.)Reviewer test steps
bun installis not required for the selftest.node .github/docs-sync/selftest.mjs— expectselftest: all cases passed.reverts.mjs+ thecollect.mjsinterception block against the revert(cli): restore opt-in stream idle timeouts #12497 body quoted in case 9.Blocked checks and substitute verification
Post-merge runbook
After this merges, regenerate the full window with:
This is required because closing #12521 makes the watermark fall back to the 72h default and the 07-17→07-29 window would be lost. If the daily cron fires first with old logic, the later dispatch self-heals (prepare-branch update mode appends to the same PR); close any cron-created rolling PR unmerged.
Checklist
.github/docs-sync/only, no packages)Get in Touch
iscekic on Discord.