Skip to content

fix: ship idempotency + skill prefix name patching (v0.14.3.0) - #693

Merged
garrytan merged 9 commits into
mainfrom
garrytan/fix-high-pri-issues
Mar 31, 2026
Merged

garrytan merged 9 commits into
mainfrom
garrytan/fix-high-pri-issues

Conversation

@garrytan

Copy link
Copy Markdown
Owner

Summary

Fixes three high-priority community issues. #566 (bun.lock gitignored) was already fixed on main.

Ship idempotency (#649)

  • Step 4: VERSION guard — skips bump if already differs from base branch
  • Step 7: Push guard — fetches only the specific branch, skips if already up to date
  • Step 8: PR upsert — updates existing PR body via gh pr edit instead of creating duplicate
  • No CHANGELOG guard needed — Step 5 is already idempotent by design

Skill prefix name patching (#620, #578)

  • New bin/gstack-patch-names shared helper patches name: in SKILL.md frontmatter
  • setup and gstack-relink both call it after symlink creation
  • gen-skill-docs.ts prints warning when skill_prefix: true detected
  • Edge cases: gstack-upgrade not double-prefixed, root gstack never prefixed, no-frontmatter is a no-op

Test Coverage

Tests: 10 relink tests (4 new for name patching), 289 gen-skill-docs tests (2 new for prefix warning), 1 E2E test for ship idempotency (periodic tier).

All new code paths have test coverage.

Pre-Landing Review

Eng review cleared (PLAN mode, 10 issues resolved, 0 unresolved). Codex outside voice ran with 3 findings accepted (deterministic generation, CHANGELOG guard removal, PR upsert).

Eval Results

No prompt-related files changed — evals skipped.

Plan Completion

All plan items addressed. Ship idempotency guards at Steps 4, 7, 8. Prefix patching via shared helper. Tests for all new code paths. Gen-skill-docs warning for prefix mode.

TODOS

No TODO items completed in this PR.

Test plan

  • All bun tests pass (exit code 0)
  • gen-skill-docs regeneration succeeds
  • relink tests verify name: patching (prefix on/off, edge cases)
  • gen-skill-docs tests verify prefix warning

🤖 Generated with Claude Code

garrytan and others added 5 commits March 30, 2026 19:38
If git push succeeds but gh pr create fails, re-running /ship would
double-bump VERSION and duplicate CHANGELOG entries. Now:
- Step 4: check if VERSION already differs from base branch
- Step 7: fetch only the specific branch, skip push if already up to date
- Step 8: if PR exists, update body via gh pr edit instead of creating duplicate

No CHANGELOG guard needed — Step 5 is already idempotent by design
("replace existing entries with one unified entry").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
./setup --prefix creates gstack-* symlinks but SKILL.md still says
name: qa, so Claude Code ignores the prefix. Now:
- New bin/gstack-patch-names shared helper patches name: field via sed
- setup calls it after link_claude_skill_dirs
- gstack-relink calls it after symlink loop
- gen-skill-docs.ts prints warning when skill_prefix is true

Edge cases: gstack-upgrade not double-prefixed, root gstack skill
never prefixed, prefix removal restores original names, SKILL.md
without frontmatter is a safe no-op.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 4 unit tests for name: patching in relink.test.ts (prefix on/off,
  gstack-upgrade not double-prefixed, no-frontmatter no-op)
- 2 tests for gen-skill-docs prefix warning
- 1 E2E test for ship idempotency (periodic tier)
- Updated setupMockInstall to write SKILL.md with proper frontmatter
- Added ship-idempotency touchfiles + tier classification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

E2E Evals: ✅ PASS

68/68 tests passed | $7.10 total cost | 12 parallel runners

Suite Result Status Cost
e2e-browse 8/8 ✅ $0.3
e2e-deploy 6/6 ✅ $1.04
e2e-design 3/3 ✅ $0.53
e2e-plan 7/7 ✅ $1.09
e2e-qa-workflow 3/3 ✅ $0.97
e2e-review 6/6 ✅ $1.09
e2e-workflow 4/4 ✅ $0.54
llm-judge 25/25 ✅ $0.5
e2e-deploy 6/6 ✅ $1.04

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

garrytan and others added 4 commits March 30, 2026 20:47
…e.json

- Step 8 PR guard now checks state==OPEN so closed PRs don't prevent
  new PR creation (adversarial review finding)
- Remove duplicate ship-idempotency entry in E2E_TOUCHFILES
- Sync package.json version to 0.14.3.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… bug

gstack-patch-names must run BEFORE link_claude_skill_dirs so symlink
names reflect the correct (patched) name: values. Previously, switching
from --prefix to --no-prefix would read stale gstack-* names from
SKILL.md and create wrong symlinks. (Codex adversarial finding)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Main landed v0.14.3.0 (adversarial review + scope drift) while our
branch also used v0.14.3.0. Resolved by bumping our entry to v0.14.4.0
and keeping both entries in sequence. Updated VERSION and package.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Main landed v0.14.4.0 (Review Army) while our branch also had v0.14.4.0.
Resolved by bumping our entry to v0.14.5.0 and keeping both entries in
sequence. touchfiles.ts and gen-skill-docs.test.ts auto-merged cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@garrytan
garrytan merged commit 7ea6ead into main Mar 31, 2026
18 checks passed
24601 added a commit to 24601/gastack that referenced this pull request Apr 1, 2026
Syncs 5 upstream commits:
- feat: /design-html works from any starting point (v0.15.1.0) (garrytan#734)
- feat: Session Intelligence Layer — /checkpoint + /health + context recovery (v0.15.0.0) (garrytan#733)
- feat: recursive self-improvement — operational learning + full skill wiring (v0.13.8.0) (garrytan#647)
- feat: session intelligence roadmap + design doc (garrytan#727)
- fix: ship idempotency + skill prefix name patching (v0.14.3.0) (garrytan#693)

New skills: /checkpoint, /health (session intelligence layer)
New files: bin/gstack-patch-names, bin/gstack-timeline-log, bin/gstack-timeline-read
Design doc: SESSION_INTELLIGENCE.md

Conflict resolved: README.md (kept our gap diagram + upstream's full README rewrite)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mathiasmora2232 pushed a commit to mathiasmora2232/gstack that referenced this pull request May 30, 2026
…tan#693)

* fix: add idempotency guards to /ship Steps 4, 7, 8 (garrytan#649)

If git push succeeds but gh pr create fails, re-running /ship would
double-bump VERSION and duplicate CHANGELOG entries. Now:
- Step 4: check if VERSION already differs from base branch
- Step 7: fetch only the specific branch, skip push if already up to date
- Step 8: if PR exists, update body via gh pr edit instead of creating duplicate

No CHANGELOG guard needed — Step 5 is already idempotent by design
("replace existing entries with one unified entry").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: patch name: in SKILL.md frontmatter for prefix mode (garrytan#620, garrytan#578)

./setup --prefix creates gstack-* symlinks but SKILL.md still says
name: qa, so Claude Code ignores the prefix. Now:
- New bin/gstack-patch-names shared helper patches name: field via sed
- setup calls it after link_claude_skill_dirs
- gstack-relink calls it after symlink loop
- gen-skill-docs.ts prints warning when skill_prefix is true

Edge cases: gstack-upgrade not double-prefixed, root gstack skill
never prefixed, prefix removal restores original names, SKILL.md
without frontmatter is a safe no-op.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: add name patching + ship idempotency tests (garrytan#620, garrytan#649)

- 4 unit tests for name: patching in relink.test.ts (prefix on/off,
  gstack-upgrade not double-prefixed, no-frontmatter no-op)
- 2 tests for gen-skill-docs prefix warning
- 1 E2E test for ship idempotency (periodic tier)
- Updated setupMockInstall to write SKILL.md with proper frontmatter
- Added ship-idempotency touchfiles + tier classification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bump version and changelog (v0.14.3.0)

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

* fix: PR idempotency checks open state, dedupe touchfiles, sync package.json

- Step 8 PR guard now checks state==OPEN so closed PRs don't prevent
  new PR creation (adversarial review finding)
- Remove duplicate ship-idempotency entry in E2E_TOUCHFILES
- Sync package.json version to 0.14.3.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: patch name: before creating symlinks to fix --no-prefix ordering bug

gstack-patch-names must run BEFORE link_claude_skill_dirs so symlink
names reflect the correct (patched) name: values. Previously, switching
from --prefix to --no-prefix would read stale gstack-* names from
SKILL.md and create wrong symlinks. (Codex adversarial finding)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
saurrx pushed a commit to saurrx/gstack that referenced this pull request Jun 26, 2026
saurrx pushed a commit to saurrx/gstack that referenced this pull request Jul 22, 2026
saurrx pushed a commit to saurrx/gstack that referenced this pull request Aug 5, 2026
saurrx pushed a commit to saurrx/gstack that referenced this pull request Aug 5, 2026
saurrx pushed a commit to saurrx/gstack that referenced this pull request Aug 27, 2026
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