Skip to content

fix(loop): read a blocker the way people write it, and let the label follow it - #70

Merged
Ardnived merged 1 commit into
mainfrom
claude/fix-blocked-by-marker-shape
Sep 9, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/fix-blocked-by-marker-shape

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Revised 2026-09-09 for the event-driven loop. The original argument holds and the original patch does not: it edited preflight and work-routine, which no longer read anything, and implement-issue, which the flip rewrote. The reader is now dispatcher/markers.mjs. What follows replaces the original body.

The half the first pass found

relationships.bodyMarkerFormat is what the loop writes — Blocked by: <url>, exact. The reader demanded the same shape: the line had to start with Blocked by: and name a full issue URL. People do not write that.

**Blocked by sydevs/SahajCloud#695.** Do not start integration until that issue's Phase 3 PR
is merged to `main` — `pnpm types:cms` reads from `main`, so running it earlier silently
pulls the old shape.

Bold, no colon, shorthand instead of a URL. Four live tickets say it that way: SahajAtlasWeb#195 and #198, WeMeditateWeb#78 and #80. Three runs on 2026-09-08 journaled "Blocked by: ships in three shapes" under friction and none acted on it.

The reader now strips leading emphasis and bullets, matches the words with or without the colon, and takes a URL or owner/repo#N. It stays closed where being open would be wrong: a bare #N names no repository, a PR is not an issue, another org is not ours, a struck line is a cleared blocker. The four bodies are in the tests verbatim.

The half nobody had seen

Checking those four tickets against the new system turned up something the original PR could not have known: all four already have correct native relationships. Someone linked them in the GitHub UI. What they lack is the blocked label.

That is nearly harmless and quietly not.

  • The implement gate reads s.blockedByOpen, from the relationship, so @sydevs-bot implement on any of them is already refused correctly. The original PR's "four tickets are exposed" claim is not true under this system.
  • But unblock-check opened with "no label, nothing to do", and the sweeper only ever listed items carrying the label. So when SahajCloud#695 finally closes, its two dependents would have been passed over in silence — no awaiting, no mention, nothing. The signal that a ticket is ready depended on a label nothing had applied.

WeMeditateWeb#81 makes it plain: its marker matches the written format perfectly, and it still carries no label, because the backfill only labelled tickets that had been parked by the retired Stage/Hold Until fields.

