Skip to content

v1.26.1.0 fix: gbrain-sync orchestrator resolves sibling via import.meta.dir#1312

Merged
garrytan merged 3 commits intomainfrom
garrytan/gbrain-sync-sibling-path
May 4, 2026
Merged

v1.26.1.0 fix: gbrain-sync orchestrator resolves sibling via import.meta.dir#1312
garrytan merged 3 commits intomainfrom
garrytan/gbrain-sync-sibling-path

Conversation

@garrytan
Copy link
Copy Markdown
Owner

@garrytan garrytan commented May 4, 2026

Summary

Source fix (1 line): bin/gstack-gbrain-sync.ts:222runBrainSyncPush now resolves its sibling gstack-brain-sync binary via join(import.meta.dir, "gstack-brain-sync") instead of a hardcoded ~/.claude/skills/gstack/bin/... path. This matches the pattern already in runMemoryIngest at line 193.

The orchestrator's curated-git-push stage now fires from any host install — Claude Code, Codex CLI, dev workspace — instead of silently no-op'ing with "skipped (gstack-brain-sync not installed)" outside the Claude Code install root. Closes Codex outside-voice finding M9.

Maintenance bundled in:

  • Test ratchet: plan-review preamble byte budget bumped 33 KB → 34 KB. v1.25.1.0 (recommendation pattern) + v1.26.0.0 (gbrain sync block) added intentional preamble bytes; the ratchet just hadn't been bumped to track. Comment in the test already authorizes this kind of intentional-growth bump.
  • Golden fixtures: claude-ship-SKILL.md and factory-ship-SKILL.md regenerated against the live /ship template. v1.25.1.0 added the canonical Recommendation: <action> because ... line to the adversarial subagent prompts; the goldens hadn't been re-baked.

Commits

0fd81ffd chore: bump version and changelog (v1.26.1.0)
5dcb93a5 chore: bump plan-review preamble ratchet + regenerate ship goldens
9c638da2 fix: gbrain-sync orchestrator resolves brain-sync sibling via import.meta.dir

Test Coverage

New regression test in test/gstack-gbrain-sync.test.ts runs the orchestrator with a synthetic HOME (no ~/.claude/skills/gstack tree), then asserts the lying-skip path is no longer taken. Pre-fix: "skipped (gstack-brain-sync not installed)". Post-fix: real spawn output (or honest spawn-error code), never the misleading skip message.

The existing runMemoryIngest precedent has no path-resolution test; this PR establishes the pattern. Out-of-scope to retroactively cover runMemoryIngest here.

Tests: 456 → 457 (+1 new). 0 fails.

End-to-end smoke from this Conductor workspace:

bun run bin/gstack-gbrain-sync.ts --incremental --no-code --no-memory --quiet
# .gbrain-sync-state.json: {"name":"brain-sync","ran":true,"ok":true,"summary":"curated artifacts pushed"}

Pre-Landing Review

Diff scope: 24 source-impacting lines + 5 lines of fixture regen. No SQL, no LLM trust boundary, no conditional side effects, no auth surface. Claude adversarial subagent skipped for proportionality — the Codex M9 finding IS the outside voice on record for the source change, and the maintenance work (ratchet + goldens) is mechanical sync to existing template state.

Plan Review

/plan-eng-review ran on this branch and returned CLEAR with 1 test gap resolved (the regression test above). See plan file for full review report.

Test plan

  • bun test test/gstack-gbrain-sync.test.ts — 9 pass (8 existing + 1 new regression)
  • bun test test/gen-skill-docs.test.ts — 374 pass, including the Option A budget test that was red on origin/main
  • bun test test/host-config.test.ts — 73 pass, including all three ship-skill golden-file regressions
  • End-to-end smoke from a non-~/.claude/skills/gstack/ workspace returns summary: "curated artifacts pushed" instead of the misleading skip message

🤖 Generated with Claude Code


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

garrytan and others added 3 commits May 3, 2026 20:03
…meta.dir

Codex M9: runBrainSyncPush hardcoded ~/.claude/skills/gstack/bin/gstack-brain-sync,
so any host that wasn't Claude Code (Codex CLI, dev workspace) hit the existsSync
guard and silently skipped curated-artifact push. Replace with the sibling-resolution
pattern already in runMemoryIngest at line 193.

Regression test asserts the orchestrator no longer takes the lying-skip path when
HOME has no ~/.claude/skills/gstack tree.
The 33 KB preamble byte budget hadn't been bumped through v1.25.1.0
(AskUserQuestion recommendation pattern) and v1.26.0.0 (gbrain sync block).
plan-ceo-review SKILL.md sat at 33,018 bytes — 18 over the ratchet. Comment
in the test already authorizes this kind of intentional-growth bump.
Lifted to 34 KB which gives ~700 B of headroom for the next preamble change.

claude-ship-SKILL.md and factory-ship-SKILL.md golden fixtures regenerated
against the live /ship template — v1.25.1.0 added the canonical
"Recommendation: <action> because ..." line to the adversarial subagent
prompts but the goldens were never re-baked.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

E2E Evals: ✅ PASS

0/0 tests passed | $0 total cost | 12 parallel runners

Suite Result Status Cost

12x ubicloud-standard-2 (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite

@garrytan garrytan merged commit a0bfa00 into main May 4, 2026
23 of 24 checks passed
gonnabe88 pushed a commit to gonnabe88/gstack that referenced this pull request May 9, 2026
…eta.dir (garrytan#1312)

* fix: gbrain-sync orchestrator resolves brain-sync sibling via import.meta.dir

Codex M9: runBrainSyncPush hardcoded ~/.claude/skills/gstack/bin/gstack-brain-sync,
so any host that wasn't Claude Code (Codex CLI, dev workspace) hit the existsSync
guard and silently skipped curated-artifact push. Replace with the sibling-resolution
pattern already in runMemoryIngest at line 193.

Regression test asserts the orchestrator no longer takes the lying-skip path when
HOME has no ~/.claude/skills/gstack tree.

* chore: bump plan-review preamble ratchet + regenerate ship goldens

The 33 KB preamble byte budget hadn't been bumped through v1.25.1.0
(AskUserQuestion recommendation pattern) and v1.26.0.0 (gbrain sync block).
plan-ceo-review SKILL.md sat at 33,018 bytes — 18 over the ratchet. Comment
in the test already authorizes this kind of intentional-growth bump.
Lifted to 34 KB which gives ~700 B of headroom for the next preamble change.

claude-ship-SKILL.md and factory-ship-SKILL.md golden fixtures regenerated
against the live /ship template — v1.25.1.0 added the canonical
"Recommendation: <action> because ..." line to the adversarial subagent
prompts but the goldens were never re-baked.

* chore: bump version and changelog (v1.26.1.0)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant