Repository navigation
docs(loop): seven dangling why.md anchors, and the base-merge rule's reason - #161
Conversation
…our repos have Two of the seven dangling `docs/why.md` anchors were cited from `workflow/skills/`, so each cited rule's only statement was its own one-line rationale. One of those rationales was false. `resolve-conflicts` and `address-review` both forbade merging the base branch in, and both gave the merge queue as the whole reason: "the queue rebases before it lands, so being behind costs nothing." The queue covers four repos. This one has no queue and no CI at all. The rule was right and its reason was not portable. Both now rest on ownership, which needs no per-repo knowledge: the base ref belongs to a trigger, not to a session's judgement. `dispatcher/decide.mjs` fires `resolve-conflicts` only on a non-draft PR GitHub reports `CONFLICTING`, and that is the one state in which merging a base is anyone's job. `address-review` also reaches a behind-but-mergeable PR, and it was merging anyway. Both skills also say inline when a base merge is allowed, keyed on that state rather than on a handler name - `finalize-pr` step 8 instructs one too, on the same `CONFLICTING` condition. `address-review` adds that a reviewer asking in a thread does not change it, which is what both skills already did unconditionally. The ticket's open question about the `@sydevs-bot` channel is recorded as open rather than decided here. `## Staleness is not yours, conflicts are` replaces the cited `the-queue-owns-staleness-you-own-conflicts`, because that title names the queue as the rule's owner and the entry's own argument withdraws it. The three citations are retargeted, except the comment-brevity rule at `resolve-conflicts/SKILL.md:42`: that pointer was dangling on main, and the new entry does not tell its story, so it is dropped rather than aimed somewhere it does not belong. The imperative survives inline. The entry keeps the recoverable cost - three conflict essays on one PR in twenty-five minutes - and records that the `synchronize` re-flag it used to cite is dead in `dispatcher/decide.mjs`. `## Construct a number, discover a slug` keeps its slug exactly, because SahajCloud's `previewUrl.$comment` cites it across repos. It sits beside its pair and writes only the half that pair does not: why a unique key and a truncated one fail in opposite directions. `finalize-pr/SKILL.md` keeps the mechanism, as the sibling entry twenty lines up already says it does. The manifest version is bumped because two skill bodies changed, and the install cache is keyed on it (`docs/why.md#an-installed-plugin-does-not-track-main`). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01862uUBQgqktfXgU3N92Kjq
The remaining five dangling anchors, all cited from outside `workflow/skills/` - `README.md`, `loop-config.json` and three in `dispatcher/`. Same defect as the two in the previous commit, one level out. #98 is the single origin of all seven. It added every citation and never touched `docs/why.md`, though its own message says "docs/why.md also gains the stories behind the four commits on this branch." `git show 138d613 --stat` lists fifteen files and `docs/why.md` is not among them. So every story here is recovered from that commit's message and checked against the current tree, not invented: - **GitHub owns the merge** - the dispatcher's old merge verdict failed three ways, each already a heading, and all three were bugs in re-deriving what the ruleset computes. Arming is the one write left. Scoped the queue clause to the four repos that have one, since `README.md:120` points the public at this entry and `claude-workflow` has neither queue nor CI. - **blocked and awaiting are exclusive** - SahajCloud#780 carried both, two seconds apart, from one `issues.opened` plan. - **A closed item is nobody's turn** - SahajCloud#747 merged under a held lock, and the unlock path's idle test inverts on a closed PR. - **A proposal is reviewed before you read it** - the only one of the seven with no recorded incident. Rather than invent a failure, it uses this ticket: #160 was filed naming two dangling anchors and its revision found seven, because the filing's own check searched `workflow/skills` only. - **Quote the refusal, do not name a cause** - the hand-over comment blamed the token for every refusal, and three merges failed with no usable explanation. No dispatcher file is touched. The ticket expected some citations to need retargeting into `dispatcher/` comments; all five stories turned out to be recoverable, so the headings are written and the comments stand as they are. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01862uUBQgqktfXgU3N92Kjq
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size of its ticket and no larger. Both expansions the ticket invited — the carve-out
and a tripwire — are declined with reasons. Re-basing the rule on "the base ref belongs to a trigger"
rather than the merge queue is right, and decide.mjs:223 backs it exactly.
One story contradicts the entry it cites, the defect class this ticket is about. Every other claim I
checked against the tree held, the body's own test results included.
The cross-repo half the body says it cannot prove, I could. Read-only clones of all four product
repos: none cites the renamed slug, so the rename is safe, and the pinned slug is as described.
github-owns-the-merge is cited from all four ci.yml files and dangles on main — so this PR
repairs two cross-repo citations, not one.
Findings
should-fix—docs/why.md:885: "a preview and a CI run both build the branch head" is the
opposite of what the cited entry says. Thread below.consider—docs/why.md:1163: three entries rest on unreadable SahajCloud incidents; Manual
verification lists one. Thread below.
What was checked
- Anchors. The ticket's
commcheck prints nothing. Every in-file](#anchor)resolves on the
branch and on08f1b92alone, so commit 1 is independently revertable. - Each story against the code, not #98's commit message.
decide.mjs:223,:409,
:295-300,:455-457,:304;apply.mjs:83-90(403/405/422 plus regex,slice(0, 220));
mergeVerdictabsent. Queue scoping matchesdocs/cleanup.md:67. #160's revision comment says
what its entry claims. - Body claims re-run. Lean gate passes.
rule-delta --base origin/maingives 62 → 61 and the one
adjudicated removal. Against a routine clone's stale localmainit invents a second pair — a
trap for the next run, not a defect.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The cost claim in `Staleness is not yours, conflicts are` said a preview and a CI run both build the branch head, and cited `A conflicted PR schedules zero CI runs` for it. That entry says the opposite: it explains the zero by there being no computable merge commit, and names non-Actions deploys as the things that build the branch head. Actions CI builds the merge ref, so a behind-but-mergeable PR's CI already has the base. A story contradicting the entry it cites is the defect class this PR exists to close, so the half that does not survive its own citation goes. The preview carries the point alone, and the citation now supports what it is cited for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GBffGzrToa6yGEHqgk4ANU
|
Both review findings adopted. Pushed
Nothing rebutted, nothing asked. Re-ran the gates against a freshly fetched The review's four read-only product clones discharge Manual verification item 1. I left that item's wording as it is, because this run is scoped to 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
The version string is the installed plugin's cache directory name, so an unchanged one keeps serving the old skills however far main has moved. It has stood at 2.8.1 since #161 while #165 and #167 rewrote 47 files under workflow/skills, workflow/hooks and workflow/lib — every installed copy still runs the pre-#165 skill names. Major, not minor: #165 is `feat(loop)!`, and it renamed or deleted nearly every skill, so an installed copy's command names are gone. The two prior `feat(loop)!` commits each took a major bump — #71 to 1.0.0 and #101 to 2.0.0. Found by Friday's cut-release audit. Claude-Session: https://claude.ai/code/session_0134LSrTLenQog7g9n7TShtV Co-authored-by: Claude <[email protected]>
Summary
docs/why.md#<slug>citations resolved to no heading. All seven resolve now, checked repo-wide.Change outline
Contract — every cited slug now resolves
Each
(why: docs/why.md#<slug>)is a contract between a rule and its story. Seven were dangling, sothose rules had no statement anywhere but their own one-line rationale, and one rationale was false.
Nothing was broken at runtime — every affected rule survives inline as an imperative.
Two citations are not simply retargeted:
construct-a-number-discover-a-slugis kept byte-for-byte — SahajCloud's.claude/workflow.json→previewUrl.$commentcites it across repos.the-queue-owns-staleness-you-own-conflictsis renamed. Its title names the queue as the rule's owner, which is the premise the entry has to withdraw. Two of its three citations move to the new slug; the third is dropped, below.Behaviour — what a session decides about the base branch
The rule is unchanged. Its reason is now one that needs no per-repo knowledge, and the permitted
case is keyed on a state rather than implied by which handler you are in.
The carve-out the ticket raises is not added. Its first open question — whether a
respondTohuman's
@sydevs-botrequest authorises a base merge — is unanswered, and the ticket says thecarve-out becomes a behaviour change only if that answer is yes. Both skills still forbid the merge
unconditionally, and the new entry records the question as open rather than leaning either way.
Test results
claude plugin validate ./workflow --strict— validation passedcommcheck prints nothing (7 onmain)](#anchor)link resolves: ✓ prints nothing, on the branch and on commit 1 alonenode --test dispatcher/test/*.test.mjs: ✓ 145 passed, 0 failed — unchanged, no dispatcher file touchednode workflow/lib/rule-delta.mjs --base main workflow/skills: 62 → 61 directives, 1 removal, adjudicated belowcomment-lint.mjs --base origin/main: 0 changed code files, nothing to checkSKILL.mdpaths matchsecurityReview.triggerPattern. No findings: no frontmatter changed,allowed-toolsbyte-identical on both skills, and the net authority a session holds is unchanged.The one removed directive
rule-delta.mjsreports- Never merge the base branch in to keep a PR fresh.Meant. It wasresolve-conflicts' lead — a bare prohibition inside the skill whose whole job is that merge. It isnow stated as the condition, and its negative half still stands unchanged in that skill's Hard
rules: "Never merge
mainin unless GitHub reports the PR conflicting." Net authority is identical.Manual verification
grep -rn 'the-queue-owns-staleness' .in each. This PR cannot see them (GitHub access is scoped toclaude-workflow), so it cannot prove the rename broke no citation. The ticket's own research found exactly one cross-repo citation — SahajCloud'spreviewUrl.$comment— which is why only that slug is pinned; if another turns up, the fix is a one-line retarget there.respondTohuman's@sydevs-botrequest authorise a base merge on a behind-but-mergeable PR? Both skills say no today.#769(three conflict essays),#780(both labels two seconds apart),#747(a merged PR givenawaiting). Every SahajCloud number in these entries is recovered from feat(loop)!: GitHub owns the merge, and five frictions it exposed #98's commit message, not read, because SahajCloud is unreadable from this repo. None of the three is verified, not just the first.Notes for reviewer
docs/why.md, though its own message says "docs/why.md also gains the stories behind the four commits on this branch."git show 138d613 --statlists fifteen files anddocs/why.mdis not among them. Every story here is recovered from that commit's message and checked against the current tree.address-review." It reaches three:adversarial-review(decide.mjs:218,:248),address-review(:221) andfix-ci(:228). The true and load-bearing claim is narrower — it never reachesresolve-conflicts, andaddress-reviewwas the one merging. The entry says that instead. The guard at:223is also!pr.draft && mergeable === 'CONFLICTING', so the entry names both halves.resolve-conflicts/SKILL.md:42's comment-brevity rule ("a sentence, not a section") cited the dangling queue slug. The new entry tells a duplication story, not a brevity one, so pointing it there would have satisfied the ticket's check while leaving the real defect — a rule whose cited story is not its story.AGENTS.mdsanctions the imperative standing alone, and it does. This is the one place the ticket's acceptance criterion is one notch too shallow, and it is worth knowing before closing on "every slug resolves".AGENTS.mdhas a development-only checker behind it —rule-delta.mjs,comment-lint.mjs,comment-rule-sync.mjs,budget.mjs. "Every citation resolves" is the only one still held by memory, and memory demonstrably failed: seven at once, and the filing's own verification grep was scoped toworkflow/skillsand would have passed with five still dangling. Aworkflow/lib/why-anchors.mjsbeside its siblings, taking a workspace dir so it can see the other four repos' citations, would close the class. I did not add it: it is a second behaviour, it is not in the acceptance criteria, and this repo's throttle is the person who types the verb. Say the word and it is a one-file PR.finalize-pr/SKILL.md:293("GitHub's ruleset and queue do the rest") andcut-release/SKILL.md:105-106("tags only a commit onmainthat the merge queue ran CI on") still assume a queue. The first reads as the general arming case and is probably fine; the second describes the SahajAtlasWordpress release flow, which does have a queue, so it is likely correct as written — I could not settle it from here. Flagged because the sweep that finds them isgrep -rn 'merge queue' workflow/, not this ticket's file list.08f1b92fix(loop): the base-merge rule rests on the trigger, not on a queue four repos have— the two slugs cited fromworkflow/skills/, the skill rewrites, the manifest bump.ceec4b8docs(loop): the five why.md stories #98 cited and never wrote— the five slugs outsideworkflow/skills/,docs/why.mdonly.5255dd7fix(docs): a behind PR's cost is its preview— adopts the review'sshould-fix. The cost claim cited an entry that says the opposite, so the CI-run half goes and the preview carries the point alone.docs/why.mdonly.## Phasesis omitted perpr-template.md: both phases shipped in one session, so there is no unticked box for the dispatcher to continue.grepfor2.8.0finds no second declaration.Detail
What the review passes changed. Four cleanup agents plus the security review ran over the branch.
Adopted: the over-broad handler claim above; a story/imperative contradiction I had introduced
(the entry said a reviewer wanting the base merged "makes it their call" while the skill said a
reviewer's request does not authorise it — the entry now says they can merge it themselves, that a
session still never does, and that the channel question is open); the load-bearing reason moved from
"GitHub computes the merge" to trigger ownership, because the first conflates computing a merge
commit with GitHub admitting one, which a per-repo "require branches up to date" setting decides
and nothing in the tree records; an unverifiable claim about the merge button on a behind PR,
deleted;
address-review's "resolve-conflictsowns the one case that needs a base merge,"corrected because
finalize-pr/SKILL.md:299also instructs a base merge on the sameCONFLICTINGcondition; the queue clause in
## GitHub owns the mergescoped to the four repos that have one,since
README.md:120points the public at that entry; and several passages trimmed where theyrestated a neighbouring entry immediately before linking it.
Rejected: a proposal to delete
resolve-conflicts' opening rule outright as redundant with its Hardrules — acceptance criterion 3 asks for the permitted case stated inline, and the lead is where a
session reads it first. Deferred to the reviewer: the tripwire, the two surviving queue claims, and
a suggestion to add a
# The handlerslevel-1 section todocs/why.mdand move three entries underit (a reorganisation this PR should not carry).
The adversarial review's own two findings, both adopted. The
should-fixis commit5255dd7above. The
consider— three entries resting on SahajCloud incidents this repo cannot read, whileManual verification listed one — is answered in item 4, which now names all three and says once that
every SahajCloud number here is recovered from #98's commit message rather than read.
Facts the stories are built from, each checked against the tree rather than recalled.
dispatcher/decide.mjs:223firesresolve-conflictsonly on!pr.draft && mergeable === 'CONFLICTING'.dispatcher/decide.mjs:409makes a bot push onpull_request.synchronizeanote, and a human push removesawaiting. The re-flag cost atdocs/why.md:834-836is therefore retired, and the new entry states it as history, scoped to that handler —evaluatePrcan still addawaitingon the same event by another route, so the entry does not claim no bot push ever re-adds it.ci.noCilistsclaude-workflow;docs/rollback/README.md:148-149says "claude-workflowhas no queue and needs nothing."A conflicted PR schedules zero CI runsrecords that a non-Actions deploy builds the branch head, so a behind PR's cost is a stale preview. Actions CI builds the merge ref, which is why "and a CI run" no longer appears beside it.issues.openedcomputesbornBlockedbefore it writes, and theblockedwrite removesawaitingin the same plan.s.pr?.state !== 'open';evaluatePr's own first guard at:209returnsstatus('done')on a closed PR.dispatcher/apply.mjs:83-90treats 403, 405 and 422 as denied — plus a message regex — and carries 220 characters of GitHub's own words.A proposal is reviewed before you read ithas no recorded incident, unlike the other six. #98introduced it as a change the queue made possible, not as a fix. Rather than invent a failure, the
entry uses this ticket: #160 was filed naming two dangling anchors, and its revision found seven and
reported that the filing's own check searched
workflow/skillsonly. That is on the record in therevision comment on #160.
Placement. Each heading sits next to the entry a reader would arrive from:
Construct a numberbeside
Link the branch alias;Staleness is not yoursbesideA conflicted PR schedules zero CI runs;GitHub owns the mergeafterActions observes, classifies, locks, and fires; the two labelentries after
awaiting has one writer;A proposal is reviewedafterThe critic skips small PRs;Quote the refusalafterA write we cannot make is handed over, not thrown.One verification line in the ticket cannot pass as written.
grep -n 'construct-a-number-discover-a-slug' docs/why.mdprints nothing, and would for any human-readableheading — why.md headings are prose and GitHub derives the slug. The repo-wide
commcheck is theauthoritative one, and it passes.
Closes #160
🤖 Generated with Claude Code
https://claude.ai/code/session_01862uUBQgqktfXgU3N92Kjq
Generated by Claude Code