Repository navigation
feat(placement): v13 PLACECLI placement process boundary and lifecycle - #1971
Draft
ViperJuice wants to merge 17 commits into
Draft
ViperJuice wants to merge 17 commits into
ViperJuice wants to merge 17 commits into
Conversation
…v13 PLACECLI) Package the frozen placement process protocol v1 schema and add its strict codec, the per-client PlacementLifecycle with a reservation-only walk exit, the reservation-scoped ForwardTcp-to-Unix bridge and the agent-harness-placement console entry. Tests, inventories and docs follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts (v13 PLACECLI) Add the SL-0..SL-3 lane tests, the language-neutral placement-cli black-box corpus with its fake coordinator, and the inventory decisions for the new bridge helper launch and file reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd refusal codes (v13 PLACECLI) Pass the protocol's own placement codes through the reservation walk's pre-probe refusals, document agent-harness-placement, add the receipt validator and record the phase's executing lifecycle event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ut touching the inventory Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ai run (v13 PLACECLI) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h (v13 PLACECLI) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s and a non-blocking bridge relay (v13 PLACECLI) Commit each admission recoverably in the attempt journal before publishing it, recover only from a complete commit without allocating anything or recomputing expiry, and hand an interrupted admission's complete effect to a single cleanup owner at the settle bound. Re-read attempts under their lock at start-up. Bound every blocking step of reserve, release and reap by one operation deadline. Relay bridge bytes without blocking, with bounded per-direction buffers, and reclaim a helper by its directory. Refuse an explicit null launch member. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead ai run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…operation deadlines (v13 PLACECLI) Journal each cleanup hand-over under stable keys before materializing it, serialize every consumer of a reservation's effect on that reservation's lock, keep consumed cleanup owners as completion records until the attempt journals completion, and recheck tombstones and transfers inside the lock before replay publishes. Carry the operation deadline and cancellation through start-up, hand-over, recovery and slot locking, never wait on a kernel lock when a deadline applies, and cap every helper stop wait by the remaining time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ections ai run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y budget check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
v13 PLACECLI: placement process boundary and lifecycle
This implements
plans/phase-plan-v13-PLACECLI.md, the re-plan merged in agent-harness#1965. It is built against the landed bindingplans/artifacts/v13-PLACECLI-landed-binding.md, and it produces IF-0-PLACECLI-1 and IF-0-PLACECLI-2.It stays in draft pending independent review, hosted CI, and integration after v12 CLOSEOUT.
What it adds
agent-harness-placement --client agent-harness|agent-toolkit reserve|release|reap|version(placement_cli.py; console script inpyproject.toml, withuv.lockunchanged). It reads one JSON request on stdin and writes one response line on stdout, with exit classes 0, 10, 20 and 70. Schema-invalid input exits 70 with stdout absent.--clientalone selects the configuration, OU and inventory. No environment variable is read for selection.placement_process_contract.py. It ships the frozen protocol v1 byte for byte ascontracts/placement/process-v1.schema.json(SHA-256130a894d…). The strict codec covers duplicate keys, trailing data, UTF-8, non-finite and unsafe numbers, and the 64 KiB bound, then validates against the schema and builds immutable records.sandbox_placement.PlacementLifecycle.place(..., reserve_only=True)adds a reservation-only exit that stops after admission, beforecommit,sealorexecute. The lifecycle:(client, reservation)only;reserve, whilerelease,reap,versionand--helpkeep working.config_sha256covers the whole per-client configuration (binding §4.1), including thelaunchmember, the policy digests andseat_caps_sha256.placement_bridge.ForwardTcpUnixBridge. One 0700 directory and one 0600 socket per remote Pi orlegreservation. A reservation-lifetime helper serves it, launched throughseat_uid.trusted_module_argv. It opens no TCP listener and is torn down on release.placement_lease: per-client inventories and owner ids;MTLSConfig.client_ou: the certificate OU per client;phase-loop placement reap --client: delegates to the same service;[placement.local_headroom]defaults equalx-local-headroom-defaults.docs/placement-process-cli.md(including the v2 bare-hex egress spelling, P-S2), a README section, one changelog entry, a.doc-decisions.jsonentry, and manifestexecutingandcompletedevents.Live routes stay disabled: no production OpenShell backend is registered,
_NONLOCAL_EXECUTION_DRIVERstays false,policies.jsonstayspending_qualification, and E2B is off.Verification
All runs were on
ai: a private scratch worktree,uv sync --locked, an-Ipre-check, the project admission lock, PSI gates, serial runs andtimeout 900. Results at1e54b95(receipt validator at58b5d5f):grpc)The mutation controls pair an intact witness with a killed run for every named guard. The receipt
plans/evidence/placement/PLACECLI.mdpins only phase-exclusive files (agent-harness#1955).Hosted CI remains unverified. Recent runs show workflow startup failures and failed aggregate jobs; the cause has not been established. Earlier executed checks found an entry-doc path issue and an unused test import; both are fixed and passed their local checks.
The release wheel console metadata now includes
agent-harness-placement, with matching wheel fixtures. The focused release-console regression passed, as did four source-only parser controls (declared set accepted; missing, altered and extra entries refused), lint and diff checks. Three wheel-binding tests could not reach assertions because their local fixture setup failed with a permission error. These controls are not installed-wheel or attended-canary qualification.Consumers and rollback
LANEEXEC consumes
PlacementLifecycle,ForwardTcpUnixBridge.open/closeandconfig_sha256(binding §4). Existingplace()callers are unchanged, because the new keywords default to the old behaviour. To roll back, revert this PR; no state outside the new per-client inventories is written.Implementation update: durable admission, operation deadlines and the bridge relay (head 46ca5f1)
This update leaves the frozen signatures, schema, plan and scope unchanged, and keeps the console-metadata commit d83f9c7.
admittedonly from a complete commit, returning the original reservation, expiry and bridge. It makes no target, exposure or bridge call and never recomputes expiry.reserve,releaseandreapeach run under one deadline taken fromdeadline_ms. It bounds the walk, the exposure lookup, bridge readiness and teardown, the reservation lock, and the kill and owner listing.timeout.cleanup_pending.launchmember must be an object;"launch": nullrefuses at load.docs/placement-process-cli.mddescribes the recovery, deadline and relay behaviour.Validation at the repaired head. All runs were on
ai: a private scratch worktree,uv sync --lockedwithuv.lockunchanged, an-Ipre-check, the project lock held for the run, PSI gates, serial runs andtimeout 900.New regression cases cover:
Not verified here.
test_agy_canary_evidence.pyinstalled-wheel fixture tests fail on this branch with "installed RECORD is missing governed files". They pass before d83f9c7, because the installed-wheel fixture writes launchers for the previous five console scripts only. That fixture is outside this phase's files.aiatmainas well. They depend on the host.Implementation update: cleanup hand-over and operation deadlines (head 4877182)
Frozen signatures, schema, policy and scope are unchanged, and the installed-launcher fixture commit 19451e5 is kept.
docs/placement-process-cli.mdnow says that replay may perform one bounded read-only reconciliation and never creates a target, lease or bridge or recomputes an expiry. It also describes the hand-over.Validation at 4877182. Producers ran at ec0e05f, where the code is final; only the receipt changed after it. All runs were on
ai: a private scratch worktree,uv sync --locked, the-Ipre-check, the project lock, PSI gates, serial runs andtimeout 900.New regression cases cover:
Not verified here. Hosted CI for this head.
🤖 Generated with Claude Code