Skip to content

Add Background Bash Discipline to ensign shared-core (BashOutput polling)#122

Merged
clkao merged 3 commits into
mainfrom
spacedock-ensign/ensign-bash-poll-not-sleep
Apr 18, 2026
Merged

Add Background Bash Discipline to ensign shared-core (BashOutput polling)#122
clkao merged 3 commits into
mainfrom
spacedock-ensign/ensign-bash-poll-not-sleep

Conversation

@clkao

@clkao clkao commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

Add a ## Background Bash Discipline subsection to the ensign shared-core so agents use BashOutput polling on background commands instead of blocking sleep.

What changed

  • Insert ## Background Bash Discipline subsection in skills/ensign/references/ensign-shared-core.md, between ## Rules and ## Stage Report Protocol
  • Describe the five-step Bash(run_in_background) → BashOutput(bash_id) → status == "completed" polling loop
  • State the anti-pattern explicitly: sleep N && tail wastes wallclock and makes the agent uninterruptible
  • FO shared-core left unchanged per AC-5 (YAGNI — FOs dispatch via SendMessage, not multi-minute background shells)

Evidence

  • Static suite: 426 passed, 22 deselected
  • AC-2 evergreen-tone grep: 0 forbidden-token hits (no model names, no (see #NNN), no temporal phrasing) inside the new subsection
  • AC-4 live behavioral run skipped with rationale: the suggested test (test_feedback_keepalive) does not exercise Bash(run_in_background=true), and the harness does not capture ensign-subprocess tool_use events; captain accepted SKIP

#183

clkao added 3 commits April 17, 2026 17:46
Document the BashOutput polling pattern for waiting on
`Bash(run_in_background: true)` tasks, and the anti-pattern of a
single blocking `sleep N && tail` sized to worst-case duration.

Inserted between `## Rules` and `## Stage Report Protocol` in
ensign-shared-core.md so both Claude and Codex ensigns pick it up.

Refs: #183
clkao added a commit that referenced this pull request Apr 18, 2026
@clkao clkao merged commit 7c35aad into main Apr 18, 2026
3 of 5 checks passed
clkao added a commit that referenced this pull request Apr 18, 2026
clkao added a commit that referenced this pull request Apr 18, 2026
…tatus: done)

AC-1 re-verified, AC-2 dependency map written at implementation kickoff.
AC-3 live diagnosis SKIPPED per dispatch step 3 (#183 is status: validation,
PR #122 not yet merged — running AC-3 now would produce fo-logs whose
timing is dominated by Category-B ensign blocking-sleep, defeating the
symptom-(i)/(ii)/(iii)/(iv) distinction per the entity body's evidence-
integrity rationale).

Recorded AC-3 prep scaffolding (test invocation, artifact-capture snippet,
per-event summary template, task_id emitter-attribution plan) so the next
implementation pass can start AC-3 immediately after #183 merges.

AC-4/AC-5/AC-6 SKIPPED as downstream of AC-3. AC-7 N/A in this blocked
cycle (zero workflow diffs). No production-code edits.
clkao added a commit that referenced this pull request Apr 18, 2026
…tatus: done)

AC-1 re-verified, AC-2 dependency map written at implementation kickoff.
AC-3 live diagnosis SKIPPED per dispatch step 3 (#183 is status: validation,
PR #122 not yet merged — running AC-3 now would produce fo-logs whose
timing is dominated by Category-B ensign blocking-sleep, defeating the
symptom-(i)/(ii)/(iii)/(iv) distinction per the entity body's evidence-
integrity rationale).

Recorded AC-3 prep scaffolding (test invocation, artifact-capture snippet,
per-event summary template, task_id emitter-attribution plan) so the next
implementation pass can start AC-3 immediately after #183 merges.

AC-4/AC-5/AC-6 SKIPPED as downstream of AC-3. AC-7 N/A in this blocked
cycle (zero workflow diffs). No production-code edits.
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.

1 participant