Fix state handling, harden shared scripts, make branch flow dynamic (2.1.1)#2
Open
Cofy-ME wants to merge 2 commits into
Open
Fix state handling, harden shared scripts, make branch flow dynamic (2.1.1)#2Cofy-ME wants to merge 2 commits into
Cofy-ME wants to merge 2 commits into
Conversation
- Add per-skill wrapper scripts (start/resume/reset/show) for codex-implement, codex-code-review, and codex-ask so STATE_DIR is pinned by the script itself instead of shell-export choreography - Add key.sh and use it in TRIP-3-release to reuse the shared target_key derivation (fixes wrong state lookup for free-form labels) - Rewrite load_prompt substitution: literal-safe (&, backslashes) and terminating when a value quotes its own placeholder - Add missing state/.gitignore for codex-implement and codex-ask - Make TRIP-2/TRIP-3/TRIP-hotfix base-branch agnostic via a branch.<name>.trip-base config entry recorded at branch creation - Ask which branch to push (listing available branches) in TRIP-3-release and TRIP-hotfix unless one was specified - Fix stale v1 references (week formula location, synthesize version step, tutorial step renumbering), unify ARCHI token thresholds, add requirements note and typo fixes in README - Add tests/workflow-regression.sh covering the script-level fixes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Robustness fixes for the shared Codex scripts plus two workflow improvements, found while reviewing and exercising the skills. Includes a proposed 2.1.1 version bump and a backfilled
CHANGELOG.md— feel free to drop that commit if you prefer to handle versioning yourself.Bug fixes
STATE_DIRexport footgun:codex-implement,codex-code-review, andcodex-askrelied onexport STATE_DIR=...before calling the shared scripts, but agent harnesses run each command in a fresh shell. A forgotten export maderesume.shsilently resume the plan-review thread for the same plan path — reviewer model, read-only sandbox, implement prompt. Each skill now ships tiny wrapper scripts (start/resume/reset/show) that pin their ownSTATE_DIRand delegate; all SKILL.md docs call the wrappers and the export choreography is gone.codex-implement/start.shalso pins unconditionally now.TRIP-3-releasere-derived the review state key inline with an unconditionalrealpath, which disagrees withtarget_key()for non-path targets (unplanned-work labels) — a converged Codex review got silently treated as "skipped". Newkey.shexposes the shared derivation and TRIP-3 uses it.load_promptcorruption and hang: the awk-v/gsubsubstitution mangled values containing&or backslashes (implementer notes like"Fixed X & Y"injected the literal placeholder text), and could loop forever if a value quoted its own placeholder. Rewritten withENVIRON+ literal splice.state/.gitignoreforcodex-implementandcodex-ask—git add -Aduring release committed thread IDs, reports, and event logs.Workflow changes
branch.<name>.trip-basegit config) and release/hotfix merge back into it — no more[MAIN_BRANCH]placeholder. Verified end-to-end in a scratch repo, including git auto-removing the config entry onbranch -d.origin <branch>explicitly instead of a baregit push. Hotfix also enforces--ff-onlylike release.Tests
tests/workflow-regression.shcovers the script-level fixes: literal-safe substitution, self-referencing placeholder termination (undertimeout), shared key derivation for labels, wrapper state isolation (run against a sandboxed copy of the tree), and state.gitignorepresence.Docs: README requirements note (Bash, Codex CLI,
jq, GNU coreutils), unified ARCHI token thresholds, typo fixes.🤖 Generated with Claude Code