Skip to content

fix: six script bugs (ste-check, status, learnings, file modes, HOME, concurrent merges) - #196

Merged
savvides merged 4 commits into
mainfrom
claude/bugs-scripts
Nov 13, 2026
Merged

savvides merged 4 commits into
mainfrom
claude/bugs-scripts

Conversation

@savvides

@savvides savvides commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Fixes

Exit-code deviation from the task text

Exit 7 of idstack-manifest-merge already means "manifest from a newer idstack", so I could not use 7 for the HOME guard. HOME guard is 9 (merge and migrate), --expect-updated is 8, as specified. Both are in the script header and docs/cli-reference.md.

#179 reproduction

Two background loops, 50 merges each, different sections (quality_review, red_team_audit), 5 rounds, final value should be 50 and 50.

  • Before the lock: lost updates in 4 of 5 rounds (for example quality=48, 49, 45, red=49).
  • After the lock: 0 of 5 rounds lose an update.
  • Stale read (read updated, another merge writes, first merge writes back): reproduced by test; with --expect-updated it exits 8 and the manifest is unchanged.

Tests

  • Mutation cases 66a-66i, run from a frozen copy: 9 guarded, 0 not guarded. The stale-anchor check over the whole file: 0 ERROR (200 cases matched).
  • Suites: smoke 655/655, integration 59/59, test-setup 10/10, test-status 34/34, test-manifest-merge 53/53, test-skill-shell-zsh 161/161, test-doctor 18/18, test-ste-check 37 OK, test-report-section 41 OK, test-extension all pass, check-doc-accuracy exit 0.
  • CLAUDE.md counts: integration 59, status 34.

Not verified / known limits

  • #171: I could not remove the decision-needed label (gh issue edit was blocked in this session). Please run gh issue edit 171 --remove-label decision-needed.
  • Two sessions that run the same skill in one folder still share a draft (the name has the skill, not the session).
  • --expect-updated has a 1-second resolution (updated is in seconds). No skill template passes it yet: this PR adds the option only, and I did not edit the templates beyond the scratch name.
  • The lock uses fcntl (macOS and Linux only). The canvas-push/ scratch name in Two sessions in one course folder can lose manifest updates #179 is not changed (not in the task).
  • The mutation case 66g depends on a race, so it relies on 40 writes for each of 2 writers. It was GUARDED in my run.
  • Not run: the full 2.5 h mutation suite, Windows, the Claude desktop app.

Closes #173
Closes #172
Closes #171
Closes #190
Closes #178
Refs #179

#179: the lock and --expect-updated are here. The skill templates pass --expect-updated in #197. The canvas-push/ scratch folder, and two sessions that run the same skill in one folder, still share a name. I close #179 by hand after both PRs merge, with these limits on the issue.

#178: the guard is on the manifest write path only. idstack-timeline-log, idstack-learnings log and idstack-report-section init can still create files under ~/.idstack.

🤖 Generated with Claude Code

savvides and others added 4 commits November 13, 2026 09:35
… concurrent merges)

Closes the script bugs #173, #172 (part 2), #171, #190, #178 and #179.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@savvides
savvides merged commit 221279e into main Nov 13, 2026
6 checks passed
@savvides
savvides deleted the claude/bugs-scripts branch November 13, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment