Skip to content

fix(runtime): repair Custom composition and live-validation regressions - #369

Merged
FumingZhang merged 17 commits into
mainfrom
fix/custom-combined-controls
Oct 31, 2026
Merged

FumingZhang merged 17 commits into
mainfrom
fix/custom-combined-controls

Conversation

@FumingZhang

@FumingZhang FumingZhang commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix three concrete runtime integration problems found while validating main plus #337, #347 and #366, plus a publication CI regression:

  • Compose Custom Chat, Web UI and headless observed-SNI capture with the exact managed initializers and static readiness contract. Require an explicit approved numeric image UID/GID, preserve independent terminal TLS configuration, and allow the shared FQDN/Kubernetes adapters on explicitly registered container runtimes.
  • Retry definitive Kubernetes resource-version conflicts when acquiring or refreshing native reservations. A real two-Agent rate-limit update hit this shared-ConfigMap race and unnecessarily replaced one Agent and its terminal. Retries reread the authority, preserve reservation identity, reject concurrent stopping, and never replay uncertain writes.
  • Validate the actual managed TLS listener and Service target for common Custom Chat. Verify the approved caller-specific DestinationRule and pinned credential reference without reading client Secrets or changing the private HTTP route. Keep the new read permission local to the Portal namespace.
  • Supply the release inventory's missing synthetic Gateway inputs. Both the helper and runtime-image CI jobs stopped at the same real local chart-packaging regression; this was not a new CVE finding.
  • Address review feedback: record a UID/resourceVersion-fenced non-creation outcome when the first primary workload CREATE is definitively rejected after successful RBAC grants, including initial control adoption and repeated failed Helm history. Approved auxiliary CREATE/UPDATE claims no longer consume the primary HOME proof. Normal retry/deletion can release that initial reservation; uncertain or earlier primary/opaque submissions and competing claims retain their barriers, and auxiliary shutdown remains mandatory. Workload CREATEs disable HTTP retries.
  • Document the pinned Hermes release's independent 420s outer tool deadline and a supported, finite per-process setting for longer foreground tasks. This does not change default timeouts or approval controls.

Main synchronization: #366 is now merged. Conflicts with main 439a125c661a44d84a1727eb8f107066f9fbc741 were resolved and pushed without rewriting history in 13f03d17c4f4717cdc81fd3e457621ee0b288e75. Both compiler-generated mTLS fixtures and the stricter live-repair checks are retained, using the shared TLS port constant. The earlier publication head 5960807acfda1db1a20faaeea7d102e62cb3b507 remains the boundary of the first run's evidence, not the newest source.

The second AKS candidate was 48735c4951179004b72758cc50b425ef612930b5, combining this merge with the separate obsolete-network cleanup #370. Its complete offline make check passed with pinned dependencies. The bounded live cycle completed five full retained lifecycle/A-B-A tuples, real native tool tasks, explicit Memory controls on both backends, combined Kubernetes/Entra credentials and exact budget/exhaustion checks. The Kata OpenClaw return move and incompatible headless-image attempt remain unqualified; no clock or guard was weakened.

Second-cycle repairs were separate: #371 corrected Portal admission diagnostics and was live retested; #372 fixed the uncaptured-source migration recovery deadlock with offline regressions at that checkpoint. All 13 second-cycle Agents were normally deleted; both owned Azure groups were absent at 18:07:56 UTC and the soft-deleted model account was purged/NotFound at 18:09:21 UTC.

October 31: #370/#371/#372 are now on main. The complete baseline 8b5b73a5ec77d6b2b5f7407f457b33fca2a9e445 passed make check and was rebuilt before Agent acceptance. Live testing found repeated admission denials could still strand a first CREATE through failed Helm history; b09fe5b83 fixes that path with the same durable fence. The Operator/admission-only live stage is e1d3de876c009aa5b7d230f3d6ab6394668158e2; Portal, Agent images and chart retain the baseline. Fresh cases survived two/three actual failed revisions, then recovered in 151.538s or deleted in 24.950s/25.818s. The review was replied to and resolved after those checks. The original stranded lifetime's 1200s ordinary-delete failure remains recorded; its old key later returned 401.

Current-main synchronization is 2d1fba0f4, merging ead44a03e (Teams removal) without rewriting history. Timeout guidance is 777301fb0. These publication-only changes were not deployed to the running cohort. Both configured Hermes backends completed independently observed eight-minute foreground tools (483.213s/481.023s) with a 600s outer deadline; their default-deadline failures remain failed. Full source boundaries, current results, cleanup and concise external prerequisites are in FumingZhang/cetirun-validation#7.

