S26: wire execution-target placement in shadow mode (SHIP_PLACEMENT=shadow) - #48
Merged
Merged
Conversation
…hadow) SandboxPool.create/createFrom compute placeRun beside the existing least-loaded choice, and the C5 liveness failure records what onHostLoss would have done. Both only append to placement-shadow.jsonl; the chosen host and the failure are unchanged. Default off. Adds 'placement shadow-report'. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX
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.
Changes
src/placement-shadow.ts: flagSHIP_PLACEMENT=shadow(default off, any other value is off), conservative declared capabilities (os linux, arch UNKNOWN sentinel, no browser/desktop/services/gpu, static credentials; resources and run cap "very large" and finite), optional operator declarations viaSHIP_PLACEMENT_TARGETS(JSON keyed by host URL),SHIP_PLACEMENT_REQUIRE(deployment-wide requirement) andSHIP_PLACEMENT_DRAINING. Appends one JSON line per decision toplacement-shadow.jsonlin the state dir (SHIP_PLACEMENT_SHADOW_FILEoverrides). Additive JSONL only, no tables.src/sandbox-pool.ts: optionalplacementShadowoption.create/createFromcomputeplaceRunfrom the pre-attempt state, then record it against the host actually used. Host choice is untouched. NewobserveHostLoss(handle).src/durable.ts: optionalExecutorProvider.observeHostLoss, called (try/catch) in the C5!alivebranch just before the unchanged throw. No step added or changed.src/cli.ts: passes the shadow to the pool when the flag is on; newteploy-ship placement shadow-report [--json].Checks
pnpm run lintclean. Afterrm -rf dist, build +node --test --experimental-test-isolation=none "dist/**/*.test.js": 2002 pass, 0 fail. scripts install-stage + smoke-e2e: 13 pass. Skipped grader-sensitivity and pj-b grader (fixed port 8901; CI runs them).Not verified / still open
SHIP_PLACEMENT_REQUIRE.different-choice. A create that fails everywhere records nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX
Generated by Claude Code