Skip to content

Centralize planning bootstrap command authority - #179

Merged
bigboateng merged 3 commits into
mainfrom
fix/bootstrap-command-authority
Aug 10, 2026
Merged

Centralize planning bootstrap command authority#179
bigboateng merged 3 commits into
mainfrom
fix/bootstrap-command-authority

Conversation

@bigboateng

@bigboateng bigboateng commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This change removes split authority for constructing the first managed planning command.

Before a feature candidate exists, lifecycle status cannot authorize creation. Generated instructions therefore had to construct planning-write themselves, which allowed embedded and detached workspace behavior to diverge. On PowerShell, the same path also failed to preserve the full native-process result: piped Markdown could gain a BOM or CRLF line endings, and a rejected helper could still appear successful because $LASTEXITCODE was not propagated.

flow bootstrap is now the canonical read-only boundary for this transition. It validates explicit creation intent and returns one prescription bound to the current worktree, runtime helper, source-plan path and digest, feature, artifact, and shell. Generated guidance uses that prescription and resolves it again from the destination returned by workspace-cut.

PowerShell transport is normalized at bootstrap, admission, and mutation ingress. The rendered envelope propagates helper failure status, and admission rejects envelopes that omit or displace that propagation.

Preserved invariants

  • lifecycle status does not create unknown features
  • first write requires a valid feature slug and current in-worktree source evidence
  • helper and repository identity remain bound to the selected workspace
  • raw managed-path writes, spoofed helpers, mixed roots, and malformed envelopes fail closed
  • existing saved drafts require no migration
  • embedded and detached modes share the same resolver contract

Conformance

The deterministic harness exports Boatstack into temporary synthetic repositories, obtains the command from flow bootstrap, replays Cursor, Claude, Codex, and Gemini hook payloads, executes the admitted command in real shells, and verifies exact artifact bytes and failure status.

Required conformance uses no provider APIs, API keys, installed host applications, network access, or logged-in sessions.

Test Plan

  • go build ./...
  • go vet ./...
  • go test ./... -count=1 -timeout=12m
  • python3 -m unittest discover -s .github/tests -p "test_*.py" -v
  • python3 .github/scripts/release_notes.py validate --repo .
  • python3 .github/scripts/release_notes.py preflight --repo . --base-branch main
  • required GitHub Actions matrix: Ubuntu, macOS, and Windows shards 0–5

Release note: release-notes/2026-08-10-bootstrap-command-authority.md

@bigboateng
bigboateng merged commit 11e56e1 into main Aug 10, 2026
9 checks passed
@bigboateng
bigboateng deleted the fix/bootstrap-command-authority branch August 10, 2026 08:26
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