The third-cycle OpenClaw Kata/RWOP return completed in 856.747s. All 16 Agent lifetimes are accounted for: 15 normal deletions and the one preserved pre-repair failure removed only by owned Azure teardown. Both groups were absent at 07:01:29 UTC; the exact soft-deleted model account was purged and independently NotFound at 07:03:04 UTC. Later source-change and empty-terminal observations remain explicit limitations, not invented product fixes. At that publication boundary, CI reported 27 successful checks and eight explicit skips, and independent maintainer review was still required.

Self-review follow-up: 092e29607897078912d380041c81e1599fbbe402 fixes the reproduced Copilot-before-primary gap without reordering controls or inferring non-submission from absence. The existing primary checkpoint and separately fenced auxiliary claims retain ordinary quiescence requirements. The thread was replied to and resolved after real SDK/API/race regression coverage. The exact reviewed head passed make check.

The fourth rebuilt AKS candidate was 5d040d2158d039ed6bd0e7d507b3e7cf089b9c52, which also contains the separate current-rollout repair #373. Actual Copilot auxiliary-first cases on both backends observed two to four failed Helm revisions and preserved primary cancellation. Normal deletion passed; primary recovery was independently observed within the original 1200s bounds. The proxy correctly remained SignInRequired without external credentials. This is structural recovery evidence, not Copilot-provider qualification; the initial broader observer failure and fixture corrections remain recorded.

Final fourth-cycle boundary: maintainers merged #369 and #373 at 13:23:02/13:23:18 UTC. The tested candidate's source tree matches merged main 9d26813251137ed7e74aaf7d536df2a54607ad68; original artifact labels are unchanged. Three full retained tuples, including the last missing OpenClaw Kata/RWO tuple, and six shared-source storage/lifecycle journeys completed. Five shared-source model tasks completed; Custom Kata's interrupted streams and both Custom default-Memory recall failures remain unqualified.

All 17 fourth-cycle Agent lifetimes completed normal deletion. Both owned Azure groups were absent at 16:17:14 UTC; the exact soft-deleted model account was purged and independently observed NotFound three times by 16:18:50 UTC. The three listeners and nine exact task image tags were removed without pruning shared caches. Private credentials/state/transcripts, the task Python environment and nineteen helper scripts were removed after the evidence/privacy audit and before publication. See the fourth-cycle report, ledger and updated roadmap; no historical failure or partial source stage is relabelled.

The report and roadmap update are published in FumingZhang/cetirun-validation#8, stacked on the still-open prior report PR.

Related issue

Requested follow-up to the agreed Custom-first validation and repair work, covering #337, #347 and #366. No separate issue is needed for this maintainer-requested validation repair.

Validation

Offline tooling: Go 1.27.3, Helm 3.22.0, Kubernetes API-server test assets 1.37.0, Node.js 24, Hugo 0.164.0 extended, and the repository's pinned Python CI dependencies.

Latest primary/auxiliary review-fix checks:

Command: go test -C app/cetirun-operator ./internal/controller -run '^TestReconciledSandboxCopilotFirstWorkloadRejectionRecovery$' -count=1 -timeout=5m
Result: Reproduced the four Kata/container retry/delete failures before repair; covered by the passing final race suite.

Command: go test -C app/cetirun-operator ./internal/helm -count=1 -timeout=10m
Result: Passed, 63.806s, including actual auxiliary updates and repeated failed history.

Command: go test -C app/cetirun-operator -race ./internal/controller ./internal/helm -run '^TestReconciledSandbox(CopilotFirstWorkloadRejectionRecovery|FirstWorkload|WorkloadRejection|Auxiliary|KubernetesFirstInstall|KubernetesGrantRejectionFences|DeletionCancelsBeforeFirstApply|StopWaitsForMissingAuxiliaryChildren|RejectedFirstWorkload|MissingEarlierWorkload|SDKWorkload)' -count=1 -timeout=10m
Result: Passed; controller 247.760s and Helm 71.004s.

Command: go test -C app/cetirun-operator -tags=envtest ./internal/controller -run '^TestContainerSandbox(Copilot)?FirstWorkloadRejectionAPIServer$' -count=1 -timeout=10m
Result: Passed, 23.015s.

