feat(bringup): [SI-15][SI-19] plan-symlink + wake-prompt templater#186
Merged
Merged
Conversation
… templater SI-15: full-bringup symlinks the priority plan into every metadata .writable_roots[] path so 'colony plan status' invoked from any worker's cwd resolves (observed 2026-05-18: workers cd into polymarket-cli, plan lives in codex-fleetui, colony errors ENOENT). SI-19: new wake-prompt-templater daemon writes /tmp/codex-fleet- wake-prompt.md every 30s with the LIVE next-available subtask from Colony, instead of a stale hardcoded snapshot from bringup time (observed: workers re-read the same stale prompt referencing the long-merged TE-2 subtask every loop iteration). Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Combined PR because both edit full-bringup.sh.
Summary
${writable_root}/openspec/plans/${slug}→${REPO}/openspec/plans/${slug}for every path in the priority plan'smetadata.writable_roots[]that lives outside this repo. Idempotent (ln -sfn). down.sh reads.codex-fleet/active-plan+ walks the writable_roots to unlink. Closes the ENOENT pathology where workers cd into a writable root (e.g. polymarket-cli) andcolony plan status <slug>fails because the plan workspace only exists in codex-fleetui.wake-prompt-templater.shdaemon runs as a fleet-ticker window. Every 30s it reads.codex-fleet/active-plan, queriescolony task ready --jsonfor the next claimable subtask, and atomically rendersscripts/codex-fleet/wake-prompt.template.md→/tmp/codex-fleet-wake-prompt.md. When no subtask is available, an EXHAUSTED notice is substituted instead. Workers re-reading the wake prompt on every loop iteration now see the live next-task pointer, not the stale snapshot bringup captured at fleet start..codex-fleet/active-planso down.sh + the new daemon (and the existing pr-babysitter / auto-reviewer / plan-watcher) all read the same canonical pointer.Test plan
bash scripts/codex-fleet/test/run-plan-symlink.sh— foreign root → symlink staged; in-repo root → skipped; re-run idempotent.bash scripts/codex-fleet/test/run-wake-templater.sh— live variant renders slug+title+index from a mocked colony CLI; exhausted variant renders the plan-exhausted notice.bash scripts/codex-fleet/test/run-routing-filter.sh(existing) still passes.bash scripts/codex-fleet/test/run-bringup-publish.sh(existing) still passes.bash -nclean on full-bringup.sh, down.sh, wake-prompt-templater.sh, and both new tests.(shellcheck not available on this host; bash -n + integration tests substituted.)
Robot Generated with Claude Code