Skip to content

fix(loop): three base-ref scripts trust a stale local main - #175

Merged
Ardnived merged 9 commits into
mainfrom
claude/fix-162-base-ref
Oct 11, 2026
Merged

Ardnived merged 9 commits into
mainfrom
claude/fix-162-base-ref

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • rule-delta.mjs --base main invented 50 rule additions and one removal on a clean tree, because a routine clone's refs/heads/main is never checked out. Six documented call sites named that ref; all now name origin/main.
  • All three --base readers now derive the branch point themselves and fail loudly on a ref that does not resolve, so a wrong answer can no longer read as a clean one.

Change outline

Flow — what --base <ref> now resolves to

The three readers stopped interpreting the ref. One module answers, and the two cases that used to give a wrong answer silently now either correct themselves or say something.

 rule-delta.mjs --base main            comment-lint.mjs / comment-fingerprint.mjs
-  collectRef(args[bi+1], dir)           git diff --name-only <args[bi+1]>
-    git show main:<path>                # main = refs/heads/main, stale in a routine clone
+  resolveBaseRef(ref, {root})         workflow/lib/base-ref.mjs
+    a branch name, claude/* included?
+      → refs/remotes/origin/<name>      # the clone's local ref is never checked out
+      → warn once if refs/heads/<name> differs
+    already says where it lives (refs/…, origin/…), a pseudoref or a sha?
+      → taken as given                  # origin/HEAD exists in every routine clone
+    unresolvable?
+      → one message, exit 2             # was: a clean delta at exit 0
+    merge-base <resolved> HEAD
+      → the branch point                # was: the tip, so the base's own commits inverted
+      → none? warn, and fall back to the tip

Behaviour — the two ways a clean report used to be wrong

Both produced No directive disappeared. at exit 0 on a tree that had not been read at all.

 collectRef(ref, dir, root)                    workflow/lib/rule-delta.mjs
   for each .md under dir                      # dir walked from the cwd
-    git show <ref>:<path>                     # path resolved from the worktree root
-    catch → continue                          # ate 25 fatals, before-set empty, exit 0
+    git show <ref>:relative(root, path)       # one frame of reference
+    catch → continue                          # now means one thing: absent at the base

Files

 workflow/lib/
+├── base-ref.mjs        # the one baseline a --base comparison is taken against
+├── base-ref.test.mjs   # 18 tests, against real git repos built commit by commit
 ├── rule-delta.mjs      # still owns directive extraction; no longer owns ref semantics
 ├── comment-lint.mjs    # ditto, and takes repoRoot() from the module too
 └── comment-fingerprint.mjs

Test results

Manual verification

The headline reproduction, on a clean tree where git rev-parse main ≠ git rev-parse origin/main:

  1. node workflow/lib/rule-delta.mjs --base origin/main workflow/skills → directives: 82 → 82, No directive disappeared., exit 0.
  2. node workflow/lib/rule-delta.mjs --base main workflow/skills → the same clean delta, plus one stderr line naming both refs. Before: 25 fatal: lines, 50 phantom ADDED, 1 phantom REMOVED, exit 1.
  3. cd workflow && node lib/rule-delta.mjs --base origin/main skills → directives: 82 → 82. Before: directives: 0 → 2 and exit 0, having read nothing.
  4. node workflow/lib/{rule-delta,comment-lint,comment-fingerprint}.mjs --base no-such-ref → one identical message, exit 2, from all three.
  5. grep -rn '\-\-base ' AGENTS.md docs workflow --include=*.md --include=*.mjs → one spelling per script.
  6. The same three, run from a directory outside any git worktree → one message and exit 2, with no fatal: line and no stack. Before: a 20- and a 39-line uncaught stack from the two comment readers.
  7. --base claude/other in a clone holding only refs/remotes/origin/claude/other → resolves, where git rev-parse claude/other exits 1. Before: exit 2.

Notes for reviewer

Two judgement calls that depart from the ticket, both because main moved under it.

  • version is 3.1.3, not the 3.0.1 the ticket asked for. The ticket was grounded when main read 3.0.0; it now reads 3.1.2, so 3.0.1 would be a downgrade of a cache key. cut-release/SKILL.md:31-32 makes a fix a patch bump, which is what the ticket was reasoning from.
  • comment-sweep.md:112 changed too, though the ticket marked it already correct. It said --base <branch-point> — a placeholder the agent filled by hand. Phase 2 makes that the script's job, so it now names origin/main like the other five, which is what acceptance criterion 2 asks for.

One commit per behaviour, in build order:

  1. 3e7f8d7 — six documented call sites, the AGENTS.md reword, the version bump.
  2. ac4e095 — the three readers derive their own baseline.
  3. e94b610 — docs sync: base-ref.mjs in the layout table.
  4. 0d61047 — review round: the two holes below, plus the simplify pass.
  5. a9e11bc — the AGENTS.md reword in 1 overstated how often the tools run; corrected against the calendar.
  6. 4777a40 — the two comment readers take repoRoot() from the module they already import.
  7. 8e453f2 — a branch name keeps preferring origin past the first slash.
  8. 154ccfa — the AGENTS.md line in 5 spends two lines, not five.

The first review round found two real holes in commit 2, both the original defect in a new costume — a wrong baseline that reads clean. --base HEAD resolved to refs/remotes/origin/HEAD, which start-run step 6 creates in every routine clone, with no warning possible because refs/heads/HEAD never exists. And rule-delta.mjs run from any subdirectory read nothing at all and called it clean, because git show <rev>:<path> is root-relative while mdFiles is cwd-relative. Both now have a test that fails without the fix.

The second round found a third, and the same shape again — a resolver that cannot reach the case it exists for. The bare-name rule stopped at the first slash, so it excluded claude/*, which AGENTS.md makes every branch in all five repos. git's own DWIM does not rescue it: rev-parse claude/other tries refs/remotes/claude/other, never refs/remotes/origin/claude/other. The slash was standing in for "already says where it lives", and base-ref.mjs now says that instead (6, 7). It also left two siblings outside the owner it had just built: both comment readers hand-rolled git rev-parse --show-toplevel three lines above importing the module that exports repoRoot(), and the inline form threw an uncaught stack outside a worktree — the one failure mode this branch removes everywhere else. base-ref.mjs's git() ignores git's stderr now, so "one message, exit 2" holds there too. Each of the three has a test that fails without its commit.

Dismissed findings, with reasons:

  • Resolve the base after each script's typescript check, to save a few ms in a repo with no TypeScript — rejected. It would make an unresolvable base exit 0 in exactly those repos, breaking acceptance criterion 5.
  • Route --base through git rev-parse --symbolic-full-name instead of the explicit pseudoref and sha sets — rejected, though the finding it came with was adopted. It answers for a ref git can already resolve, and the case here is the one it cannot: a branch with no local ref returns empty from it, indistinguishable from a sha.
  • Fold the three copies of git rev-parse --show-toplevel into base-ref.mjs — adopted in 4777a40 for the two in workflow/lib/. The third is workflow/hooks/block-wrong-bash.mjs:43, and it stays: gitTopLevel(dir) answers for an arbitrary captured path and returns null outside a repo, which is a different question from worktreeRoot()'s. Folding the four copies of the git shell-out helper is still a second behaviour, and still worth a follow-up.
  • Parse --base through config.mjs's existing flag() — same reason. Three call sites, none of them this ticket's.
  • Shrink the returned object to the one field callers read — kept. named, resolved and branchPoint are what let the tests assert the mechanism rather than just the answer, which is the difference between the merge-base case being shown and being assumed.
  • Print the baseline on the success path, and add base to comment-fingerprint --json — a real diagnosability gap, since comment-sweep.md:120 has a human read that pasted verdict. Out of scope for a one-behaviour PR; named here so it is not lost.

Two findings filed rather than fixed, per the incidental-finding rule — neither is this ticket's:

  • payload.test.mjs fails inside a worktree, which is where implement-ticket works by default. It cost this run a diagnostic detour and will cost every future one the same. Filed as fix(loop): the lib test suite runs in no gate, and two of its tests fail in a worktree #176.
  • workflow/lib/*.test.mjs runs in no gate at all, and .claude/workflow.json's leanGate.contents still reads "There is no test suite" with 57 tests in the directory. That file is a protected path, so an unattended run cannot fix it.
Detail

Why a shared module rather than three fixes. AGENTS.md:155-159 prescribes it, citing merge-gate.mjs: a computation re-derived three ways is three chances to derive it differently. The three readers had already diverged on exactly this — rule-delta.mjs printed No directive disappeared. at exit 0 on an unresolvable ref, while the other two threw 20 and 39 lines of uncaught stack.

Why start-run step 6 does not instead refresh the local ref. Step 6 is read on every dispatch, 25 to 40 times a day, and AGENTS.md:117-122 charges for every paragraph there. Adding git fetch origin main:main would spend tokens on each one to keep fresh a ref that nothing should read. Removing the dependency is the cheaper fix. The reverse dependency is now recorded at docs/why.md#a-routine-clone-is-not-a-developers-checkout, so a future token-trimming edit to step 6 can see what rests on its fetch.

Why origin/main alone would not have been enough. It is right for a stale local ref and still wrong once the base advances past the branch point: a rule the base gained reads as REMOVED, one it dropped as ADDED. git merge-base main HEAD does not rescue the stale case either — the stale ref is an ancestor of HEAD, so merge-base returns it unchanged. That property is asserted directly in base-ref.test.mjs, because a mock would let it be assumed.

Fixture pre-mortem. base-ref.test.mjs builds throwaway repos commit by commit and assumes nothing about any sydevs repo. The one real-world fact it leans on is that the remote is named origin, which start-run step 6's git remote set-head origin … settles too. Checked against .claude/workflow.json (worktreeSetup: [], packageManager: "none") — the fixture needs no install, and the suite uses only node:*.

Security review: ran, because securityReview.triggerPattern matches the two SKILL.md-directory files touched. No findings. The only new executable is base-ref.mjs, which shells out with execFileSync('git', [...]) — an argv array, no shell — and the only data crossing a boundary is a ref name from --base, which a leading -- rejects and which git itself rejects otherwise. Neither skill edit changes allowed-tools or adds an instruction. The second review round touches no file the pattern matches, so it needed no second review.

rule-delta.mjs gains an exit code it never had (2, for an unresolvable base; it previously had only 0 and 1). improve-loop/SKILL.md:109 still says "It exits non-zero on a directive that vanished with no close match", which is now incomplete — but the two cases print different things, and adding a clause to a run-loaded skill costs on every dispatch. Left as is, deliberately.

Dropped from base-ref.mjs in the simplify pass: the #!/usr/bin/env node shebang (a pure module with no CLI block — the convention in this directory is exact), maxBuffer: 1 << 28 on a call returning 41 bytes, a git/tryGit split where only the fallible form was ever used, and two redundant rev-parse spawns. --base main forks git three times now rather than five, and --base origin/main, the documented call, no more often after 8e453f2 than before it.

Closes #162

🤖 Generated with Claude Code

https://claude.ai/code/session_01R7rHeMsmNeH6pQwUvxDkUz


Generated by Claude Code

A routine clone never checks out `main`, so `refs/heads/main` is whatever the
clone was seeded with. Here it sat 25 skill files behind `origin/main` on a
clean tree, and `rule-delta.mjs --base main` answered with 25 `fatal:` lines,
50 phantom additions and one phantom REMOVED line handed to a human to
adjudicate. Neither command in `start-run` step 6 moves the local ref, so a run
that follows the skill exactly still got the wrong answer. That one phantom
removal is the whole value of the tool inverted: the one place a reviewer is
told to trust it.

Six documented call sites named `main`. All now name `origin/main`, which also
makes `comment-sweep.md` drop its `<branch-point>` placeholder — phase 2 has
the script derive the branch point itself, so one spelling serves all three
readers.

`AGENTS.md` also called both `rule-delta.mjs` and `ste-lint.py` "development
tools, never run steps" while two routines execute them. What the sentence was
reaching for is that neither is part of the automated gate; it now says that,
and names the two runs.

`improve-loop/SKILL.md` is a skill edit, so `version` bumps. The ticket planned
`3.0.1` against `main` at `3.0.0`; `main` has since moved to `3.1.2`, and
`cut-release` makes a fix a patch bump, so this is `3.1.3`.

Refs #162

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R7rHeMsmNeH6pQwUvxDkUz
A correct spelling in the docs only fixes the call sites we control. The three
scripts still took whatever ref they were handed, raw, and got it wrong in both
directions.

Stale ref: a routine clone never checks out the default branch, so
`refs/heads/main` is whatever the clone was seeded with. `git merge-base` alone
does not rescue it — a stale ref is an ancestor of HEAD, so merge-base returns
the stale commit. The remote counterpart has to win first.

Base moved on: comparing against the tip of `origin/main` reads every commit
the base gained since the branch point as this branch's work, inverted — a rule
the base added shows as REMOVED, one it dropped as ADDED. The branch point is
the only honest baseline.

Unresolvable ref: all three diverged, and two were worse than useless.
`rule-delta.mjs` swallowed every `git show` failure and printed `No directive
disappeared.` at exit 0 — a tripwire that reports all-clear is worse than no
tripwire. The other two threw 20 and 39 lines of uncaught stack. All three now
print one message and exit 2.

One `base-ref.mjs` rather than three copies, for the reason `merge-gate.mjs`
exists: a baseline derived three ways is three chances to derive it
differently. `base-ref.test.mjs` covers the three changes against real git
repos built commit by commit, because `git merge-base main HEAD` returning the
stale commit is the property the fix turns on, and a mock would let it be
assumed instead of shown.

Refs #162

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R7rHeMsmNeH6pQwUvxDkUz
The table enumerates `workflow/lib/*.mjs` by file, so a new shared module that
is absent from it is a module nobody finds.

Refs #162

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R7rHeMsmNeH6pQwUvxDkUz
Two holes the review found in the baseline this PR had just centralised. Both
are the same failure as the original defect — a wrong answer that reads clean.

`--base HEAD` has no slash, so it took the bare-name path and resolved to
`refs/remotes/origin/HEAD`, which `start-run` step 6 creates in every routine
clone. The baseline silently became the default branch's branch point, and the
divergence warning could not fire because `refs/heads/HEAD` never exists. Git's
pseudorefs and an object name are now taken as given.

`git show <rev>:<path>` resolves against the worktree root while `mdFiles`
walks from the cwd. Run `rule-delta.mjs` from a subdirectory and every read
failed, the swallowing `catch` ate all 25 of them, and the tool printed `No
directive disappeared.` at exit 0 — the silent all-clear this PR exists to end,
reached by a second route. Verified: from `workflow/` it reported `directives: 0
→ 2`; it now reports `82 → 82`. `repoRoot()` gives all three readers one answer
to "which git root", and `rule-delta.mjs` was the one passing none.

`baseline` also fell back to the tip, unannounced, when `merge-base` found
nothing. Tip semantics are what this module calls backwards, so it now says so.

The simplify pass rides in the same hunks: the shebang goes (this is a pure
module, and the convention here is exact), `git` and `tryGit` collapse into one
fallible helper, the 256MB `maxBuffer` goes from a call returning 41 bytes, and
two provably redundant `rev-parse` spawns go — `resolved` reuses the sha the
remote lookup already held, and the `HEAD` guard duplicated a check the catch
already performs. `--base main` now forks git three times, not five.

Tests go 10 → 13: the pseudoref case, the subdirectory case, and rule-delta's
unresolvable base asserted where it can actually fail. Two shared fixtures
replace three inline copies of the stale-clone shape, and `maintenance.auto`
off drops 15 `git maintenance` forks from repos deleted a second later.

Refs #162

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R7rHeMsmNeH6pQwUvxDkUz
The reword in the first commit overshot. `audit-code` does not run
`ste-lint.py` "on its three weekdays": it is reached only from
`comment-sweep.md`, which is the code-comments angle — one of six in
`auditAngles.saturday` — so roughly one Saturday in six. `rule-delta.mjs` is
conditional too, on the Sunday PR editing a skill. Both claims now match the
calendar.

`docs/why.md#a-routine-clone-is-not-a-developers-checkout` gains the dependency
in the other direction. Step 6's fetch is now load-bearing for three scripts,
and step 6 is exactly what the Sunday run trims for tokens. The story goes in
why.md rather than in the run-loaded skill, which pays for every paragraph on
every dispatch.

Refs #162

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R7rHeMsmNeH6pQwUvxDkUz
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 11, 2026
@sydevs-bot

sydevs-bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 17:12Z resolve-conflicts · attempt 1 · session · done
  • 17:12Z resolve-conflicts · attempt 1 · session
  • 00:26Z address-review · attempt 1 · session · done
  • 00:26Z address-review · attempt 1 · session
  • 00:18Z review-pr · attempt 1 · session · done

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

@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

Holistic assessment. The diff is the right shape and no bigger than the ticket. Three readers that each got ref resolution wrong now share one module, which AGENTS.md:155-159 prescribes. Every verification claim in the body reproduces here. Both declared departures from the ticket are correct: main reads 3.1.2, so 3.1.3 is the patch bump, and comment-sweep.md:112 held a hand-filled placeholder that is now the script's job.

One thing is unfinished rather than wrong. The PR builds the shared owner and leaves two siblings outside it — comment-lint.mjs:164 and comment-fingerprint.mjs:500 still hand-roll git rev-parse --show-toplevel beside their new import of the module that exports repoRoot(). And the bare-name rule stops at the first slash, so it skips claude/*, which is every branch in this repo.

Findings

  • should-fix — the diff creates the shared owner and two siblings stay outside it → workflow/lib/comment-lint.mjs:170
  • consider — the bare-name rule excludes claude/*, this repo's only branch shape → workflow/lib/base-ref.mjs:95
  • consider — the AGENTS.md reword spends four lines on a one-line criterion → AGENTS.md:135

What was checked. Ticket #162 and all seven acceptance criteria. Read whole: base-ref.mjs, base-ref.test.mjs, and each reader's CLI block. Ran at a9e11bc: the 13 new tests pass; workflow/lib/*.test.mjs is 50 of 52, both failures payload.test.mjs's and filed as #176; claude plugin validate ./workflow --strict passes; all three readers exit 2 with one message on --base no-such-ref; --base main warns and compares against origin/main; rule-delta.mjs from workflow/ reads 82 directives; the --base grep shows one spelling per script. origin/main has gained nothing since the branch point. No contract surface is touched.

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


Generated by Claude Code

Comment thread workflow/lib/comment-lint.mjs Resolved
Comment thread workflow/lib/base-ref.mjs Resolved
Comment thread AGENTS.md Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 11, 2026
… import

Both CLI blocks shelled out `git rev-parse --show-toplevel` by hand, three
lines above their import of the module that exports `repoRoot()` for exactly
that. The two forms are not equivalent: the inline `execFileSync` throws an
uncaught stack trace outside a git worktree, which is the failure mode this
branch removes everywhere else. `repoRoot()` falls back to the cwd, the base
ref then fails to resolve, and the reader prints the one message and exits 2.

`base-ref.mjs`'s own `git()` now ignores git's stderr, so that really is one
message. `--show-toplevel` alone printed two `fatal:` lines before it, and
every failure in this module has a caller-written message waiting for it.

`comment-fingerprint.mjs` imports the helper as `worktreeRoot`, matching
`hooks/lib/workflow-config.mjs`, because `repoRoot` is its own CLI block's
variable name.

Three tests, one per reader, run from outside any worktree. All three fail
without this commit.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Db6u57BAYTuSHEekHUGHhm
The bare-name rule tested `!name.includes('/')`, so it excluded the only
branch shape it ever meets: AGENTS.md makes every branch in all five repos
`claude/*`. `--base claude/other` exited 2 in a routine clone with
`refs/remotes/origin/claude/other` sitting right there, which is the exact
case this module was added to fix. git's DWIM does not rescue it either —
`rev-parse claude/other` tries `refs/remotes/claude/other`, never
`refs/remotes/origin/claude/other`.

The slash was standing in for "already says where it lives". Say that
instead: a `refs/…` ref or an `origin/…` ref is taken as given, and
everything else that is not a pseudoref or a sha is a branch name. The
divergence warning now reaches slashed branches too.

Not routed through `rev-parse --symbolic-full-name`, as the thread offers. It
answers for a ref git can already resolve, and the case here is the one git
cannot: a branch with no local ref returns empty from it, indistinguishable
from a sha. The explicit sets stay.

`--base origin/main`, the documented call, forks git no more often than
before.

Two tests, both failing without this commit.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Db6u57BAYTuSHEekHUGHhm
Acceptance criterion 3 asks only that this line name the two runs. The reword
spent five lines on it, in the file every session loads — the cost AGENTS.md
itself charges for two sections up. The conditions stay, since they are the
correction a9e11bc made: a skill edit for one, the comments angle for the
other. The calendar colour goes, and the why.md anchor already carries it.

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

Copy link
Copy Markdown
Contributor Author

Three critic threads, all adopted, all resolved. Pushed 154ccfa.

  • comment-lint.mjs:170 — both comment readers take repoRoot() from the module they import (4777a40). The inline execFileSync threw an uncaught stack outside a worktree, so base-ref.mjs's git() ignores git's stderr now and all three readers give one message and exit 2 there.
  • base-ref.mjs:95 — the branch-name rule stopped at the first slash, excluding every claude/* branch (8e453f2). Not routed through --symbolic-full-name: it returns empty for a branch with no local ref, indistinguishable from a sha.
  • AGENTS.md:135 — adopted verbatim, five lines down to two (154ccfa).

Gate ✓. 57 of 57 across workflow/lib. Each commit carries a test that fails without it.

Body refreshed: commit list, test counts, flow diagram, dismissed findings.

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


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 11, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 11, 2026 00:39
@sydevs-bot
sydevs-bot requested a review from Ardnived October 11, 2026 00:39
@sydevs-bot sydevs-bot added awaiting bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed awaiting labels Oct 11, 2026
Resolves the one conflict: `version` in `workflow/.claude-plugin/plugin.json`.

Both sides advance the plugin cache key for the same reason, so neither side
could be taken wholesale. The merge base read `3.1.2`. This branch bumped it to
`3.1.3` for its `workflow/lib/**` fix; `main` took it to `3.2.0` for #179's new
`settle-roadmap` skill. Taking `3.1.3` would reinstate a stale cache key against
the new base, and taking `3.2.0` would ship this branch's lib change with no
bump at all — the exact failure `cut-release/SKILL.md:30-32` exists to prevent.
`3.2.1` keeps both: `main`'s minor bump for the new skill, plus a patch for the
fix that rides on top of it.

Everything else merged clean, `docs/why.md` included — #179 touched no `--base`
call site, so this branch's `origin/main` invariant still holds across the tree.

Gate: `claude plugin validate ./workflow --strict` passes.
`node --test dispatcher/test/*.test.mjs` 214/214.
`node --test workflow/lib/*.test.mjs` 55/57 — the two failures are
`payload.test.mjs`'s worktree-path tests, which pass from the main checkout and
fail inside `.claude/worktrees/<slug>` on `main` too. Pre-existing, tracked as
 #176.

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

Copy link
Copy Markdown
Contributor Author

🧶 Merged origin/main (b5d49af, #179). One conflict: version in workflow/.claude-plugin/plugin.json.

Both sides bump the plugin cache key, so neither could be taken whole. The base read 3.1.2, this branch 3.1.3, main 3.2.0 for its new settle-roadmap skill. Resolved to 3.2.1: main's minor for the new skill, plus the patch cut-release/SKILL.md:30-32 requires for this branch's workflow/lib/** change. 3.1.3 would reinstate a stale key against the new base. 3.2.0 would ship the lib change unbumped.

This supersedes the body's 3.1.3 note.

Everything else merged clean, docs/why.md included. #179 added no --base call site, so this branch's origin/main invariant still holds tree-wide.

Gate: claude plugin validate ./workflow --strict ✓ · node --test dispatcher/test/*.test.mjs 214/214 ✓ · node --test workflow/lib/*.test.mjs 55/57 — the two are payload.test.mjs's worktree-path tests, which fail inside a worktree on main too (#176).

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


Generated by Claude Code

@sydevs-bot sydevs-bot added awaiting and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 11, 2026
@Ardnived
Ardnived merged commit 30304c5 into main Oct 11, 2026
12 checks passed
@Ardnived
Ardnived deleted the claude/fix-162-base-ref branch October 11, 2026 19:27
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.

fix(loop): three base-ref scripts trust a stale local main

3 participants