Command: make check
Result: Passed on 092e29607897078912d380041c81e1599fbbe402; the subsequent complete 5d040d215 candidate also passed separately.

Command: go build -C app/cetirun-operator ./...
Result: Passed.

Command: go vet -C app/cetirun-operator ./internal/helm ./internal/controller
Result: Passed.

Command: make docs-check HUGO=/workspace/cetirun/site/.bin/hugo
Result: Passed, 106 tests and 42 rendered HTML pages.

October 31 review-fix checks:

Command: go -C app/cetirun-operator test ./internal/controller -run '^TestReconciledSandboxFirstWorkloadRejectionRecovery$' -count=1 -timeout=5m
Result: Reproduced the original failure before the fix on Kata/container, for both retry and normal deletion.

Command: go -C app/cetirun-operator test -race ./internal/controller -run '^TestReconciledSandbox(FirstWorkloadRejectionRecovery|WorkloadRejectionFences|KubernetesFirstInstall|KubernetesGrantRejectionFences)' -count=1 -timeout=10m
Result: Passed, 166.055s.

Command: go -C app/cetirun-operator test ./internal/helm -count=1 -timeout=10m
Result: Control-adoption follow-up passed, 62.617s, including initial control-adoption ordering, real REST rejection/Retry-After and uncertain-response cases. The later repeated-history repair passed the full package again in 63.349s.

Command: go -C app/cetirun-operator test -race ./internal/helm -run '^TestReconciledSandbox(FirstWorkloadRejectionAfterControlAdoption|SDKWorkload|SDKGrantUpdates)' -count=1 -timeout=5m
Result: Passed, 65.772s, on the final ordered implementation.

Command: go -C app/cetirun-operator test -race ./internal/helm -run '^TestReconciledSandbox(RejectedFirstWorkloadRetriesKeepOutcome|MissingEarlierWorkloadKeepsOpaqueOutcome|FirstWorkloadRejectionAfterControlAdoption|SDKWorkload)' -count=1 -timeout=5m
Result: Passed, 65.505s, on the repeated-history repair; its new SDK regression failed before the fix.

Command: go -C app/cetirun-operator test ./internal/helm ./internal/controller -run '^Test(ReconciledSandbox(RejectedFirstWorkload|MissingEarlierWorkload|FirstWorkload|WorkloadRejection|SDKWorkload)|PlannedMigrationUncapturedSource)' -count=1 -timeout=10m
Result: Passed after the current-main merge; Helm 6.657s and controller 14.805s.

Command: go -C app/cetirun-operator vet ./internal/helm
Result: Passed.

Command: go -C app/cetirun-operator test -tags=envtest ./internal/controller -run '^TestContainerSandboxFirstWorkloadRejectionAPIServer$' -count=1 -timeout=10m
Result: Passed, 11.446s, with real isolated API-server denial and retained recovery.

Command: go -C app/cetirun-operator build ./...
Result: Passed.

Command: make docs-check HUGO=/workspace/cetirun/site/.bin/hugo
Result: Passed on the earlier review source (43 rendered pages) and the final documentation-only source (106 tests, 42 rendered pages after Teams removal). The initial ambient-toolchain invocation and a malformed shortcode link failed; the corrected pinned-worktree gate passed.

Command: git diff --cached --check
Result: Passed.

The earlier validation results below retain their original source boundaries.

The October 31 stability candidate is 8b5b73a5ec77d6b2b5f7407f457b33fca2a9e445, combining then-current main a3ec59378b7260422a2ed4efe34a92be7a27b865 with the reviewed head. Both its initial intermediate integration and complete baseline passed make check; the coherent artifact rebuild completed before new Agent acceptance. The old 1200s failures and original cleanup evidence remain unchanged. The full root gate was not rerun on the later Operator-only or publication-only stages.

Command: make check
Result: Passed on the frozen integrated repair candidate, using the pinned CI Python environment.

Command: make docs-check HUGO=/workspace/cetirun/site/.bin/hugo
Result: Passed: 106 documentation tests and 43 rendered HTML pages checked.

Command: go -C app/cetirun-operator build ./...
Result: Passed on this publication branch.

Command: go -C app/cetirun-operator test ./internal/sandbox ./internal/sandboxpolicy ./internal/sandboxworkload ./internal/helm ./cmd/loopback-probe -count=1 -timeout=10m
Result: Passed on this publication branch.

