Repository navigation
feat: draft native Kubernetes execution provider - #1614
Conversation
6aa84d1 to
7c9c523
Compare
…nce tables Answers the review ask for a builder composition that makes the adapter testable end to end, and lines it up with stacklok#1614. Composition (internal/adapter/boatenv/composition_test.go): drive scripted sessions through the real app.Build with the Boat provider as the deployment PlacementProvider. Doing so surfaced three gaps that library tests could not see, all fixed here: - Startup preflight provisioned a sandbox. configuredPlacementBinder validated the default placement by binding it, which for Boat creates and archives a billable sandbox on every daemon start. Add the side-effect-free server.PlacementValidator seam, with the same name, signature and call site as stacklok#1614 so the two merge cleanly, and implement it for Boat as GET /me. Providers without the seam keep the legacy bind-to-validate path (both pinned in placement_validator_test.go). - File tools were denied by authority: the workspace could not derive an authority resource identity. Implement tool.AuthorityResourceResolver with a guest round trip that resolves symlinks under the same confinement as file access, so policy and access name the same file. - Shell needs a local workspace and shell on main even when the placement supplies the runner. stacklok#1614's RemoteExecution posture removes that gate; until it lands, the Shell composition test enables it with a throwaway host workspace and proves nothing runs there. Conformance: run engine/adapter/fsconformance Run and RunNamespace against the Boat workspace, offline over the fake API and live over one sandbox with a directory per case. It caught a contract bug: ReplaceFile with a zero FileVersion on a missing path reported a version mismatch instead of fs.ErrNotExist. A zero version still goes to the guest, which now reports a missing file before a stale version. Live, against boat.dev: TestLiveBoat (lifecycle, CAS, archive and exact reattach), TestLiveBoatConformance (30/30) and TestLiveBoatComposition (app.Build, one sandbox, Write/Edit/Grep/Shell/Read) all pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repair and live-validation statusThe three runtime blockers were reproduced and repaired locally, and a direct OpenRouter client journey passed. The repairs are still uncommitted and have NOT been pushed to this PR. The PR remains at Reproduced failures and local repairsAll three original failures were demonstrated in both focused offline regressions and real Kind runs before fixing them:
Local verification passed full Actual OpenRouter usage: direct client, not a scripted-model suiteOn the repaired runtime, a client created an authenticated session using OpenRouter /
The operator-provided credential was consumed only by the trusted runtime loader, not read into agent context. The mock profile was restored afterward, and UID-pinned deletion of the run-scoped credential Secret succeeded. No credential bytes or credential-file path are included in this comment. Tested runtime image digests:
The sanitized local receipt records Current PR state and remaining merge work
Remaining: record the repairs/evidence in the reviewed stack, commit and push the fixes, reconcile current-main conflicts, and rerun checks on the resulting candidate. Human API/schema/security approval, plan merge, release-maturity selection, and final implementation merge remain separate gates. No approval, merge, or shipment is implied by this validation. |
4b667b8 to
1cea20d
Compare
Current-head qualification: PASSThe reviewed lifecycle and Helm repairs are committed and pushed as Fresh production qualificationDeleted the failed, previously consumed qualification cluster and created a new owned Kind+Calico fixture. The full native production suite passed on this commit in 1,255.470 seconds, including the retained-environment deletion regression and the Helm lifecycle coverage. This is fresh-fixture evidence, not a rerun against already-consumed migration/authority history. The repairs cover terminal retirement, rejection of new replacements after retirement while preserving exact receipts, profile-independent admitted retirement/deletion, fail-closed profile validation before every replacement phase, bounded backend diagnostics, and Helm 4 client-side lifecycle reconciliation. The historical generic Real-provider user journeyPASS using OpenRouter /
This exercised authenticated HTTP session creation/model execution plus independent gRPC verification and restart recovery. It was not a manual TUI/browser walkthrough. The sanitized local Verification and cleanup
The PR remains draft; these results do not substitute for the outstanding human contract/security/release-maturity and merge decisions. |
Implementation handoff: native Kubernetes harness contextAlign PR #1614 with the native plan amendment in #1579 and the shared harness-context contract/implementation in #1878 and #1875. This is the runtime assignment; it does not replace the native plan's human approval gate. Before startingCheck the current merge, approval, and CI state of all four PRs. Start runtime integration only after the amended #1579 and normal shared-plan/shared-implementation merge gates, or a separate explicit directing-human exception for this integration. Original shared plan #1814 is merged; the pre-merge exception for #1875 does not authorize native runtime work. This comment grants no merge, force-push, paid/live-test, or destructive-state authority. Use the merged shared implementation or current explicitly authorized stack, including default-child instruction inheritance and source-lifecycle fixes. Historical handoff hashes are not dependency pins. Record the candidate actually tested in completion evidence. Read Source model and native scopeIndependent deployment/operator/API instruction and command sources work without attaching execution. Repository files become context only when separately selected and admitted. Leave PVC-backed context unselected in the native first slice. Do not implement a PVC source adapter or expand native delegation/schedule support under this assignment. For registrations that actually require execution files, the shared internal contract is Implementation workInspect current
Required proofsUse production Build and the public service/discovery path through the actual execution-client composition boundary:
Reference-only tests do not qualify the actual native composition boundary. Preserve the native PR's existing production/live qualification requirements and distinguish historical results from evidence on the integrated candidate. This context assignment does not establish that unrelated native runtime issues are resolved. Verification and completionWorkers run named proofs, affected app/server/execution-client tests and direct boundaries, scoped lint, and targeted race tests. The integration owner runs aggregate Report the registration and suppression changes, preserved exclusions, actual tested revision, command exit codes, current CI, and real-backend versus reference evidence. Check approval state again before claiming completion. Stop for material contract drift, ambiguous source authority, or a newly required PVC adapter. Humans approve and merge. |
b541038 to
3d5b794
Compare
7ba64d3 to
77f456d
Compare
Preserve the integrated implementation tree at the last main merge while leaving the merged plan files authoritative. Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Resolve the upstream reservation and harness-instruction composition changes without restoring superseded native integration code. Co-Authored-By: OpenAI Codex <codex@openai.com>
Integrate native awaiting-handoff preservation with upstream Studio continuation persistence. Freeze the projection decision under persistMu, then release it before EventLog I/O; terminal admission and matching retractions prevent preserving an already-settling handoff even if the append outcome is uncertain. Restore the lost teamService provider-interface test delta. Keep FinishRun identity checks under the registry lock so stale plan relays cannot race successor promotion. Add deterministic blocked-append, persistence, drain, and ambiguous-error regressions. Co-Authored-By: OpenAI Codex <codex@openai.com>
…tion Join native renewal and release the drained plan run before removing its operation pin or admitting the reserved continuation. Keep the per-session entry barrier and exact identity recheck while provider I/O runs outside the global mutex. Apply the existing native acquisition and renewal seams to restored exact plan admission too. Promote the verifier diagnostic into deterministic offline regressions for claim ordering, exclusive continuation, failure/cancellation, and stale relay cleanup. Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI <noreply@openai.com>
Adapt native lifecycle and TUI recovery tests to the merged placement ownership, governance-root, and typed-scrollback contracts while retaining side-effect-free native preflight. Co-Authored-By: OpenAI Codex <codex@openai.com>
Publish a competing winner only after the losing placement has been provisioned. Prove exact candidate rollback and winner lifetime in both shared and per-session engine paths, and separately prove known explicit-ID retry performs no allocation or rollback. Co-Authored-By: OpenAI Codex <codex@openai.com>
Require all release publishers to traverse the immutable-ref validator, expose guard outputs only through direct dependencies, and make manual dispatch select the requested tag ref. Co-Authored-By: OpenAI Codex <codex@openai.com>
Validate event SHA agreement for dispatch as well as push and cross-check the guard output against the immutable validator checkout. Cover moved tags between on-main commits with real offline fixtures. Co-Authored-By: OpenAI Codex <codex@openai.com>
Preserve the pre-existing commit co-author ADR as 0367 and renumber only the rebased MicroVM decision and its citations to 0368. Co-Authored-By: OpenAI Codex <codex@openai.com>
77f456d to
b7bf9fa
Compare
Stage: qualified implementation candidate (draft, existing stack)
Plan: #1579 (
plan/native-kubernetes-execution),docs/acceptance/native-kubernetes-execution.md, draft ADR 0351. This updates the existing stack only: no new PRs, no automatic merge, no implied human approval or shipment.Historical native live qualification: PASS
Manual run 35700303737 checked out exact pre-main-integration runtime commit
2020e59934369e8f771059d0c173fa4cbf964c7eand passed the complete sequence:anthropic/claude-haiku-4.5coding: 30,521 input / 713 output tokens, Write and Shell observed, exact modelgo test ./...exit 0.go test ./...exit 0.This is native execution-provider evidence for that tested runtime, not current-head qualification and not the separate mecak8s live suite. No credential bytes entered agent/tool context.
Additional direct-client validation of the local repairs: PASS
Before main integration, a direct client exercised the repaired working tree based on
90320a1b, using an operator-provided OpenRouter credential through the trusted runtime loader. This is separate from the historical CI run above; the detailed status comment records the image digests and scope.anthropic/claude-haiku-4.5usage: 30,525 input / 745 output tokens; Write and Shell observed; the model's exactgo test ./...exited 0.This validates the pre-main-integration repaired runtime, not the subsequently merged current head. Its sanitized receipt is local, not an uploaded CI artifact.
Blockers repaired
The main-integrated candidate preserves the previously reviewed repairs and adds regression coverage for:
It also retains the earlier scoped administration, provisioning recovery, Helm confinement/history, migration/finalizer safety, immutable rotation publication, remote filesystem/CAS confinement, permission preservation, and bounded diagnostic repairs.
Current integration and local verification
Current implementation head:
4b667b833788b5918ab66b110a1fababdd569d3c. Its second parent is the exact current plan head4ffb2c288796d515d3fd2a5ffc744382f1d45418, which includesorigin/mainthroughca993a6ea1b648e8e18a102b6810da5dea8c494f. Mainline ADR 0350 is retained and the native draft is ADR 0351.After the latest integration, local verification passed:
-racepackages: execution controller/client, server, app, and execution Kind fixture;task api:check;task docs;task lint;task test(race plus standalone module hygiene).Earlier main-integration verification also passed
task build,task site:build,task ac-trace-strict, and the offline mecademo smoke test. Those commands were not rerun locally after the final two main commits. Post-integration CI results are recorded below; the additional local direct-client receipt remains pre-integration evidence.After rerunning the unsuccessful jobs on the unchanged current head, GitHub checks are terminal: 29 successful, 8 skipped, and 1 failed, with the separate Vercel status successful. CI is not fully green.
TestKindExecutionExpiredRunAllowsFinalReferenceRetireAndDeleteretained-deletion request (pr1614_runtime_blockers_test.go:142,internal: execution provider request failed). The first attempt's sanitized artifact shows retirement and executor termination succeeded, but deletion was not durably admitted. The underlying backend/transport cause remains unidentified. Focused retirement/deletion race tests passed 20 iterations; no speculative code change or weakened assertion was made. Two CI attempts now reproduce the same failure, so it cannot be dismissed as a one-off flake.The historical and direct-client native live receipts above remain scoped to their tested pre-main-integration runtimes; they do not replace the remaining failed current-head check.
Both PRs stay draft. Human API/schema/security approval, release-maturity selection, and final merge review remain outstanding. No production-ready/merged/shipped claim is made.