Repository navigation
feat(service-runner): unarmed engine spawn mode for the hub cutover (#955) - #960
Merged
Merged
Conversation
…955) AMICODE_ENGINE_UNARMED=1 (CLI env) / engineUnarmed (opts): the runner spawns the vendored engine WITHOUT OPENCODE_SERVER_PASSWORD — the fork hub's anonymous boundary posture (2026-08-07 incident: 'canonical serves anonymous 200'; the SSH mesh is the boundary). The app-proxy forwards client requests verbatim, so an armed engine would 401 the fleet panel's anonymous calls. - child env omits the key entirely (never empty); health probe goes anonymous in the posture; the service gets enginePassword: undefined (its authMode still resolves independently — AMICODE_SERVICE_AUTH=open alongside is the hub posture pair); boot line names the posture - unarmed wins over an explicit enginePassword (never silently half-armed) - armed default byte-identical for every existing caller - tests: headless fake-engine env-dump asserts the child env (armed + unarmed + precedence), live-gated unarmed boot with an anonymous proxied GET /session -> 200 (the #958 live convention)
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aarontrowbridge
marked this pull request as ready for review
September 10, 2026 08:28
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 free
to 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.
What
Adds the unarmed engine spawn mode the hub cutover needs: the runner can spawn the vendored engine WITHOUT
OPENCODE_SERVER_PASSWORD— the fork's exact deployed posture (the 2026-08-07 incident record: "canonical serves anonymous 200"; the SSH mesh is the boundary). The app-proxy forwards client requests verbatim, so an armed engine would 401 the fleet panel's anonymous calls.Ref #955. Builds on #958 (the runner) + #959 (the service's auth mode) — the pair
AMICODE_ENGINE_UNARMED=1+AMICODE_SERVICE_AUTH=openis the hub posture.The change
AmicodeServiceRunnerOptions.engineUnarmed?: boolean(CLI envAMICODE_ENGINE_UNARMED=1inamicode_service_runner_cli.ts):OPENCODE_SERVER_PASSWORDentirely (never empty — the fork's route auth engages on presence),enginePassword: undefined(its authMode still resolves independently via its own env passthrough),[service-runner] spawning engine … UNARMED (the hub's anonymous boundary posture),boot.enginePasswordisstring | undefined(undefinedin the posture).engineUnarmedwins over an explicitenginePassword— the posture is never silently half-armed.Tests (
test/amicode_service_runner.test.ts)OPENCODE_SERVER_PASSWORDin the child env,boot.enginePassword === undefined, the UNARMED boot line, the service still boots and answers with its own mint,enginePassword,AMICODE_SERVICE_AUTH=open→ an anonymous proxied GET /session answers 200.Verification
pnpm run typecheckgreen (all workspace packages).test/amicode_service_runner.test.ts: 9/9 green with the vendored engine + built app dist in the worktree (live rehearsal included).cli_gate×1 (freshly-staged-bins, environment),editable_diffs_wiring×2 (filename gradient CSS),terminal×2 (OPENCODE_DB/CONFIG_DIR env injection). Everything else 3126+ passed. (A first pass also flaggedpackaging/yellow_chunks— reproduced as build-dirt artifacts, HAZARD chore(test): overlay-sync test applies to the local fork checkout's committed tree — point it at a temp tree #842: they pass on a clean tree with this change.)