Skip to content

Report actionable runtime bootstrap failures - #216

Merged
bigboateng merged 3 commits into
mainfrom
fix/runtime-bootstrap-errors
Aug 14, 2026
Merged

Report actionable runtime bootstrap failures#216
bigboateng merged 3 commits into
mainfrom
fix/runtime-bootstrap-errors

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

Summary

  • return stable text and JSON diagnostics when a repository pin or pinned runtime cannot be used
  • add approval-only exact-runtime hydration that does not change repository or controller state
  • project the same missing-launcher recovery contract into generated Codex and Claude skills

Boundary conformance

Boundary: repository launcher to the pinned runtime.

The launcher dispatches only the exact validated runtime. Missing, malformed, non-regular, or checksum-mismatched runtime state fails before Flow or managed-state mutation. Installer hydration requires explicit user approval and writes only the immutable host runtime store and launcher.

Verification

  • python3 .github/scripts/run_go_tests.py (345 tests)
  • go vet ./...
  • go build ./...
  • npm run test:flow-sdk
  • python3 -m unittest discover -s .github/tests -p 'test_*.py' (39 tests; 1 expected failure)
  • python3 .github/scripts/release_notes.py preflight --repo . --base-branch main
  • disposable Todo-Test clone: missing-runtime diagnostic, local unreleased hydration, Flow compile/check, and resumed run delegation

Release note: release-notes/2026-08-14-runtime-bootstrap-errors.md

@cursor

cursor Bot commented Aug 14, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.99

The patch breaks fresh PowerShell installation, permits PowerShell hydration to mutate repository state, and emits recovery commands that cannot restore older pinned releases or enforce the pinned digest. Model-level verification is not required before merge; targeted Windows, historical-installer, and digest-skew regression tests should establish the fixes.

Findings without inline diff anchors

[P1] Do not route PowerShell hydration through installation.update

Invariant: hydration may restore host runtime storage but must not mutate repository/controller state. If the exact runtime already exists—for example, the launcher was deleted while the store remains—BOATSTACK_MODE=hydrate reaches this else and invokes installation.update; that transition can commit a new revision and receipt even when the runtime identity is unchanged. Its refusal is also ignored by the new exit-status condition, after which the script reports success. This behavior is introduced because hydrate was added as a mode without receiving its own no-kernel-action branch. The smallest regression should prepopulate an exact runtime, run PowerShell hydrate, and assert byte-for-byte unchanged repository state, pin, journal, and receipts with no update invocation.

Confidence: 0.98

Location: install.ps1:113-120 (RIGHT)

Comment thread install.ps1 Outdated
Comment thread boatstack/internal/runtime/bootstrap_diagnostic.go Outdated
Comment thread boatstack/internal/runtime/bootstrap_diagnostic.go Outdated
@bigboateng

Copy link
Copy Markdown
Contributor Author

Addressed the unanchored hydration finding in c21e242. PowerShell now enters the kernel update branch only when mode is explicitly update; hydrate stages and verifies the host runtime and launcher only. Windows CI executes hydrate against an empty store and asserts that .boatstack, .git/boatstack, and repository status remain unchanged.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex automated review

Verdict: patch is incorrect
Confidence: 0.98

The new recovery path can install an unbound runtime, deterministically fail in detached repositories, and change another repository’s shared launcher. Model-level verification is recommended before merge, especially for hydrate retry/partial-failure behavior and cross-repository launcher isolation.

Findings without inline diff anchors

[P2] Allow exact hydration from detached checkouts

Invariant: a prescribed runtime recovery must not inherit repository-mutation preconditions it does not need. In a detached checkout with a valid pin and missing runtime, Boatstack prescribes hydrate, but the installer deterministically rejects it at symbolic-ref; state remains unchanged and the same recovery is prescribed again. Hydrate newly reaches this pre-existing install-only branch check even though it never uses the branch or mutates repository state. Add a detached-repository test using a checksum-bound local binary and assert hydration succeeds without repository changes; cover install.ps1 likewise.

Confidence: 0.98

Location: install.sh:21-24 (RIGHT)


[P1] Do not replace an existing shared launcher with the recovered runtime

Invariant: hydrating repo A’s pinned runtime must not change repo B’s shared bootstrap implementation. Hydrating an older exact runtime falls through to these lines and overwrites the host-wide launcher with that old binary; another repository then loses the current bootstrap protocol—for example, an actual v0.7.142 launcher emits only the old untyped missing-runtime error instead of this patch’s structured recovery diagnostic. The new test misses this because its “old” helper is current source with a different version string. Add a regression using an actual older release and assert an existing current launcher and repo B’s diagnostics remain unchanged; only create a launcher when none exists. The PowerShell path has the same issue.

Confidence: 0.97

Location: install.sh:143-145 (RIGHT)

Comment thread install.sh
case "$mode" in
install|update) ;;
*) echo "Boatstack supports BOATSTACK_MODE=install or update" >&2; exit 2 ;;
install|update|hydrate) ;;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Require exact identity evidence for hydrate mode

Invariant: hydration must be bound to an exact pinned version and digest before changing host state. BOATSTACK_MODE=hydrate with no version or expected digest defaults to mutable latest, installs that artifact and overwrites the launcher, while the repository’s pinned runtime remains absent; the next command therefore reports the same blocker after an unrelated host mutation. This is introduced by admitting hydrate without validating its required variables. Add a test asserting hydrate without an explicit non-latest version and expected SHA-256 fails before download or filesystem mutation; apply the same correction to install.ps1.

Confidence: 0.99

Comment on lines +99 to +103
if arguments[index] == "--format" && index+1 < len(arguments) {
return arguments[index+1] == "json"
}
if strings.TrimPrefix(arguments[index], "--format=") != arguments[index] {
return strings.TrimPrefix(arguments[index], "--format=") == "json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Honor the final format flag in bootstrap rendering

Invariant: pre-runtime diagnostics must use the same CLI format semantics as normal execution. Go’s flag parser accepts repeated flags and the last value wins, but next --format=text --format=json returns on the first occurrence here and emits text rather than JSON (with the inverse mismatch for the opposite order). This parser is new in the patch and can break wrappers that append an override. Add a rendering test for both repeated-flag orders and select the final format occurrence.

Confidence: 0.96

@bigboateng
bigboateng merged commit b9ef8cb into main Aug 14, 2026
18 checks passed
@bigboateng
bigboateng deleted the fix/runtime-bootstrap-errors branch August 14, 2026 02: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