Skip to content

feat(deploy): container sandboxes and P4 on one stack (P6.3 PR 3, #425) - #454

Merged
pdettori merged 26 commits into
rossoctl:mainfrom
pdettori:feat/425-slice3-pr3
Oct 7, 2026
Merged

pdettori merged 26 commits into
rossoctl:mainfrom
pdettori:feat/425-slice3-pr3

Conversation

@pdettori

@pdettori pdettori commented Oct 6, 2026

Copy link
Copy Markdown
Member

Summary

PR 3 of 3 for #425 (P6.3, slice 3 of #426): every deployment path can run both sandbox tiers, container sandboxes and P4 microVM workers, on one stack. Each session stays in the tier it was created in, and returns to the sandbox that served its previous turn. PR 1 (#442) and PR 2 (#444) shipped the harness, relay, workers, control plane and mocactl.

What changed

  • Templates (VM, Compose):
    • SH_SANDBOX_TIERS, SH_SANDBOX_DEFAULT_TIER and the two affinity timings, offered commented out.
    • The relay gets SH_SANDBOX_AFFINITY_TTL_SECONDS, its detach-mark TTL.
    • A Compose tier-parity check renders both services with tiers set; it is proven to fail when one service loses the line.
  • Kubernetes manifests:
    • The supervisor and control plane read the tiers from moca-settings with optional: true, so a slice-1/2 stack renders as before.
    • Affinity timings are pinned. Sandboxes say SANDBOX_TIER: container.
    • A test checks the supervisor and control plane read identical tier settings.
  • Code carry-ins:
    • The knative-server worker validates the tier settings at boot and exits 2 on a bad value, as for SH_SANDBOX_DISCOVERY.
    • An untiered deployment ignores a stored session tier in the exchange and the views.
  • deploy/microvm/setup-microvm.sh: a host with container sandboxes and a P4 worker is tiered, not refused.
    • One microvm-tiers.env file is loaded by drop-ins for the supervisor and control plane, so the two cannot disagree. It is removed when the host is no longer mixed.
    • The script try-restarts only the units that are installed.
    • SH_SANDBOX_DEFAULT_TIER is sticky, and validated before anything is written.
    • It refuses to tier a host whose running container sandboxes do not advertise moca.dev/tier=container (a pre-P6.3 image), and names the pull.
    • --remote never touches the tier files.
    • p4-turn-smoke.sh is tier-aware.
  • deploy/k8s/setup.sh: a stack with SH_SANDBOX_COUNT>0 and SH_P4_SANDBOX_IDS is tiered; slice 2's one-tier refusal is gone.
    • SH_SANDBOX_DEFAULT_TIER is a sticky input, and kind validates it too.
    • The settings hash now rolls the supervisor as well as the control plane.
    • SH_SANDBOX_COUNT=00 counts as zero.
  • Smoke:
    • Claim 12: four sessions, first turns concurrent, and every second turn lands on its first turn's sandbox.
    • On a tiered stack every session names its tier, and P2 checks the P4 records' tier label.
    • P7 no longer forces SH_SANDBOX_COUNT=0, which would have scaled a mixed stack's containers away.
    • Bash 3.2 safe.
  • Docs:
    • spec v1.4: tiers only on a mixed stack, boot validation, the untiered view, and a §5 correction for relay restarts;
    • P4-ON-P6.md ("Container sandboxes and P4 on one host"), README §2 and §11–12, the slice-2 spec, and the VM demo.

The deployment rule

Tiers are set only on a stack that runs both tiers. A single-tier stack stays untiered, so it gets affinity but no filtering. A pre-P6.3 worker advertises no tier, and a tiered harness excludes it, so tiering a single-tier stack would only risk capacity. This deliberately deviates from spec v1.3 §7 and is recorded in v1.4 §0.4.

Operator-visible changes

  • The first apply of this release on K8s recreates the relay (Recreate) and rolls every sandbox pod. Container workspaces are pod-local, so they reset silently; run it at a quiet time (README §2, §11.1).
  • From then on, any moca-settings change rolls the supervisor (120 s drain) as well as the control plane.
  • A bad tier setting now fails the worker at boot instead of on the first turn.

Results

Rebase onto #448

This branch was rebased onto main after #448 (ocp-single opt-in Routes) merged.

  • The one conflict, in setup.sh, setup.test.sh and the overlay tests, was resolved inside the commit it touched. Both features are kept. A combined ocp-single case covers Routes, --tls-secret and the default tier, and checks there is still exactly one settings-hash annotation per Deployment.
  • New behaviour for feat(deploy/k8s): ocp-single opt-in Routes -- SH_ROUTE_DOMAIN and --tls-secret #448's toggle: turning Routes on or off changes SH_PUBLIC_HARNESS_URL in moca-settings, so it now rolls the supervisor too.
  • One extra commit (f1ce17c) fixes a race in feat(deploy/k8s): ocp-single opt-in Routes -- SH_ROUTE_DOMAIN and --tls-secret #448's tests: two vitest files rendered into the same .generated/ directory.
  • Where the evidence comes from:
    • The hardware acceptance ran on the pre-rebase head, with the image built from 123c320.
    • After the rebase: the bash suites (also under bash 3.2), the k8s vitest suite (79/79), make lint and make typecheck pass.
    • make test passed on its third run. The second failed once in knative-server runs-auth-route.test.ts, which this PR does not touch; the test passes on its own.
    • CI's k8s-kind-e2e reruns the Kind smoke.

Follow-ups

Closes #425.

🤖 Generated with Claude Code

…with tier-parity checks (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…iers; the relay and sandboxes carry theirs (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…h tiers set (rossoctl#425 review)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…er boot; an untiered deployment shows no stored tier (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…; the untiered view (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…d, not refused (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…tiered host (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…mo says a host may run both tiers (rossoctl#425 review)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
… it moves (rossoctl#425 review)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…ered, not refused; a sticky default tier (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…ier-aware P4 smoke (rossoctl#425)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…tainer sandboxes advertise the container tier (rossoctl#425 review)

setup-vm.sh never pulls, so an older host keeps a pre-P6.3 sandbox image whose worker advertises no moca.dev/tier; tiering that host excluded every container sandbox and failed every default-tier session. preflight now reads each running sh-sandbox-* container's presence record and refuses, writing nothing, a record with no or another tier (naming the podman pull, then setup-vm.sh), a running container with no record, and an unreachable Redis; a stopped container is warned about. install_tiers removes the drop-ins before the env file they load, and says why EnvironmentFile= has no '-'. P4-ON-P6.md: the pull step and the check, the default tier's resolution, and why an unauthenticated /turn on a tiered host never reaches the microVM tier.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…OX_COUNT=00 is zero; the first P6.3 apply recreates the relay (rossoctl#425 review)

parse_args checks a given SH_SANDBOX_DEFAULT_TIER on every target before anything touches a cluster (kind still stores none). load_setup_inputs normalises SH_SANDBOX_COUNT once, so 00 with P4 IDs is an untiered P4-only stack. setup.test.sh unsets SH_SANDBOX_DEFAULT_TIER at the top. README sections 2 and 11.1: the first apply of this release recreates the relay (SH_SANDBOX_AFFINITY_TTL_SECONDS, strategy Recreate) and rolls every moca-sandbox pod (SANDBOX_TIER), resetting container workspaces with no workspace-reset notice; run it at a quiet time.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
… after a pass (rossoctl#425 review)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…ault tier; env parity on a hand-tiered deploy/vm stack (rossoctl#425 review)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…SIGTERM teardown, rossoctl#453)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…s own directory (rossoctl#448 follow-up)

generated-overlay.test.ts and overlay-ocp-single-routes.test.ts both used
deploy/k8s/.generated/test-ocp-single-routes. vitest runs test files in
parallel, so one file's afterAll rmSync could remove the directory before
the other's kubectl kustomize read it ("not a valid directory"); make test
failed this way after the rebase onto rossoctl#448. The generated-overlay case now
writes .generated/test-generated-ocp-single-routes.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Summary

No blocking issues. The tiering is consistent across all three deployment paths:

  • The supervisor and control plane read identical moca-settings keys (optional: true).
  • Boot validation in knative-server uses the same parseSandboxTiers as the runtime.
  • Every control-plane read of the session tier goes through sessionTier/viewTier.
  • Setup validation runs before anything is written, and count parsing handles 00/08/09.
  • The .generated/ race fix leaves every vitest render directory unique.

The two comments most worth acting on:

  • --remote on a mixed host can leave a stale microvm tier declared locally (setup-microvm.sh L544).
  • Smoke claim 12 can pass without exercising affinity when the first turns don't overlap (smoke.sh L514).

The rest is coverage hardening and doc drift. One spot is outside the diff: docs/specs/2026-10-04-p6-on-kubernetes-slice2-design.md:222 still says "both tiers together are refused" with no superseded marker (L47/L120 have one), and L185 still says "today's 11 claims" (now 12).

Author: pdettori (MEMBER — maintainer)
Areas reviewed: TypeScript (control-plane, knative-server, supervisor k8s tests), K8s manifests, shell (setup/smoke/microvm), Compose, docs/specs
Agent/IDE config (.claude/.vscode): none
Commits: 17 commits, all signed-off: yes
CI status: passing (14/14)

Posted as COMMENT because GitHub does not allow approving your own PR; the verdict would otherwise be APPROVE.

Comment thread deploy/microvm/setup-microvm.sh Outdated
install_units
if [[ -n "$REMOTE_BUNDLE" ]]; then install_env_remote; else install_env; fi
# --remote: the cluster's setup.sh owns the tiers, so the tier files are neither written nor removed.
[[ -n "$REMOTE_BUNDLE" ]] || install_tiers

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

suggestion: Moving a mixed local host to --remote leaves microvm-tiers.env and both drop-ins in place. The local supervisor and control plane keep declaring container,microvm, but this host's only microVM worker now attaches to the cluster's relay (as the comment at L178 notes). With a sticky default of microvm, every untiered local session then fails with "no attached sandbox in tier microvm". Consider running the MIXED==0 removal path on --remote, or at least warning that the local stack still declares a tier it can no longer serve.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 665726b. --remote now runs install_tiers's removal path: microvm-tiers.env and both drop-ins are removed, and the installed sh-supervisor/sh-control-plane are try-restarted. The host's own P6 is container-only from then on, so the mixed-only rule makes it untiered. A remote-only host with no P6 units is covered: nothing is restarted and the run exits 0. The README and P4-ON-P6.md say so in 99ad6ca.

Comment thread deploy/microvm/setup-microvm.sh Outdated
# The RESOLVED value is checked, so a bad stored one is refused too -- on both paths, before the
# --remote return below, so a bad value writes nothing anywhere (--remote ignores it, but a typo
# should not pass silently).
local tiers_env="$SH_ENV_DIR/microvm-tiers.env" from

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

suggestion: The sticky default is stored only in microvm-tiers.env, and only a mixed host writes that file. So on a P4-only host SH_SANDBOX_DEFAULT_TIER=microvm is accepted and then silently dropped. Going mixed → single deletes the stored choice, so a later return to mixed resets the default to container with no message, and p4-turn-smoke.sh's unauthenticated precondition then fails. A warning like "set on an untiered host, not recorded" would make this visible.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 665726b. A given SH_SANDBOX_DEFAULT_TIER on a host that ends up untiered (P4-only or --remote) logs that it is ignored and not recorded. Removing a microvm-tiers.env whose stored default isn't container logs that the default is dropped with it. Both lines are tested. In 99ad6ca a bad stored value's refusal also names the clear (SH_SANDBOX_DEFAULT_TIER=).

Comment thread deploy/compose/tests/compose.test.sh Outdated
fail "control plane SH_SANDBOX_TIERS should be absent by default, got '$cp_tiers_absent'"
pass "supervisor and control plane both absent of tiers by default (untiered mode)"

# Render with tiers set: each service must receive the value from .env, and both must be identical.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

suggestion: The parity check covers SH_SANDBOX_TIERS and SH_SANDBOX_DEFAULT_TIER. SH_SANDBOX_AFFINITY_TTL_SECONDS is also added to both sandbox-relay and supervisor, and the env examples say the two must match, but nothing checks that pair. Also, the PR description says the check is proven to fail when one service loses the line, but no automated mutation step does that. A small negative case (strip one line, expect failure) would lock it in.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e4c7cd3. The check is now parity_check <compose file>. It covers SH_SANDBOX_AFFINITY_TTL_SECONDS (supervisor vs sandbox-relay) as well as the two tier keys, both set and absent. It is required to FAIL on four sed-mutated copies. Separately, compose.test.sh used declare -A, so under bash 3.2 it stopped after its first check and still exited 0. Its tables are now plain functions, and all checks run under 3.2.

Comment thread deploy/k8s/smoke.sh Outdated
[[ "${#aff_sids[@]}" == 4 ]] || aff_ok=0
for i in ${aff_sids[@]+"${!aff_sids[@]}"}; do
# shellcheck disable=SC2016 # $HOSTNAME is the sandbox's: it must expand there, not here
turn "where1-$i" "${aff_sids[$i]}" "$(ask K8S-SMOKE-WHERE-1 'echo "where=$HOSTNAME"')" &

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

suggestion: The concurrent first turns are a bare echo, so they often finish before the next one starts. When they don't overlap, the least-loaded choice puts all four on one sandbox. The second turns then land there whether affinity works or not, so the claim passes without exercising affinity (only the luck note at L534-536 hints at it). A short hold such as sleep 2; echo "where=$HOSTNAME" would force the spread and make the claim meaningful.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in fe26899. The first turns run sleep 2; echo "where=$HOSTNAME", in the prompt and in the mock's K8S-SMOKE-WHERE-1 steps, so their leases overlap and the least-loaded choice spreads them. The second turns have no sleep. A drift test pins the asked commands to the mock's steps.

Comment thread deploy/k8s/smoke.sh Outdated
# turns would all go to the first sandbox, so a session first served by the other one would move.
# Plain indexed arrays (bash 3.2), and wait on OUR pids only: port-forwards run in the background too.
aff_sids=() aff_pids=() aff_first=()
for i in 0 1 2 3; do new_session && aff_sids+=("$SID"); done

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

suggestion: Claim 12 runs right after claim 10 deletes redis-0, and nothing waits for the supervisor and control plane to reconnect to Redis. A transient failure in new_session or in a first turn here would be a flaky FAIL. Consider waiting for presence records, or for a successful POST /v1/sessions, before claim 12.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in fe26899, with a shellcheck follow-up in f5ccc7c. Before claim 12, wait_for 60 new_session waits for a successful POST /v1/sessions. On timeout, claim 12 FAILs with a message saying so and runs no turns. 99ad6ca adds --max-time 10 to that POST, so the wait is bounded in time, not just attempts. The retry and timeout cases are tested.

Comment thread deploy/microvm/setup-microvm.sh Outdated
local sup="$SH_UNIT_DIR/sh-supervisor.service.d/$TIERS_DROPIN"
local cp="$SH_UNIT_DIR/sh-control-plane.service.d/$TIERS_DROPIN"
if ((MIXED == 0)); then
# The drop-ins first, then the env file they load: never a unit pointing at a file that is gone.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nit: Removing the drop-ins before the env file doesn't close the "unit pointing at a missing file" window. systemd keeps using the cached drop-in until the daemon-reload in apply(), which runs after both files are gone. The matching ordering test checks the order of CHANGED, which doesn't guarantee anything at runtime. Consider dropping the claim from the comment, or just relying on the reload.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed: systemd keeps the cached drop-in until daemon-reload, so the removal order guaranteed nothing at runtime. In 665726b the comment drops the claim and says the units see the change at the reload and try-restart in apply(). The order test is deleted.

Comment thread deploy/k8s/smoke.sh Outdated
# setup.sh writes the sticky moca-setup early, so even a failed add can leave the scratch id
# behind (sticky, with a token and a bundle): the restore runs whenever the add was attempted.
if ! SH_SANDBOX_COUNT=0 SH_P4_SANDBOX_IDS="$ids,$SMOKE_P4_ADD_ID" bash "$setup_sh" --target ocp >"$OUT/p7-add.log" 2>&1; then
if ! SH_P4_SANDBOX_IDS="$ids,$SMOKE_P4_ADD_ID" bash "$setup_sh" --target ocp >"$OUT/p7-add.log" 2>&1; then

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nit: P7 leaves SH_SANDBOX_COUNT and SH_SANDBOX_DEFAULT_TIER to the caller's environment. If an operator has either exported, P7's setup.sh runs change the stack; env -u SH_SANDBOX_COUNT -u SH_SANDBOX_DEFAULT_TIER would match the stated intent. Related: deploy/k8s/tests/smoke.test.sh:343 expects count=unset without unsetting it (unlike setup.test.sh:14), so it fails in a shell that exports it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in fe26899. Both of P7's setup.sh runs use env -u SH_SANDBOX_COUNT -u SH_SANDBOX_DEFAULT_TIER, and a test exports both values and checks they don't reach it. smoke.test.sh now unsets both at the top, as setup.test.sh does.

Comment thread deploy/k8s/setup.sh Outdated
else
STORED_DEFAULT_TIER="$(cm_value "$json" SH_SANDBOX_DEFAULT_TIER)"
fi
case "$STORED_DEFAULT_TIER" in

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nit: A bad stored default tier dies with the same message as a bad given one. The count error at L333 says where the value came from. This one could say the value is from moca-setup and that SH_SANDBOX_DEFAULT_TIER= clears it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 05cf616. A bad stored default tier now says the value came from ConfigMap moca-setup and that SH_SANDBOX_DEFAULT_TIER= (set but empty) clears it, mirroring the count's message. Tested.

Comment thread deploy/k8s/setup.sh
check_tiers
# Normalised once, so every later comparison may be a string one: 00 is 0 (no container
# sandboxes, so untiered), and 08 is 8, not an octal error.
SH_SANDBOX_COUNT=$((10#$SH_SANDBOX_COUNT))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nit: $((10#...)) overflows silently on a very long count (e.g. 20 digits). The result can be negative, which counts as "not 0" (tiered) and renders negative replicas. A length cap such as ^[0-9]{1,4}$ would prevent it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 05cf616. SH_SANDBOX_COUNT, given or stored, must match ^[0-9]{1,4}$, and the message states the limit. A 20-digit count is refused and stores nothing (tested).

- **Data plane, boot.** `worker-boot.test.ts` forks the real worker: a duplicate tier and a
default outside the list each exit 2 before `ready`, naming the variable; a valid pair boots.
- **Env parity.** The k8s manifest test and `compose.test.sh` (§7).
- **mocactl, unit.** `--tier`, the picker, the notice for `workspace_reset`, ignoring an unknown

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nit: This line and L419 still mention mocactl --tier. The spec's own correction (L57) and the README (--option sandboxTier=…) say there is no such flag. The Status: line (L5) and docs/specs/README.md:90 also still say "Proposed", although this PR ships the deployment paths.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in f4dc2b9. The spec uses --option sandboxTier=… (no other mocactl --tier remains). Status: is now Implemented — PRs #442, #444 and #454; accepted on the KVM rig and OpenShift 4.20.8 (#425), and the P6.3 registry row says implemented. From the review summary: slice 2's L222 gets the superseded pointer, and L185's "11 claims" is marked as slice 2's count (P6.3 adds claim 12). In 99ad6ca its §5 "touches nothing local" gets a pointer too.

…r dropped default tier is logged (rossoctl#454 review)

On --remote this host's only microVM worker attaches to the cluster's relay, so its own P6 is
container-only: install_tiers' removal path now runs there too (MIXED=0), and apply try-restarts the
installed supervisor and control plane as on the local path. A SH_SANDBOX_DEFAULT_TIER given on a host
that ends up untiered is named as ignored, and removing a microvm-tiers.env whose stored default is not
container names the dropped value. The removal-order claim and its test are gone: units see the change
at apply's daemon-reload and try-restart, whatever the order of the rm's.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…nd is proven to fail on a mutated file (rossoctl#454 review)

parity_check takes the compose file: the tier pair (supervisor, control plane) and the affinity
TTL pair (supervisor, relay) must be absent in both by default and identical when .env sets them. It
then runs on four copies of docker-compose.yml with one service's line deleted, and must fail on each.
The mirror tables move from declare -A to a case: under bash 3.2 the suite stopped after its first
check and still exited 0.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…t claim 10's Redis restart; P7 ignores exported count/tier (rossoctl#454 review)

Each first turn is 'sleep 2; echo "where=$HOSTNAME"' (smoke.sh's prompt and mock-anthropic.mjs's step),
so the four leases are held together and least-loaded spreads them; the second turns stay a bare echo.
Before claim 12, the first session POST is retried for up to 60 s after claim 10's Redis restart; a
stack that takes none FAILs claim 12 saying so. P7's two setup.sh runs drop SH_SANDBOX_COUNT and
SH_SANDBOX_DEFAULT_TIER from the environment (env -u), and smoke.test.sh unsets both at the top.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…ed by the exchange, the session views and resources once they are not (rossoctl#454 review)

A record with sandboxTier 'microvm' under sandboxTiers: null runs through exchangeCredential (no
sandboxTier field), listSessions and getSession (null), and projectResources and GET .../resources
(session.sandboxTier null). Each fails when its consumer reads rec.sandboxTier directly.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…andbox tiers identical on the supervisor and control plane (rossoctl#454 review)

write_overlay's env patches touch both Deployments only there: SH_SANDBOX_TIERS and
SH_SANDBOX_DEFAULT_TIER must still be present on both and equal, as env-parity.test.ts checks on base.
A supervisor-only SH_SANDBOX_TIERS injected into the patch fails it.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…ier; SH_SANDBOX_COUNT is at most 4 digits (rossoctl#454 review)

A bad stored SH_SANDBOX_DEFAULT_TIER now says ConfigMap moca-setup holds it and that
SH_SANDBOX_DEFAULT_TIER= (set but empty) clears it, as the stored count's refusal does; a given one is
validated once, in parse_args. SH_SANDBOX_COUNT, given or stored, must match ^[0-9]{1,4}$: a longer
one overflowed $((10#...)) silently, possibly negative (tiered, negative replicas).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…nd 11 claims marked historical (rossoctl#454 review)

The P6.3 spec's Status is Implemented (PRs rossoctl#442, rossoctl#444 and rossoctl#454; accepted on the KVM rig and OpenShift
4.20.8), its two mocactl --tier mentions are --option sandboxTier=..., and the README's P6.3 row is
implemented. The slice-2 spec's 'both tiers together are refused' carries the P6.3 superseded pointer,
and its '11 claims' is the count of slice 2's time (P6.3 adds claim 12).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…omes through wait_for (rossoctl#454 review)

make lint's shellcheck flagged SC2120 on the S5 change: wait_for passes 'quiet' through "$@".

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
…ion POST is time-bounded; a stored bad default names its clear (rossoctl#454 review)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori pdettori added the ready-for-ai-review Request automated AI code review from clawgenti label Oct 7, 2026
@pdettori
pdettori merged commit d36d3ab into rossoctl:main Oct 7, 2026
14 checks passed
@pdettori
pdettori deleted the feat/425-slice3-pr3 branch October 7, 2026 02:51
pdettori added a commit that referenced this pull request Oct 8, 2026
Brings in P6.3 sandbox tiers (#454) and 80 other commits. Every conflict
was additive: SessionRecord, the exchange response, createSession,
TurnAuth, ExecuteTurnInput and the OpenAPI document now carry both
configRef (ADR-0038) and sandboxTier (P6.3).

One ordering decision in executeTurn: placement is recorded first, then
the config bundle is attached, then the P6.3 reset frame is emitted.
The reset frame flushes the SSE headers, so attaching before it keeps a
missing bundle a plain 410 rather than an error frame.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ai-review Request automated AI code review from clawgenti

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox tier selection and session-to-sandbox affinity in selectPoolSandbox (P6-on-K8s slice 3)

1 participant