Repository navigation
phase2-convert-translator: ship real azureclaw convert translator (S9.2) - #63
Merged
Merged
Conversation
Replace Phase 0 exit-3 skeleton with real YAML translator between ClawSandbox and upstream agents.x-k8s.io/v1alpha1 Sandbox (kubernetes-sigs/agent-sandbox @ c8c85f5). - Three target modes: clawsandbox (inverse), upstream-sandbox (forward), overlay (skeleton emit). - Hard-fail on lossy translation by default; --allow-lossy waives. Applies to --dry-run too. - Seccomp + runtimeClass mapping mirrors controller exactly: confidential -> kata-vm-isolation + RuntimeDefault; enhanced + name -> Localhost(profiles/<name>.json); RuntimeDefault/empty -> RuntimeDefault. - Order-aware env projection: valueFrom drops prior literals (no stale data resurrection), warns per name; literal-overrides-valueFrom double-warns. - Multi-doc YAML rejected; server-managed metadata stripped. - Overlay --sandbox-ref ns/name validates against input metadata.namespace (LocalObjectRef is same-namespace). - 48 new vitest cases; CLI 337 -> 382. Manual smoke green. - Upstream API shape verified directly against kubernetes-sigs/agent-sandbox @ c8c85f5/api/v1alpha1/sandbox_types.go (no v1alpha2 yet). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pal Lakatos-Toth (pallakatos)
added a commit
that referenced
this pull request
May 12, 2026
Replace Phase 0 exit-3 skeleton with real YAML translator between ClawSandbox and upstream agents.x-k8s.io/v1alpha1 Sandbox (kubernetes-sigs/agent-sandbox @ c8c85f5). - Three target modes: clawsandbox (inverse), upstream-sandbox (forward), overlay (skeleton emit). - Hard-fail on lossy translation by default; --allow-lossy waives. Applies to --dry-run too. - Seccomp + runtimeClass mapping mirrors controller exactly: confidential -> kata-vm-isolation + RuntimeDefault; enhanced + name -> Localhost(profiles/<name>.json); RuntimeDefault/empty -> RuntimeDefault. - Order-aware env projection: valueFrom drops prior literals (no stale data resurrection), warns per name; literal-overrides-valueFrom double-warns. - Multi-doc YAML rejected; server-managed metadata stripped. - Overlay --sandbox-ref ns/name validates against input metadata.namespace (LocalObjectRef is same-namespace). - 48 new vitest cases; CLI 337 -> 382. Manual smoke green. - Upstream API shape verified directly against kubernetes-sigs/agent-sandbox @ c8c85f5/api/v1alpha1/sandbox_types.go (no v1alpha2 yet). Co-authored-by: Pal Lakatos-Toth <pallakatos@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Slice S9.2 —
phase2-convert-translatorReplaces the Phase 0 exit-3 skeleton of
azureclaw convertwith a real YAML-in / YAML-out translator between AzureClawClawSandboxand upstreamagents.x-k8s.io/v1alpha1 Sandbox(kubernetes-sigs/agent-sandbox @c8c85f5).What's in
--to clawsandbox— upstream Sandbox → ClawSandbox (lossy inverse)--to upstream-sandbox— ClawSandbox → upstream Sandbox (lossy forward)--to overlay --sandbox-ref=<name|ns/name>— upstream Sandbox → fresh ClawSandbox skeleton withspec.upstreamCompatibility.sigsAgentSandbox=overlay--allow-lossywaives. Applies to--dry-runtoo (rationale: silently dropping a TokenBudget on conversion is a governance regression).confidential→kata-vm-isolation+RuntimeDefault;enhanced+<name>→Localhost(profiles/<name>.json). Verified directly againstcontroller/src/reconciler/mod.rs:34-78.valueFromdrops any prior literal for the same name (no stale-data resurrection), warns. Literal overriding a priorvalueFromdouble-warns.--sandbox-ref ns/namevalidates against inputmetadata.namespace(LocalObjectRefis same-namespace only).kubernetes-sigs/agent-sandbox @ c8c85f5/api/v1alpha1/sandbox_types.govia GitHub MCP. No v1alpha2 yet —api/directory contains onlyv1alpha1/.Tests
cli/src/commands/convert.test.tsnode dist/index.js convert -f sandbox.yaml --to clawsandboxexits 0 on confidential input, emits valid ClawSandbox.tsc --noEmit+oxlintclean.CI scripts
ci/no-stubs.sh,ci/no-custom-crypto.sh,ci/check-loc.shall clean againstorigin/dev.Audit doc
docs/security-audits/2026-04-28-phase2-convert-translator.md— full 12-section template. STRIDE, reuse map (10 existing seams enumerated), failure-mode table (12 modes × exit codes), seccomp canonicalisation matrix, ops surface for the three day-1 use cases (adoption / de-adoption / partial-overlay-bootstrap).Rubber-duck pre-implementation pass
10 findings adopted: hard-fail-on-lossy default, overlay input gating,
valueFromhandling,profiles/<name>.jsonpath convention, dry-run lossy preservation, ns-mismatch rejection, multi-doc reject, status strip, missing-podSpec invalid-input handling, deterministic env ordering. 0 deferred.Phase 2 progress
S1 #51 ✓ · S2 #52 ✓ · S3 #53 ✓ · S4 #54 ✓ · S5 #55 ✓ · S6 #56 ✓ · S8 #57 ✓ · S11 #59 ✓ · S11.1 #61 ✓ · S9.1 #62 ✓ · S9.2 (this PR)
11 of ~14 slices.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com