Command: go -C app/cetirun-operator test -tags=envtest ./internal/controller -run '^Test(CommonCustom(ObservedSNI)?APIServer|ContainerSandboxKubernetesAccessAPIServer|ReconciledSandboxKubernetesAccessAPIServer)$' -count=1 -timeout=10m
Result: Passed against isolated API servers on this publication branch.

Command: go -C app/cetirun-operator test -race ./internal/sandboxcoordination -count=1 -timeout=10m
Result: Passed, including definitive CAS conflicts, concurrent stopping and uncertain committed responses.

Command: go -C app/cetirun-operator test -race ./internal/sandbox ./internal/sandboxpolicy ./internal/sandboxworkload ./cmd/loopback-probe -count=1 -timeout=10m
Result: Passed on the integrated repair candidate.

Command: go -C app/cetirun-portal test -race ./internal/kube ./internal/handler -count=1 -timeout=10m
Result: Passed on the live repair and publication sources.

Command: make -C app/cetirun-portal frontend-build
Result: Passed with the actual production frontend; existing bundle-size warning remains.

Command: go -C app/cetirun-portal test ./... -run '^$' -count=1 -timeout=5m
Result: Passed after restoring locked cached frontend dependencies and building the embedded frontend. The initial missing-output/dependency failures were not replaced with a placeholder.

Command: python3 -B -m unittest discover -s scripts/tests -p test_portal_chat_chart.py -v
Result: Passed, five tests.

Command: python3 -B -m unittest discover -s scripts/tests -p test_release_inventory.py -v
Result: Passed, nine tests including actual local packaging of all eight charts.

Command: python3 -B -m unittest discover -s scripts/tests -v
Result: Passed on the final publication source: 823 tests, four explicit cached-image-dependent skips, 309.495s.

Not run: full root gate again on the final publication head; full envtest suite; optional shared-skills/image-permission container checks without their explicit cached-image variables; real external OAuth/GitHub App/OBO/Agent Identity journeys without their approved directory/application prerequisites.

Authorized integration checks used an isolated AKS 1.37/AzureLinux/Cilium environment and synthetic owners. Both Kata and ordinary containers completed real keyless Azure OpenAI inference, Custom workload federation through MSAL with allowed-resource 200/denied-resource 403, observed projected-token rotation, and exact visible-SNI deny/allow against the same destination. Real RPM, TPM and per-model thresholds passed. After the CAS repair, concurrency and RPM retests retained both Agents' Pod/key/HOME/budget/reset identities through update and restoration.

Real private Chat over the composed mTLS configuration passed on both backends after the reader repair and the explicitly provisioned Istio SDS prerequisite. A separate asynchronous Custom-container model/tool task produced its exact durable result after an independently measured 480.000839s; observer reconnection did not replay the job. The failed Hermes foreground long tasks and missing original Kata model-file witness remain unqualified, not relabeled as passes.

The live source was frozen separately from later upstream merges: initial integration d972a832c37745d298e3c447e4a6e056fc735e1d, composition repair 1539670e1a5d5180aa29164927cba42cc87312fc, Operator-only CAS follow-up 91be9cca5b626f31997fb760adeaf0bf4240e573, and Portal-only TLS-reader follow-up 2834807318fbe7b9ba780a5da0a5a083b273283f. This publication branch preserves the subsequently merged Gateway-only configuration rather than restoring retired image-owned authentication fields.

All eight Agents were normally deleted within their original 1200-second bounds, with storage/execution state removed and deleted-key use rejected. Both owned Azure resource groups were verified absent at 11:58 UTC; the task's soft-deleted model account was purged and independently verified NotFound at 12:08 UTC. The temporary SDS authorization was removed, helpers stopped, and no live resources remain from this run. The sanitized report, 150-record evidence export and updated roadmap are in FumingZhang/cetirun-validation#7.

Compatibility and operational impact

  • No CRD or public Agent field changes; no dependency upgrades.
  • Custom FQDN capture additionally requires customRuntime.imageUsers for an already-approved immutable image. UID/GID must be positive 32-bit values and UID 1337 remains reserved for the proxy. Non-capture images retain image-owned identity and entrypoints.
  • Deploy matching Operator/admission, runtime chart and terminal/static-probe artifacts before enabling capture.
  • Container FQDN and Kubernetes access still require explicit capabilities and complete source/identity/role approvals; no implicit grants or default-runtime fallback.
  • Terminal TLS remains independently configured and receives no Agent HOME, model credential or Entra projection.
  • Upgrade the Portal and its chart for TLS-aware Chat readiness. Its namespace-local reader grants only get destinationrules; it does not grant Secret listing. Istio 1.30 separately requires namespace-wide list secrets for SDS, which must be explicitly authorized in a deliberately isolated Portal credential namespace.
  • CAS retries are bounded and restricted to definite Kubernetes conflicts. Changed/stopping authority and unknown write outcomes remain fail-closed. This does not add physical failover fencing.
  • The new rejection outcome is available only to an authorized initial CREATE and the exact durable expectation UID/resourceVersion. A previously uncertain submitted checkpoint is not administratively converted to cancellation based on object absence.
  • Hermes long-task guidance uses the supported native setting for an explicitly selected task. It does not globally increase or disable execution, approval, startup or migration limits.
  • Live data and deployment material remain outside the PR. Limited tests do not establish complete security or final P0 acceptance.

Checklist

  • The change is focused and preserves unrelated work.
  • Tests cover the changed behavior, or I explained why no new test is needed.
  • Documentation and examples match any public behavior changes.
  • Generated artifacts were updated from source, or none are affected.
  • Dependency changes include lockfiles, source attribution, and license information, or none are affected.
  • I checked the diff and attachments for secrets, private endpoints or identifiers, customer data, agent conversations, and internal information.
  • I followed the applicable CLA instructions, or asked a maintainer about an unclear check.
  • I identified checks that need credentials or a live environment and did not run them without authorization.

The repository's license/cla check passed, and maintainers merged this PR. No missing check is treated as an exemption; remaining runtime/provider acceptance is still tracked separately.

FumingZhang and others added 10 commits October 30, 2026 01:35
Reuse approved Entra projection, native Broker/Connections authorization and scoped TLS endpoints for common-executor Custom agents. Preserve legacy boundaries, provider-token exclusion, image entrypoints and retained ownership; add Portal and Pi client integration with offline regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate the merged Custom model-selection and bound-Pod topology repairs. Revalidate the combined Custom identity, TLS, terminal, and served-admission paths without changing the focused feature patch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve Custom identity and ingress mTLS conflicts with upstream Gateway initialization and Kubernetes access. Preserve suspended grant handling, approved cross-namespace TLS controls and the upstream Gateway regression test import.

Keep the existing PR history; the merged tree matches the locally validated integration exactly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Return a fresh fetch Response for each Team options request and explicitly qualify Custom in the Gateway catalog. Assert that required identity stays locked on and creation submits the permitted identity and model sources exactly once.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve the runtime chart schema and immutable chart reconstruction conflicts by retaining Custom ingress server names alongside managed observed-SNI capture controls. Preserve both features and the original historical byte/hash assertions.

Validated offline chart rendering, full Helm and proxy packages, Custom and observed-SNI controller regressions, isolated API admission, operator vet/build, and Portal creation tests/build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require approved numeric Custom image users for observed-SNI capture, preserve managed initialization and headless readiness, and keep terminal TLS configuration independent. Enable the shared Kubernetes and FQDN adapters for explicitly registered container runtimes, with unit and served-API regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A real two-Agent limits-only rollout hit a shared coordination ConfigMap resourceVersion conflict and unnecessarily stopped one Agent. Re-read and revalidate reservations on bounded API CAS retries, preserving IDs while refusing stopped reservations and never replaying uncertain writes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The common Chat reader still expected plaintext Cilium and Service target ports after mTLS was enabled. Verify the approved caller-specific TLS control and listener without changing the HTTP private route or reading client Secrets. Restrict DestinationRule read access to the Portal namespace and cover drift and plaintext regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the Istio namespace Secret-list prerequisite separately from the Portal's narrow DestinationRule reader. Keep this deployment authorization out of default product RBAC.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The release inventory still rendered the runtime chart with pre-Gateway-only defaults, failing the local packaging regression and both dependent CI jobs. Use the same synthetic Secret reference and API base as the existing chart checks without weakening chart validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@FumingZhang FumingZhang changed the title fix(sandbox): repair Custom policy composition and reservation races fix(runtime): repair Custom composition and live-validation regressions Oct 30, 2026
Resolve #369 against merged #366 while preserving explicit capture probes, terminal TLS separation and CAS retries. Reuse the shared Chat TLS port and retain both compiled and drift regression tests, including the approved Secret source references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
FumingZhang and others added 6 commits October 31, 2026 02:34
Record a fenced definitive non-creation outcome after the first workload CREATE is rejected, allowing normal retry and deletion after binding success. Preserve earlier and uncertain submissions, disable hidden CREATE retries, and cover container/Kata recovery, CAS races and real API denial.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve ordered Helm control updates and late pruning while recording the first workload CREATE outcome even on Helm's initial update path. Previously recorded workloads retain opaque update barriers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use current GET absence to select the guarded CREATE path, while the durable controller checkpoint alone authorizes non-creation cancellation. Cover repeated admission denial and later success through real failed Helm release history, and preserve opaque outcomes for earlier or uncertain workloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	site/content/en/docs/operations/policy-teams.md
Document the independent 420-second outer tool deadline and a finite process-scoped override verified with eight-minute foreground tasks on both backends. Preserve approval controls, configuration precedence and lifecycle bounds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scope the existing durable submission checkpoint to the retained HOME workload. Approved auxiliary creates and updates retain current sealed-render claims without consuming initial primary non-creation proof; cleanup still requires auxiliary shutdown and quiescence. Cover Copilot-first retry/delete, failed Helm history, scoped guards and real API-server rejection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@feiskyer Pengfei Ni (feiskyer) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FumingZhang
FumingZhang merged commit 5fe7059 into main Oct 31, 2026
35 checks passed
@FumingZhang
FumingZhang deleted the fix/custom-combined-controls branch October 31, 2026 13:23
@FumingZhang

Copy link
Copy Markdown
Member Author

Code review

Found 1 issue, now fixed in 092e29607897078912d380041c81e1599fbbe402:

  1. A Copilot auxiliary CREATE/UPDATE consumed the primary HOME non-submission proof, so rejecting the initial StatefulSet could still block retry/deletion. Auxiliary writes now keep their own current render claims without consuming primary proof; uncertain primary writes and auxiliary quiescence remain guarded. Reproduced regressions, race/API-server tests and the full offline gate pass. The owned AKS cases also exercised repeated denials and normal cleanup; external Copilot sign-in remains a separate prerequisite.

// AuthorizeSandboxRender fences manifest delivery without declaring a primary
// workload submission.
func (p *PreparedRelease) AuthorizeSandboxRender(ctx context.Context) error {
if p == nil || p.sandboxReconcile == nil || p.sandboxRenderGuard == nil || p.sealedInput != p.inputDigest() {
return fmt.Errorf("Sandbox render requires unchanged current render and controller authority")
}
return p.sandboxRenderGuard(ctx)
}
// AuthorizeSandboxAuxiliaryApply fences an approved auxiliary without consuming
// the primary HOME writer's non-submission proof. Cleanup still waits for it.
func (p *PreparedRelease) AuthorizeSandboxAuxiliaryApply(ctx context.Context, object unstructured.Unstructured) error {
if p == nil || p.sandboxReconcile == nil || object.GetAPIVersion() != "apps/v1" || object.GetKind() != "Deployment" ||
object.GetNamespace() != p.sandboxReconcile.Namespace.Name ||
!slices.ContainsFunc(p.sandboxReconcile.Workloads, func(workload w.RenderedWorkload) bool {
return workload.Kind == "Deployment" && workload.Identity.Name == object.GetName()
}) {
return fmt.Errorf("Sandbox auxiliary apply requires its sealed workload identity")
}
return p.AuthorizeSandboxRender(ctx)
}
// AuthorizeSandboxApply rechecks authority and records submission intent before
// a primary or opaque workload apply. Earlier submissions remain submitted.
func (p *PreparedRelease) AuthorizeSandboxApply(ctx context.Context) error {
if p == nil || p.sandboxReconcile == nil || p.sandboxGuard == nil || p.sealedInput != p.inputDigest() {
return fmt.Errorf("Sandbox apply requires unchanged current render and controller authority")
}
return p.sandboxGuard(ctx)
}
// AuthorizeSandboxWorkloadCreate binds a definite primary non-creation result to
// this submission. Callers without a rejection recorder retain the opaque barrier.
func (p *PreparedRelease) AuthorizeSandboxWorkloadCreate(ctx context.Context) (func(error) error, error) {
if p == nil || p.sandboxReconcile == nil || p.sandboxGuard == nil || p.sealedInput != p.inputDigest() {

This self-review does not replace independent maintainer approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants