8000 fix(base): honest launch status (#24) by simon-inkie · Pull Request #46 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

fix(base): honest launch status (#24) - #46

Merged
simon-inkie merged 3 commits into
mainfrom
io/deck-24-launch-status-honest
Oct 11, 2026
Merged

simon-inkie merged 3 commits into
mainfrom
io/deck-24-launch-status-honest

Conversation

@simon-inkie
Copy link
Copy Markdown
Owner

Closes #24.

Reviewed at 1b40abf, two independent legs (CodeRabbit is off):

  • Sol 6.1: PASS with notes
  • Aggy (Gemini 3.8 Flash): PASS, tests green, public hygiene clean

Both reviews checked that the tests fail without the change.

🤖 Generated with Claude Code

https://claude.ai/code/session_018uNaFhmK6yxSR7XfzJDY3Z

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018uNaFhmK6yxSR7XfzJDY3Z
Signed-off-by: Simon <simon@inkie.ink>
@simon-inkie
Copy link
Copy Markdown
Owner Author

Review, Sonnet, 2026-10-02

PR 46 (deck issue 24, honest launch status). SHA reviewed: 1b40abf

Verdict: NEEDS CHANGES (2 Major)

Ran bash packages/base/test/boot-agents.test.sh: 64 passed, 0 failed. The new full-boot fixtures assert exit codes, the labels and the absence of the old "launched + armed" string, so they would fail against the old script. Hygiene grep of the added lines found nothing internal (the .env.secrets hit is pre-existing text in a moved line).

Critical

None.

Major

  1. Readiness window is about 5 seconds, so slow-but-healthy agents are reported as waiting and silently lose auto-arm. packages/base/bin/boot-agents.sh, wait_for_readiness (about lines 541-562): 5 attempts with sleep 1. The code it replaces waited up to 45s for the runtime and then 6s to settle. A Claude resume of a large session, or a loaded box, routinely takes longer than 5s. Consequence: the agent is counted WAITING (exit 3), is not added to FRESH, so the monitor-arming loop never runs for it, and INSTALL.md says an existing session "is not automatically re-armed" on the next run. So a healthy agent permanently misses its monitor unless the user arms it by hand. Fix: make the budget configurable and larger (for example BOOT_READY_SECS, default 45), keep the early break on a recognised manual prompt, and add the agent to FRESH when it was freshly launched even if readiness is pending, or state clearly that re-running will not arm it. Add a fixture where readiness only appears on the Nth capture.

  2. "Already up" agents are classified by the same strict readiness test, so a healthy long-running agent reports waiting and the script exits 3 on every idempotent re-run. INSTALL.md says the launcher is "safe to fire on boot". pane_readiness returns not-ready when (a) the runtime is busy (check_idle true, "runtime busy"), and (b) for Codex, the OpenAI Codex banner is no longer inside tail -n 30 of the pane, which is the normal state after any real conversation ("unrecognised screen"). Fix: for outcome == skipped only distinguish known first-run prompts (trust, resume picker, fullscreen, approval) from everything else, and treat busy or no-banner as "already up". Add fixtures for a busy existing agent and an existing Codex pane with no banner in the tail.

Minor

  1. wait_for_readiness matches fullscreen|full.screen and resume a conversation|... anywhere in the last 30 lines of a pane that failed readiness. A busy agent whose output merely mentions those phrases is labelled with a first-run prompt and told to "answer manually". The history fixture only covers the ready path. Fix: anchor to the rendered dialog (start of line, as the stuck-pane classifier does in fix(base): anchor stuck-pane literals to the start of a rendered line #20) or require the preselected-option glyph on a nearby line.

  2. Monitor confirmation compares a grep -c count against a baseline (boot-agents.sh, arming loop). If the pane scrolls, an old Monitor started line can leave the 30-ish line capture and the count can fail to exceed the baseline, giving a false "unconfirmed" (the safe direction, but it will resend "arm your monitor" up to 4 times and may start duplicate monitors). Fix: capture with -S - bounded history, or compare the last matching line's content plus a timestamp, and cap resends to one.

  3. sed -E 's/\xc2\xa0//g' relies on GNU sed \x escapes. Fine on Ubuntu and WSL, wrong on BSD sed. Use $'\xc2\xa0' or perl, or note Linux-only.

  4. Exit 3 is a new contract for any caller that runs the launcher from cron or a unit. INSTALL.md documents 1 and 3 but not that a boot unit would now be marked failed on a healthy first boot that needs a trust answer. One sentence in INSTALL.md would do.

  5. Scope: the PR also rewrites the monitor arming (pattern, baseline, retries) which issue 24 did not ask for. It is coherent, but it enlarges the review surface; worth saying in the PR description.

Nit

  1. boot-agents.sh launch_agent: tmux new-window ... >/dev/null || return 1 after a grep -qx || chain reads ambiguously; add parentheses or split into an if.
  2. The INSTALL.md paragraph is one dense block; split the exit-status sentence into a short list.

Not checked

  • Real Claude Code or Codex first-run screens on a live install; classifier behaviour is judged from the fixtures only.
  • macOS or BSD tooling.
  • Behaviour with Gemini or other custom runtimes in pane_readiness (runtime ##*/ branch).
  • CI run on the PR.

…review fixes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Simon <simon@inkie.ink>
@simon-inkie
Copy link
Copy Markdown
Owner Author

Review fixes pushed at c95d661: readiness wait restored to 45s (BOOT_READY_SECS), and already-up busy panes no longer fail a re-run.

Review legs on c95d661:

  • Sonnet: PASS with notes (82/82 shell checks; the new tests fail 9 checks against the old script)
  • Aggy (Gemini): PASS

Minor notes left open: existing panes report ready for any live node process; a dead launch waits the full 45s; worst-case boot can exceed a 90s unit timeout.

Keep main's pinned first-boot session ids and provider launch envelope
alongside this branch's honest launch status and failure propagation.
The Codex send-failure fixture now uses a sandboxed provider home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018uNaFhmK6yxSR7XfzJDY3Z
Signed-off-by: Simon <simon@inkie.ink>
@simon-inkie
simon-inkie merged commit b3678f0 into main Oct 11, 2026
4 checks passed
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.

boot-agents.sh reports "launched + armed" while the pane is waiting on a Claude Code prompt

1 participant

0