So the label follows the relationship, in both directions, in one place. unblock-check applies blocked when GitHub says the issue is blocked and we have not said so, and removes it when the last blocker closes. The sweeper finds candidates with is:blocked, which reads the relationships GitHub already indexes — one search per repo per pass, confirmed working (repo:sydevs/SahajAtlasWeb is:issue is:open is:blocked returns exactly #195 and #198).

The change

File Change
dispatcher/markers.mjs parseBlockedBy matches words, strips emphasis and bullets, accepts owner/repo#N and de-duplicates a target named twice
dispatcher/decide.mjs unblock-check handles both directions and no longer bails on a missing label
dispatcher/sweep.mjs an is:blocked search per repo, skipping what the label sweep already found
loop-config.json bodyMarker "Blocked by:" → "Blocked by", and a $comment saying which key a reader matches, which a writer emits, and that the relationship is what gates read
triage-issue/SKILL.md write the format, do not rely on it when reading; the relationship is what every gate reads
docs/why.md two anchors: the reader's asymmetry, and why the label follows the relationship
plugin.json 1.0.0 → 1.1.0 — the cache key

bodyMarkerFormat is deliberately unchanged. A machine writing to a machine has no reason to vary.

Test results

  • node --test dispatcher/test/*.test.mjs — 55 pass, 6 new. The four ticket bodies verbatim, the five shapes that must stay ignored, both unblock-check directions, and the sweeper finding an issue only GitHub knew was blocked.
  • claude plugin validate ./workflow --strict — ✓.
  • node workflow/lib/rule-delta.mjs --base origin/main workflow/skills — 84 → 84, no directive disappeared.
  • Both manifests parse.

Notes for reviewer

  • The original PR's headline claim is retired, not carried forward. Nothing was exposed to being implemented against a missing contract; the relationship gate held. The silent-unblock defect is the reason to merge.
  • The five tickets get their label the first time the sweeper reaches them after this merges, within 30 minutes. Nothing else about them changes.
  • The ~~struck~~ convention for a cleared blocker survives, and is now tested.
  • ⚠ The original body's note about rule-delta --base main reporting spurious removals in a cloud checkout still stands, and is still a separate fix.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

Right size, right direction: the four cited tickets really do read **Blocked by sydevs/SahajCloud#695.**, and the read-loose/write-strict split is well argued. But the fix is incomplete inside its own file. work-routine reads this line in three places and one was updated; L195 still says "every URL a Blocked by: line names", so rung 4's blocker-aware ordering still misses all four tickets — the false-negative direction this PR itself calls unsafe. That the miss happened is the shape-level finding: these two words are restated in five prose sites beside a config key no script reads.

Findings

  • should-fix — work-routine L84 and L195 left on Blocked by: / URL → thread on L179
  • should-fix — the readers state the reference shape differently, and neither takes a bare #N → implement-issue L61
  • consider — does bodyMarker still pay rent? → loop-config.json L116

Checked: diff vs origin/main; grep -rn 'Blocked by|bodyMarker' repo-wide (11 sites); work-routine L75–200, preflight L155–170, implement-issue L30–70 whole; why.md anchor resolves; version bumped; SahajAtlasWeb#195 + WeMeditateWeb#78 fetched. Profile read.


Generated by Claude Code

Comment thread workflow/skills/work-routine/SKILL.md Resolved
Comment thread loop-config.json
"$comment": "No MCP tool reads blocked_by. So a cloud run reads this marker from the issue body instead. Set the real relationship locally, then mirror it here.",
"bodyMarker": "Blocked by:",
"$comment": "No MCP tool reads blocked_by. So a cloud run reads this marker from the issue body instead. bodyMarker is what a reader matches, bodyMarkerFormat what a writer emits. Set the real relationship locally, then mirror it here.",
"bodyMarker": "Blocked by",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A question, not a request. bodyMarker is now two English words that are a strict prefix of bodyMarkerFormat on the next line. No script reads either key — every consumer is prose that spells the words out inline anyway, in six skills plus docs/routine-setup.md. This PR had to hand-edit four of those restatements, and missed two more in work-routine.

That is the shape CLAUDE.md keeps out of skills ("nothing hard-codes a label name") colliding with the fact that a prose skill cannot interpolate a config value. So the key buys a sync it has no way to enforce.

Bimodal, either way is fine: the skills stop restating the words and cite relationships.bodyMarker, or the key goes and the words live where they already are. Which do you want?

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yours to call, @Ardnived — I am not guessing at it. Either option is its own one-behaviour PR, and neither belongs here: this PR's job is that the reader stops missing four live tickets.

My lean is your second. A prose skill cannot interpolate a config value, so bodyMarker cannot enforce the sync it implies — this PR proved that by missing two sites. CLAUDE.md's "nothing hard-codes a label name" was written for values a script reads. bodyMarkerFormat still earns its place: it is the shape the loop emits.

Say which and I will open it.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

sydevs-bot pushed a commit that referenced this pull request Sep 8, 2026
…issed

The adversarial review on #70 found the fix incomplete inside its own
file. `work-routine` reads this marker in three places and the first
commit updated one.

- L84, rung 1's merge ordering, still read `Blocked by:`.
- L196, rung 3's selection, still read "every URL a `Blocked by:` line
  names" -- stale twice, on the colon and on "URL", which L179 had just
  widened. Against the four tickets this branch exists for, selection
  resolved zero blockers, so blocker-aware ordering degraded to "nothing
  blocks anything". That is the false-negative direction the change
  itself argues is the unsafe one.

Both readers also named the accepted reference shape differently, and
neither took a bare `#N` -- the likeliest shape of a hand-written block
inside one repo. They now name the same three: a URL, an `owner/repo#N`,
or a bare `#N`.

The `Blocked by:` spelling stays wherever the loop WRITES the line:
work-routine's strike-through template, triage-issue, draft-ticket,
cross-repo-issue and routine-setup. Read loose, write strict.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QZRxYCVNWAFr5AEuqiZdBz
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Two review threads adopted and resolved, one commit pushed. One question is yours.

  • e20de10 — work-routine L84 and L196, the two reader sites the first commit missed. L196 was the one with teeth: against the four tickets this PR exists for, rung 3's selection resolved zero blockers, so "a blocker outranks a peer" became "nothing blocks anything".
  • Both readers now name the same three shapes: a URL, an owner/repo#N, or a bare #N in the ticket's own repo. Blocked by #82. was unread before.

The Blocked by: spelling stays wherever the loop writes the line — work-routine L189, triage-issue, draft-ticket, cross-repo-issue, routine-setup. Read loose, write strict.

Open for you: does bodyMarker still pay rent, now that it is two English words no script reads? Both answers are one-behaviour PRs of their own, so neither is in this one. My lean and the reasoning are on that thread.

Gates on e20de10: claude plugin validate ./workflow --strict ✓ · rule-delta.mjs --base origin/main 58 → 58, no directive dropped.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed awaiting labels Sep 9, 2026
@sydevs-bot

sydevs-bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 14:28Z resolve-conflicts · attempt 1 · session · done
  • 14:28Z resolve-conflicts · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot added awaiting and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Sep 9, 2026
…follow it

Reopens #70 against the event model. Its argument holds; its patch was
against `preflight` and `work-routine`, which no longer read anything.

The reader now matches the words `Blocked by`, with or without a colon,
through bold or a bullet, and takes a URL or `owner/repo#N`. The four live
tickets it missed are in the tests verbatim.

The larger half was invisible until now. Those four had correct native
relationships and no `blocked` label, and `unblock-check` began with "no
label, nothing to do" — so the close of a blocker would have passed them
over in silence. The label now follows the relationship in both directions,
and the sweeper finds candidates with `is:blocked`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Ardnived
Ardnived force-pushed the claude/fix-blocked-by-marker-shape branch from 866b4d3 to fbc0435 Compare September 9, 2026 15:45
@Ardnived Ardnived changed the title fix(loop): match the Blocked by marker on its words, not its punctuation fix(loop): read a blocker the way people write it, and let the label follow it Sep 9, 2026
@Ardnived

Ardnived commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Revised for the event-driven loop, and the diff is now entirely different from the one this PR opened with.

What survived. The argument. The reader demanded Blocked by: plus a full URL, people write **Blocked by sydevs/SahajCloud#695.**, and the asymmetry favours a generous reader. That is now in dispatcher/markers.mjs, where the reader actually lives — the original patch edited preflight and work-routine, which the cutover retired, and implement-issue, which the flip rewrote.

What did not. The headline claim. Checking the four named tickets against the new system, all four already have correct native relationships — someone linked them in the GitHub UI. The implement gate reads the relationship, not the marker, so @sydevs-bot implement on any of them is already refused. Nothing was exposed to being implemented against a contract that does not exist.

What replaced it is worse, and was invisible from the old system. Those tickets have no blocked label, and unblock-check opened with "no label, nothing to do" while the sweeper only listed labelled items. So when SahajCloud#695 closes, its two dependents would have been passed over in silence — no awaiting, no mention. WeMeditateWeb#81 proves the point: its marker matches the written format exactly and it still has no label, because the backfill only labelled tickets parked by the retired Stage and Hold Until fields.

The label now follows the relationship in both directions, and the sweeper finds candidates with is:blocked. 55 tests pass, 6 new, including the four bodies verbatim.

Full reasoning is in the rewritten description.

@Ardnived
Ardnived merged commit 105999c into main Sep 9, 2026
8 checks passed
@Ardnived
Ardnived deleted the claude/fix-blocked-by-marker-shape branch September 9, 2026 15:46
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants