Skip to content

feat: a Moca Pi session can choose a sandbox template - #759

Closed
webchang wants to merge 20 commits into
rossoctl:mainfrom
webchang:pr/i7-session-templates
Closed

webchang wants to merge 20 commits into
rossoctl:mainfrom
webchang:pr/i7-session-templates

Conversation

@webchang

@webchang webchang commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Closes #731.

What it does: a Moca Pi session can name a sandbox template, and its turns run on, and are seeded by, that template's workers. Eight signed-off commits, in the order they build on each other:

  1. The design doc (docs/specs).
  2. Workers advertise their sandbox template; the relay strips the label from what it forwards.
  3. The control plane: a session can name a template; affinity follows it, and an affine sandbox whose record now serves another template is reset with the existing retiered reason.
  4. The harness and knative-server: turns run on, and seed, the session's template.
  5. mocactl: a session option for the template.
  6. setup-microvm.sh --template: installs a templated worker.
  7. Docs: the concepts and the configuration reference.
  8. The seed's own files stay out of a seeded repository's patch (via git's info/exclude), and the seed log's wording.

API: openapi 1.9.0 → 1.10.0 on main, with a CHANGELOG entry (#762 also claims 1.10.0, so whichever merges later renumbers); harness-openapi 1.1.0, description only.

Notes for review:

  • Seeds must not print secrets. The seed log sits in the agent's workspace.
  • The exclude lines are anchored at the repository root. They apply when the workspace is the repo's root (a seeded checkout); a workspace that's a subdirectory of a repo isn't covered.
  • Async turns (feat(control-plane): async turn submission and turn records (#387) #704) carry no template yet, as the issue's Limits say.
  • The fixtures use public SWE-bench instance ids as example template names.

Tests on the tip:

  • typecheck;
  • harness 824, control-plane 1,205, knative-server 440, sandbox-relay 228 (with Redis), mocactl 1,722 (run serially);
  • go test ./...;
  • setup-microvm.test.sh on bash 5;
  • the harness's seed tests: 57 after the last commit.

46 files, +2,339 / -32.

Assisted-By: Claude Code

A Moca Pi session picks its hands by tier only. Sandbox-service
clients can pick a template, a worker serving one snapshot, but a
session cannot, so a session that needs one environment may land on
a worker of any snapshot in its tier and starts in an empty
workspace.

The design follows P6.3's tier path:
- workers advertise a second presence label, moca.dev/template, from
  SANDBOX_TEMPLATE;
- a session names a template at creation, validated against
  SH_SANDBOX_TEMPLATES (the list the sandbox profile reads, with an
  optional seed);
- the exchange carries the template and seed to the data plane, and
  the harness keeps the session on workers with that label.

A session with no template runs only on untemplated workers. The
harness seeds a templated workspace once, on its first use.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
SANDBOX_TEMPLATE, set and non-blank, adds the Hello label
moca.dev/template (session.TemplateLabels, merged with the tier by
session.Labels) in both cmd/worker and cmd/microvm-worker. Unset or
blank sends no label; there is no default, because a session with no
template must never land on a templated worker.

The relay passes the label through like any other, and removes it
from a worker attached with a workload binding: workload sandboxes are
not templated, and the binding does not sign a template. The harness
exports the label's name as TEMPLATE_LABEL.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
The harness profile now reads SH_SANDBOX_TEMPLATES too, the same JSON
list the sandbox profile reads, with an optional seed per entry
(worker is ignored here: selection is by label).

- POST /v1/sessions takes sandbox.template. A non-string is 400
  invalid_request; an id not declared is a 400 listing the declared
  ids; with none declared, any template is a 400.
- SessionRecord.sandboxTemplate stores it, and the session views show
  it. GET /v1/discovery gains sandboxTemplates, without the seeds.
- The exchange returns sandboxTemplate and sandboxSeed, both omitted
  for a session that named none, so a deployment without templates
  answers byte-identically. It fails closed: a template later dropped
  from the list is still sent, without a seed, so the turn finds no
  worker and is refused rather than run on an untemplated worker on an
  empty workspace.

The control-plane API goes to 1.4.0, with its changelog entry.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
…emplate

TurnAuth carries the exchange's sandboxTemplate and sandboxSeed,
refusing a present template that is not a non-empty string and a
non-string seed. executeTurn passes them to acquireTurnSandbox.

- selectPoolSandbox, after the tier filter, keeps only records whose
  moca.dev/template equals the session's, or for a session with none
  only records without the label. SandboxPoolEmptyError names the
  template and the fix (SANDBOX_TEMPLATE=<id>).
- An affine sandbox that now serves another template, or none, is
  reset at once with the existing retiered reason, so the
  workspace_reset frame is unchanged on the wire.
- The seed runs on the first turn that uses the workspace, in it:
  under flock .moca-seed.lock, [ -e .moca-seeded ] || { <seed>
  >.moca-seed.log 2>&1 && touch .moca-seeded; }. The marker lives in
  the workspace, so a reset workspace is seeded again; the output goes
  to the log, never into the turn; the lease is renewed while it runs.
  A failure is SandboxSeedError (500, not retryable) naming the
  template, the exit code and the log, and returns the lease.

Leaves and unauthenticated turns pass no template. The relay's
integration test runs templated and untemplated workers through a
real relay and Redis. The harness API document goes to 1.1.0.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
- --option sandboxTemplate=<id>, its choices from discovery's
  sandboxTemplates, with "none" first and preselected so a deployment
  declaring one template does not have it picked for every session.
  A value not among the choices is sent as given (id@build, id:tag),
  for a control plane that resolves such references; its refusals are
  shown as worded.
- A create answered 409 template_not_active is retried after its
  Retry-After, for up to 10 minutes; mocactl run says it is waiting.
- The sessions list shows a session's template beside its tier, and
  the workspace_reset notice says "another tier or template".
- mocactl run refuses an empty --session rather than starting a new
  session, gives the server's reason when it waits on "no capacity",
  and stops waiting after 15 minutes.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
…rker

setup-microvm.sh --template ID --snapshot DIR [--budget-mb N] [--egress]
installs a second P4 worker beside the untemplated main one, serving
the snapshot DIR as sandbox template ID: instance tpl_<id> of a
template unit [email protected], in its own slice (a worker
sweeps its parent cgroup at start, so two never share one), with its
own relay token, env file, and workspace and jail roots on the
snapshot's filesystem under a short key, so the VMs' API socket path
fits. Its guest RAM is the manifest's; the budget defaults to one
session's worth. A re-run changes nothing and keeps the token, budget
and egress; another snapshot under the same id is refused (a new
snapshot is a new template worker).

--egress is refused while another worker on the host uses moca-egress,
which keys VM listeners by an id every worker reuses.
--uninstall-template ID removes exactly what --template wrote and
keeps workspace data.

P4-ON-P6.md documents the templated worker, and mock-anthropic.mjs
gains TPL-SMOKE-LOOK, a scripted prompt that reports what a turn's
workspace holds, for a check without model cost.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
… reference

- docs/concepts/sandboxes-and-tiers.md: a Templates section, covering
  what a template is, how a session picks one, the seed, the fail
  closed rule and affinity moves.
- docs/reference/configuration.md: SH_SANDBOX_TEMPLATES on the
  control plane's harness profile, and the worker's SANDBOX_TEMPLATE.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
On a template whose seed puts a repository at the workspace root, the seed's marker, log and lock
(.moca-seeded, .moca-seed.log, .moca-seed.lock) showed as untracked files, so a patch taken with
`git add -A` or `git status --porcelain`, or an agent that commits everything, picked them up. After a
successful seed, when the workspace is a git repository, the three are added to its info/exclude
(each once; best-effort, so a workspace without git seeds as before). SEED_LOCK is now a named
constant beside SEED_MARKER and SEED_LOG.

The seed log's comment and the design say what holds: it is never in the turn's output, but it is in
the agent's own workspace, so a seed must not print a secret.

Tests (real bash and git): a seeded repository's status shows only the seed's own file, and each
exclude line appears once across a re-seed; a workspace without a repository seeds as before.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
…015)

Two checks in the `--template` code used `a && b || die`, which shellcheck flags (SC2015: the die also
runs if b's own command fails for another reason), and the setup test's "shellcheck clean" step fails
on it: the derived unit's Slice= and SH_PARENT_CGROUP= lines, and the budget's lower bound. Both are
now `if …; then die; fi`, with the same messages and the same refusals. The test's count of the main
worker's kept files is a plain loop rather than `ls | wc -l` (SC2012).

Tests: shellcheck 0.11.0 clean on both files; setup-microvm.test.sh PASS on bash 5 and 3.2.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
… too

"both env files are 0600" tried BSD `stat -f '%Lp'` first. On Linux GNU `stat -f` is filesystem status,
so it succeeded with a listing, the `||` never ran, and the check failed on CI while passing on macOS.
It now uses the file's own `mode()` helper, which tries GNU `stat -c %a` first.

Tests: setup-microvm.test.sh PASS on macOS with bash 5 and 3.2; shellcheck clean. (The CI log showed
the Linux failure; the helper is what the rest of the file already uses there.)

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
One conflict, docs/reference/configuration.md's control-plane table: main's rows kept (its
LEAF_RESULT_TTL_SECONDS wording), with this PR's SH_SANDBOX_TEMPLATES row.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
@pdettori pdettori added the ready-for-ai-review Request automated AI code review from clawgenti label Nov 12, 2026

@clawgenti clawgenti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clawgenti Code Review

Summary

The template design is careful:

  • It fails closed when a template is dropped from the deployment.
  • An untemplated session can never land on a templated worker.
  • The relay strips moca.dev/template from workload-bound sandboxes.
  • The seed runs once under a marker, a flock and a held lease, and its output stays out of the turn.

There is one must-fix:

  1. A capacity refusal during the seed becomes a permanent 500 (harness/src/run-turn.ts:353). seedWorkspace wraps every exec rejection in SandboxSeedError, including SandboxCapacityRefusedError, so a retryable 503 sandbox_unavailable comes back as a 500 internal_error. The seed is the exec that starts a templated microVM, which makes it the exec most likely to hit memory-budget:.

There is also one suggestion inline, about async turns failing open on templated sessions.

Author: webchang (MEMBER — maintainer)
Areas reviewed: TypeScript (harness, control-plane, knative-server, sandbox-relay, mocactl), Go (remote-worker labels), Shell (setup-microvm.sh), Docs/OpenAPI/spec
Agent/IDE config (.claude/.vscode): none
Commits: 11 commits, all signed-off: yes
CI status: passing

Verified by:

  • Tests on head, all passing:
    • harness turn-seed + select-sandbox-templates: 57/57
    • control-plane session-templates: 15/15
    • knative-server turn-auth: 69/69
    • mocactl session/headless suites: 173/173
    • sandbox-relay relay-workload-labels: 23/23
  • shellcheck on setup-microvm.sh and its test: clean. setup-microvm.test.sh: pass.
  • Two throwaway vitest probes, one for the seed's status mapping and one for async-turn placement. I deleted both afterwards.

Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).

Comment thread harness/src/run-turn.ts
res = await transport.exec(command, { timeout: 600 });
} catch (err) {
// A transport failure or the worker's timeout (`timeout:600`): still the seed's failure.
throw new SandboxSeedError(template, (err as Error)?.message ?? String(err));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

must-fix: This catch wraps every exec rejection in SandboxSeedError, including a SandboxCapacityRefusedError (the worker's memory-budget: / max-runs: / busy: queue full refusal, #452). turnErrorStatus matches on err.name (server.ts:462), so after the wrap that refusal returns 500 internal_error instead of 503 sandbox_unavailable + Retry-After. The seed is the first exec of a templated session, which on a microVM is the exec that starts the VM, so it is the exec most likely to be refused for capacity. A transient "host full, retry" becomes a failure that spec §5 calls not retryable, and mocactl will not retry it.

Probe on head: turnErrorStatus of seedWorkspace({exec: () => reject(new SandboxCapacityRefusedError("memory-budget: …"))}) gives name SandboxSeedError and status 500. The same error unwrapped gives 503. (I deleted the probe.)

Suggested fix: rethrow capacity refusals unchanged before wrapping, e.g. if (err instanceof SandboxCapacityRefusedError) throw err;, and add a turn-seed.test.ts case that pins the 503 path.

`TurnAuth` gains `sandboxTemplate` and `sandboxSeed`; `executeTurn` passes them to
`acquireTurnSandbox`, which passes `opts.template` to `selectPoolSandbox` and runs the seed (§5).
Leaf paths and unauthenticated turns pass no template. The async turn exchange
(`POST /internal/turn-credentials`, ADR-0047) does not carry the template in this change: an async

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: This paragraph acknowledges that the async exchange does not carry the template, but today that gap fails open rather than closed. POST /v1/sessions/{id}/turns accepts a templated session, and turn-exchange.ts sends no sandboxTemplate. The leaf then runs with the session id as its affinity key, so it lands on an untemplated worker with an unseeded workspace. It also rewrites the affinity, so the next sync turn gets a spurious workspace_reset (retiered).

Probe on head, with the PR's fakeLease/fakeAffinity and one session id: a templated selection gets py-1. The untemplated (async) selection then gets plain-1 with {from:"py-1",reason:"retiered"}, and the next templated selection gets py-1 with {from:"plain-1",reason:"retiered"}. (I deleted the probe.)

Suggested fix: until the exchange carries the template, have submitTurn refuse a session whose sandboxTemplate is set with a 4xx (for example "async turns do not support sandbox templates yet"). Document that here and add a control-plane test.

@ingpaolodettori-dev ingpaolodettori-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Template selection looks solid. The choice is exact-match allowlisted against operator config, seeds come only from operator env (discovery omits them, shq + bash -c, flock + marker, tested under real bash), the relay strips moca.dev/template under a workload binding, setup-microvm.sh validates the id before using it in paths and unit names, and no new routes were added. CI is 17/17 green, DCO is OK, and it merges cleanly with current main.

Main item (inline on handlers.ts): async turns and authenticated /runs of a templated session bypass the template and seed. I'd like that closed or explicitly refused before this is relied on.

Non-blocking, outside the diff: a template that is later removed from SH_SANDBOX_TEMPLATES makes selectPoolSandbox throw SandboxPoolEmptyError, which becomes a retryable 503 sandbox_unavailable + Retry-After (knative-server server.ts ~452) that never recovers. The TUI retries without a cap. The control plane already knows this at exchange time (sessionTemplate() finds no t), so a distinct non-retryable error would be clearer.

Also noted, not a bug: there's no per-subject template allowlist, so any authenticated user can choose any declared template. The spec says this is out of scope.

`unknown sandbox template '${requestedTemplate}': this deployment declares ${templates.map((t) => t.id).join(', ')}`,
);
}
const sandboxTemplate = requestedTemplate ?? '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: the sync /turn path fails closed on the template, but the async drain (/internal/turn-credentials → claimTurn → runLeaf) and authenticated /runs never see sandboxTemplate. turn-exchange.ts:195 returns only sandboxTier, turn-claim.ts:120 builds TurnAuth without a template, and run-leaf's three selectPoolSandbox calls pass only tier. So POST /v1/sessions/{id}/turns {async:true} on a templated session runs on an untemplated worker with no seed, which is the case sessionTemplate()'s FAIL CLOSED comment is meant to rule out. The spec (§3.4) names the gap, but nothing enforces it. Until leaves carry the template, could submitTurn (and /runs for a templated session) refuse with a 4xx (e.g. template_runs_unavailable)? Alternatively, thread sandboxTemplate through turn-exchange/turn-claim and pass template in run-leaf.

* The create, retried while its template activates: a 409 template_not_active means the control
* plane started the activation, so wait its Retry-After, up to SESSION_ACTIVATION_WAIT_MS.
*/
private async createWaitingForActivation(req: CreateSessionRequest) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: no control plane in this repo returns 409 template_not_active (it appears only in mocactl, its tests and the spec), and handlers.ts:917 400s any undeclared id, so id:tag / id@build never resolve either. Could this activation-wait loop and sendUnlisted (session-options.ts) go into the PR that adds the server behaviour? As written it's untested against a real server, and it widens what mocactl sends.

return 0;
}

/** The most a headless turn waits on "no capacity" before it fails (SessionDeps.maxCapacityWaitMs). */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: two changes here go beyond templates and alter existing mocactl run behaviour: an empty --session now exits 2, and 503 capacity retries are now capped at 15 min (HEADLESS_CAPACITY_WAIT_MS). Both seem reasonable, but please split them out or at least list them in the CHANGELOG and PR body as behaviour changes.

* the same list the sandbox profile reads, or null when it is unset or blank (no templates, and
* nothing about sessions changes). Malformed refuses to boot, as on the sandbox profile.
*/
export function sessionTemplatesFromEnv(env: NodeJS.ProcessEnv): SandboxTemplate[] | null {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: on the harness profile worker is ignored, yet parseTemplates still requires it and checks it against WORKER_RE. That's why the env example needs "worker":"unused". Consider making it optional for this caller, or documenting that it's a placeholder.

) {
throw new CpError(
'invalid_request',
`unknown sandbox template '${requestedTemplate}': this deployment declares ${templates.map((t) => t.id).join(', ')}`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: this echoes an arbitrary-length caller string into the error (the tier message at :901 does the same). Consider checking it against TEMPLATE_ID_RE first, or truncating it / passing it through forLog.

Conflicts and resolutions:
- docs/api/CHANGELOG.md: kept both sides' entries. Main's 1.4.0 (the
  template store and its read API) and 1.5.0 (self-serve template
  create) stay as they are; this branch's session templates entry moves
  from 1.4.0 to 1.6.0, on top.
- docs/api/openapi.yaml: info.version is 1.6.0 (main 1.5.0, this branch
  1.4.0 before the merge).
- docs/api/harness-openapi.yaml, the turn's 503: kept this branch's
  "none of the session's tier or template" and main's wording of
  sandbox_unavailable's message (a pool, tier, template or sandbox id,
  never a secret). The harness API stays at 1.1.0 (main 1.0.0).
- docs/reference/configuration.md: kept main's SH_PROVENANCE_DIR row; the
  SH_SANDBOX_TEMPLATES row carries both meanings: on the sandbox profile
  the templates a sandbox may be created from (imported into the
  template store once with SH_PROVENANCE_DIR), on the harness profile
  the templates a session may name, with the optional seed.
- packages/control-plane/src/handlers.ts, the imports: kept this
  branch's SandboxTemplate type import and main's ProvenanceStore,
  PresenceReader, TemplateCatalog and PolicyStore imports.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
@webchang

Copy link
Copy Markdown
Member Author

Merged main (d4babb8). Tests ran locally on the existing node_modules, since a fresh install is held by the new hono pin's release-age window; CI is the full check.

Assisted-By: Claude Code

@ingpaolodettori-dev ingpaolodettori-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

Follow-up at 217aead (e661fd4..217aead). This push has no commits of this PR's own. It brings in main d4babb8 (#757 microVM fixes, #767 the sbx templates authoring client, #803 the hono 4.13.18 bump), through a merge of upstream/main. I checked the hand resolutions with git show --remerge-diff, compared them against both parents, and grepped the merged tree for conflict markers and duplicate definitions.

The resolution is correct. The CHANGELOG entry moves to 1.6.0 above main's 1.5.0 (openapi info.version 1.6.0, harness-openapi stays 1.1.0). The harness 503 text keeps both "the session's tier or template" and main's "never a secret" wording. The SH_SANDBOX_TEMPLATES row in configuration.md carries both seed? and main's template-store import note. handlers.ts keeps type SandboxTemplate (still used) next to main's new imports.

Coordination note (not a defect): #762 and #769 (and the #772 stack) each also claim API 1.6.0 off main. Whichever lands second has to renumber info.version, the CHANGELOG heading and any "API 1.6.0" mentions in http-api.md.

Our open items from e661fd4 (async turns and authenticated /runs don't carry sandboxTemplate, and the rest) are unchanged.

Author: webchang (MEMBER — maintainer)
Agent/IDE config (.claude/.vscode): none
Commits: no new own commits except where noted; signed off: yes (DCO pass)
CI status: red proto at "Build and test remote-worker". This PR's only Go change is a comment in remote-worker/internal/session/loop.go, proto was green at e661fd4, and main d4babb8 is green. This looks like the known remote-worker race flake; please re-run the job. Everything else passes.

AI-assisted review, approved by a maintainer before posting.

Upstream main (634781a) adds the sandbox lease wire (rossoctl#802) as API
1.6.0, which this branch also claimed; its section moves to 1.7.0.

Conflicted:
- docs/api/CHANGELOG.md: main's 1.6.0 (sandbox modes) kept as main has
  it; this branch's session-templates section is now 1.7.0, above it.

Also changed in the merge:
- docs/api/openapi.yaml: info.version 1.7.0 (both sides said 1.6.0, so
  it merged without a conflict).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
Upstream main (f60db30) adds session grants (rossoctl#807) as API 1.7.0, so
this branch's section moves to 1.8.0.

Conflicted:
- docs/api/CHANGELOG.md: main's 1.7.0 (grants) and 1.6.0 kept as main
  has them; this branch's session-templates section is now 1.8.0,
  above them.
- docs/reference/configuration.md: main's control-plane table (with
  the grant variables) kept; this branch's SH_SANDBOX_TEMPLATES row
  (the seed and the harness profile) put back into it.

Also changed in the merge:
- docs/api/openapi.yaml: info.version 1.8.0.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
Upstream main (949dc5f) adds template tags, edits and owner transfer
(rossoctl#774) as API 1.8.0, so this branch's section moves to 1.9.0.

Conflicted:
- docs/api/CHANGELOG.md: main's 1.8.0 (template tags, edits and owner
  transfer), 1.7.0 and 1.6.0 kept as main has them; this branch's
  session-templates section is now 1.9.0, above them.
- docs/reference/change-policy.md: main's list kept, with this
  branch's "then session sandbox templates" after it; both version
  mentions say 1.9.0.

Also changed in the merge:
- docs/api/openapi.yaml: info.version 1.9.0.
- packages/mocactl/test/run-record.test.ts (from rossoctl#768): mocactl run
  now reads discovery twice before it creates the session, once for
  the sandbox tier and once for this branch's sandbox template field,
  so the recorded call list gains a line and the later indices and
  sequence numbers move by one.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
The harness document says version 1.1.0 since this branch's session
templates; change-policy still said 1.0.0.

Refs rossoctl#731

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
No conflicts: main adds setup.sh's Redis guard, its tests and the image's
Dockerfile.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
@webchang

Copy link
Copy Markdown
Member Author

Main (ab8d10e) merged in. Besides resolving the conflicts with #774, the merge makes one change that this PR's own diff doesn't show:

  • docs/reference/change-policy.md now gives the harness API as 1.1.0, matching harness-openapi.

The control-plane openapi version moves to 1.9.0, above #774's 1.8.0.

Assisted-By: Claude Code

Main's subject trust for gate records took API 1.9.0, so this branch's
session sandbox templates move to 1.10.0.

Conflicts:
- docs/api/CHANGELOG.md: both added a 1.9.0 section. Main's 1.9.0 kept
  as main has it; this branch's section is now 1.10.0, above it.
- docs/reference/change-policy.md: both changed the version sentence and
  table row. Main's list kept, then "then session sandbox templates";
  the control plane at 1.10.0, the harness at 1.1.0 (this branch's
  harness-openapi); the table realigned by prettier.

Also: docs/api/openapi.yaml info.version 1.9.0 -> 1.10.0.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
Main's template host agents took API 1.10.0 and its activation leases
1.11.0, so this branch's session sandbox templates move to 1.12.0.

Conflicts:
- docs/api/CHANGELOG.md: both added a 1.10.0 section. Main's 1.11.0 and
  1.10.0 kept as main has them; this branch's section is now 1.12.0,
  above them.
- docs/api/openapi.yaml: info.version is 1.12.0.
- docs/reference/change-policy.md: both changed the version sentence and
  table row. Main's list kept, then "then session sandbox templates";
  the control plane at 1.12.0, the harness at 1.1.0 (this branch's
  harness-openapi).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
@webchang

Copy link
Copy Markdown
Member Author

Closing: this PR's change landed with #789, which was stacked on it and contains all of its code commits. The two commits left here (52f667e and 7716c21) only set the version numbers in docs/reference/change-policy.md, which #789 already covers. Nothing is left to merge.

Assisted-By: Claude Code

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.

Let a Moca Pi session choose a sandbox template

4 participants