fix(orchestrate),feat(wiki): cmd_send pasted-text guard, $TMUX-gated status writes + failed-reset playbook, wiki gap seeds G1–G6 (#96, #97, #38) - #108
Merged
Conversation
…aceholders (#96) send-prompt.sh's cmd_send could report "delivered" while the prompt was actually sitting unsubmitted as a "[Pasted text #N]" placeholder in the worker's input box -- tmux send-keys reports success as soon as the bytes reach the tty, regardless of whether the CLI consumed them. Field-confirmed 2026-08-17 in the linkly iss0817 run: worker lo-3-iss0817 stalled on [Pasted text #4] until one extra Enter unstuck it. Port the same guard launch-session.sh already uses for the first injection: after the existing queued_pat check, detect the placeholder in the post-send pane capture and retry with Enter, bounded to 3 attempts (LO_PASTED_PATTERN, default "[Pasted text"). A placeholder still present after the bound reports "unconfirmed" (exit 7), never a guessed "delivered". The exit-code contract and one-token stdout are unchanged. Adds 3 send-prompt.bats cases (normal: retry clears it -> delivered; error: persists -> unconfirmed after exactly 3 retries; boundary: queued_pat still wins when both indicators are present) via a scripted fake tmux that returns a different pane capture on each successive call. Verified against a guard-stripped mutant: the normal/error cases fail without the fix. bats tests/send-prompt.bats: 65/65. Full bats tests/: 560/560, no regressions.
…document failed-phase reset (#97) A coordinator-shell caller (outside tmux) running status-update.sh got tmux display-message answering with the server's most-recently-active session instead of its own -- there is no $TMUX check before consulting it. Gate the tmux fallback behind [ -n "${TMUX:-}" ]; STATUS_SESSION still wins unconditionally, and behavior inside tmux or with STATUS_SESSION set is unchanged. Also document, in SKILL.md's exit-6 question playbook, the reset step needed after a worker records phase=failed and the coordinator resolves it via ask-coordinator -- otherwise watch-status.sh keeps counting the stale failed phase and re-aborts with exit 3 on every subsequent poll. The reset is a normal status-update.sh write with the observed phase, not a new phase word. Document STATUS_SESSION for coordinator-side calls in the Session knobs paragraph. Sub-item (c) (stale `error` field surviving merges) is deliberately skipped per plan decision D5 -- nothing reads that field today. Extends tests/status-update.bats with normal/regression/boundary cases for the $TMUX gating; full bats tests/ green (560/560).
Add 6 sourced, lint-clean wiki pages closing the highest-priority wiki-audit gaps: cors-and-preflight, api-versioning-and-breaking-changes (existing api-design category), data-backfill-migrations (existing operations category), feature-flag-lifecycle (existing deploy category), and two new categories — backend/common/architecture (sync-vs-async-integration) and backend/common/realtime (websocket-sse-lifecycle). Register every page in its domain index with a load-when trigger, and extend the root INDEX.md backend route-line for the two new categories per the mechanical index-registration precedent. G1 is scoped to sync-vs-async-integration only; the other two categories.md sub-topics (module-boundaries-and-layering, event-driven-adoption-criteria) are intentionally left out as future ingest candidates on issue #38, not silently dropped. G7-G10 stay open on the issue. Bump tests/wiki-lint-prohibitions.bats' hardcoded corpus count from 61 to 64 directive units (coordinator-approved carve-out, scoped to exactly this one assertion) — the 6 new pages' Do-this/Instead-of rows push the real corpus count past the number the test had frozen. The stale assertion still reported "ok" locally on macOS bash 3.2 due to a [[ ]]/set -e quirk where a non-last failing [[ ]] doesn't abort the test; verified against a bash 5.2 (ubuntu-matching) run that it genuinely fails without this fix, the same CI-only-failure class as PR #94/§O3. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rwv5J7jqNo7Kri2eFNBfc7
Uh oh!
There was an error while loading. Please reload this page.
choiyounggi added a commit
that referenced
this pull request
Aug 17, 2026
… gating, four-lens review, wiki gap seeds (#109) Rolls up everything merged since 1.6.0: - #94: review-time wiki routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages - #93: enforceable prohibition lint rule, disjoint routing scopes, flush concurrency - #102 (#87–#90): {ORCH_DIR} path token, watch-status stall gating + reason surfacing, merge-on-approval - #105 (#99, #100): stale scope-purity guards deleted, launch-session suite isolated from ambient LO_*/GROUNDWORK_* env - #108 (#96, #97, #38): cmd_send [Pasted text] guard with bounded Enter retry, $TMUX-gated status-update session resolution + failed-phase reset playbook, wiki gap seed pages G1–G6 Version bump propagates the send-prompt.sh delivery-confirmation fix to plugin consumers (groundwork references dev-loop by URL; the cache updates on version change). Claude-Session: https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q Co-authored-by: dch0202 <dch0202@infobank.net> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
4 tasks
choiyounggi added a commit
that referenced
this pull request
Aug 20, 2026
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 freeto 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
Orchestration run i969738 — three parallel worker worktrees, disjoint file scopes, octopus-merged.
#96 (76b3322):
send-prompt.sh cmd_sendnow detects the unsubmitted[Pasted text #N]placeholder (the pane-diff false-"delivered" trap), retries with up to 3 bounded Enters mirroringlaunch-session.sh's proven guard, and reportsunconfirmed/exit 7 if it persists. Pattern overridable viaLO_PASTED_PATTERN. Field-motivated: the bug reproduced 4× during this very run's coordination (and once in another project's run earlier today).#97 (72dbd6b):
status-update.shconsultstmux display-messageonly when the caller is actually inside tmux ($TMUXset) — a coordinator shell outside tmux no longer records whatever session happens to be most recently active. SKILL.md now documentsSTATUS_SESSIONfor coordinator-side writes and adds the missing failed-phase reset step to the exit-6 playbook (without it,watch-status.shre-aborts with exit 3 on the next poll). Sub-item (c) (staleerrorfield) deliberately skipped — nothing reads it.#38 (d08eb84): six sourced seed pages close wiki-audit gaps G1–G6:
backend/common/architecture/sync-vs-async-integration(G1, scoped to the sync-vs-queue-vs-event decision table; the two other G1 sub-topics stay in the issue),api-design/cors-and-preflight(G2),api-design/api-versioning-and-breaking-changes(G3),infrastructure/deploy/feature-flag-lifecycle(G4),databases/operations/data-backfill-migrations(G5),backend/common/realtime/websocket-sse-lifecycle(G6). All registered in domain + root indexes;wiki-lint-prohibitions.batscorpus count bumped 61→64 (reviewed carve-out).Test plan
Closes#96
Closes#97
Closes#38
🤖 Generated with Claude Code
https://claude.ai/code/session_014PCWX9umAP1CLZJnaGPV7Q