Skip to content

docs(operate): the sandbox service's install and runbook move to the docs - #916

Merged
pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:docs/operate-sbx
Nov 19, 2026
Merged

pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:docs/operate-sbx

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

This is step 5 of the docs migration, fifth path: the sandbox service. It is stacked on #914 (the microVM tier), because both touch the cross-links between the operate pages. Review the last commit; #914's commit drops out once it merges.

deploy/sbx/README.md (333 lines) becomes docs/operate/sandbox-service/install.md, and deploy/sbx/RUNBOOK.md (1,666 lines) becomes docs/operate/sandbox-service/runbook.md. Both go under a new Deploy and operate › Sandbox service category. Both files stay in deploy/sbx as pointers, and the pages keep the section numbers the scripts cite. The template-onboarding guides stay in deploy/sbx/template-onboarding/ next to their scripts. Splitting the runbook further, into enroll / templates / credentials / upgrade pages, can come later.

Uninstall fix (runbook §12), checked against setup.sh:

  • Missing Secrets. The delete list missed three Secrets that setup.sh applies: moca-relay-attach, sbx-egress and sbx-template-hosts. They're now listed, with --ignore-not-found for stacks that never had them.
  • Combined profile. The page now says this profile writes to .generated-<namespace>/ and adds a moca-supervisor-tls Secret.
  • Data-loss warning. kubectl delete -k also deletes the moca-sbx-templates volume (template catalog, policy and provenance) and the moca-sbx-credentials volume (stored egress credentials). The setup's components declare both, unlike the Redis claim, which the page already says is kept. Nothing warned about this before.

Published now, so no internal names. The publish check caught two leaks:

  • a link to the design spec, whose filename contains sbx0;
  • an anchor containing sbx03.

The spec is now named by subject instead of linked, and the security review's §7 is linked without the anchor. The install page also gets the Preview banner, with "Known limits" pointing at the runbook's §9.

References:

  • setup.sh's comments and its Redis 7 refusal, smoke.sh's two messages, the template-onboarding scripts, sbx-read-ahead.sh, egress-allow.env and sbx-host-agent.service now name the runbook page.
  • setup.test.sh now expects the page in the Redis 7 refusal.
  • All links, anchors, labels and backticked mentions of the two files across deploy/sbx, the template-onboarding docs and docs/ now point at the pages.

Content check. Every line of the two old files is on the new pages, except deliberate changes: the titles, the design and security-review pointers, the P4 labels from #914, and the uninstall's corrected Secret list.

Testing

  • deploy/sbx/tests/*.test.sh, all ten suites: passed.
  • From a clean clone of the branch:
    • make check-links: 236 files, 0 broken links;
    • scripts/check-docs-publish.sh: 84 files, no matches;
    • scripts/check-docs-site.sh: 61 pages, no broken links or anchors.
  • bash -n passes on the edited scripts; Prettier 3.10.1 is clean.

Assisted-By: Claude Code

@pdettori
pdettori marked this pull request as ready for review November 19, 2026 13:07
@pdettori
pdettori requested a review from cwiklik as a code owner November 19, 2026 13:07
@pdettori pdettori added the ready-for-ai-review Request automated AI code review from clawgenti label Nov 19, 2026
@pdettori pdettori added this to the v0.11.0 milestone Nov 19, 2026

@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.

Review — docs: the sandbox service's install and runbook move to the docs

Stacked on #914 (merged 13:06 UTC), so this reviews the last commit only (b64e95b); bf706bb + 476540b are #914's and are in main.

Must-fix: the branch is dirty, and the resolution would drop #915's note. mergeStateStatus is DIRTY: merging current main (257ec998, which now carries #915) conflicts in deploy/sbx/README.md — the file this PR hollows out, and the one #915 edited. Rebasing as-is loses #915's SBX_WORKSPACE_IMAGE_MB sentence ("at most 2048: the snapshot's workspace drive (#907)", main's README:53) because the table's new home, docs/operate/sandbox-service/install.md:59, still has the pre-#915 text. Rebase onto 257ec998 and carry that sentence into the page's row; CI has to run again on the merged head anyway.

Verified in b64e95b

  • Content: both moves are complete. Old README.md (278 non-blank lines) → install.md and old RUNBOOK.md (1,441) → runbook.md differ from their sources only in link targets, the P4 label updates from #914, the design/security-review pointers (by subject now, not linked), and the uninstall corrections. The two rows that at first looked changed are only RUNBOOK.md → runbook.md link targets.
  • Section numbers: every ## heading in both files is byte-identical to the old one (install 1–4, runbook 1–14 plus the unnumbered sections), so the §N citations in setup.sh, smoke.sh, install-host.sh and the template-onboarding scripts still land.
  • Uninstall corrections check out: setup.sh does apply moca-relay-attach (:737), sbx-egress (:909) and sbx-template-hosts (:942), and --ignore-not-found is right for stacks that never had the latter two. Combined does write .generated-<SBX_NAMESPACE>/ (:187) and adds moca-supervisor-tls (:1025). moca-sbx-templates and the credentials PVC are rendered resources (setup.test.sh:1128/1262), so kubectl delete -k really does delete them, while the Redis data claim survives, as the page says.
  • Publish hygiene: no sbx0/SBX03 string left in either published page; check-docs-publish.sh passes on 84 files. The pointer files in deploy/sbx forward and keep the "section numbers" note.
  • Checks: make check-links → 236 files, 0 broken; publish 84 clean. CI ran on the pushed head and the doc jobs are green (the rest were still pending at review time).

One suggestion inline (runbook.md:1167) about the combined profile's credentials volume name.

Author: pdettori (MEMBER — maintainer). Agent/IDE config: none. Commits: 3 (2 from #914), all signed off.

Comment thread docs/operate/sandbox-service/install.md Outdated
| `SBX_RETENTION_DAYS` | 14 | 1-90: how long a deleted or expired sandbox stays in `mocactl sbx ls` |
| `SBX_MAX_PER_SUBJECT`, `SBX_MAX_TOTAL` | 3, 40 | live sandboxes per user, and in all |
| `SBX_MAX_INFLIGHT` | 2 | 1-8: `Exec` calls one sandbox may have in flight at the relay |
| `SBX_WORKSPACE_IMAGE_MB` | 2048 | each workspace's image size (`microvm-worker`'s `SH_WORKSPACE_IMAGE_MB`) |

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 (in the rebase): this row is the table's new home, and it still has the pre-#915 text. main (257ec998, after #915) reads "… (microvm-worker's SH_WORKSPACE_IMAGE_MB), at most 2048: the snapshot's workspace drive (#907)". The branch predates #915 and conflicts with it in deploy/sbx/README.md, so resolving the conflict by keeping the pointer and dropping the table would silently delete that cap note. Merge main and carry the sentence here.

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 bade7bc, which is rebased onto 257ec998. In the deploy/sbx/README.md conflict I kept the pointer, and the table's new home now carries #915's sentence: "… (microvm-worker's SH_WORKSPACE_IMAGE_MB), at most 2048: the snapshot's workspace drive (#907)". #915 changed only that line in the README (and nothing in the runbook). I re-checked against main's README after #915: every line is on the page except the 5 deliberate ones (title, design and security-review pointers, the RUNBOOK §13 pointer).

Comment thread docs/operate/sandbox-service/runbook.md Outdated

**`kubectl delete -k` deletes the template store's and the egress credentials' volumes.** They are
resources of the components `setup.sh` adds when those features are on: `moca-sbx-templates` (the
catalog, the policy and the provenance records) and `moca-sbx-credentials` (the stored egress

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: on the combined profile the egress-credentials claim is moca-credentials, not moca-sbx-credentials — deploy/k8s/overlays/ocp-combined/pvc-credentials.yaml, and tests/overlay-combined.test.sh:31 asserts exactly that name (only ocp-sbx/egress-credentials/pvc.yaml uses moca-sbx-credentials). Since the paragraph above already tells a combined reader the folder is .generated-<namespace>/, naming the claim they will actually lose would make the data-loss warning exact for both profiles.

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 bade7bc: the warning now names the egress-credentials claim as "moca-sbx-credentials (moca-credentials on the combined profile)". That matches ocp-combined/pvc-credentials.yaml and overlay-combined.test.sh:31.

…docs

Step 5 of the docs migration, fifth path: deploy/sbx/README.md becomes
docs/operate/sandbox-service/install.md and deploy/sbx/RUNBOOK.md
becomes docs/operate/sandbox-service/runbook.md, under Deploy and
operate > Sandbox service; both stay in deploy/sbx as pointers, and the
pages keep the section numbers the scripts cite.

- Uninstall (runbook §12): the Secret list missed moca-relay-attach,
  sbx-egress and sbx-template-hosts, which setup.sh applies; it now has
  them, and says the combined profile's generated folder is
  .generated-<namespace>/ with moca-supervisor-tls besides. It also
  warns that `kubectl delete -k` deletes the template store's and the
  egress credentials' volumes (moca-sbx-templates, moca-sbx-credentials),
  which the setup's components declare, unlike the Redis claim it keeps.
- The install page has the Preview banner, known limits pointing at the
  runbook's §9.
- Published now, the pages name no internal deployment: the design spec
  is named by subject instead of linked (its file name carries one), and
  the security review's §7 is linked without its anchor.
- setup.sh's comments and its Redis 7 refusal, smoke.sh's two messages,
  the template-onboarding scripts, sbx-read-ahead.sh, egress-allow.env
  and sbx-host-agent.service name the runbook page; setup.test.sh
  expects the page in the Redis 7 refusal.
- Every link to the two files, their anchors, and the labels and
  backticked mentions that named them, across deploy/sbx, the template-
  onboarding docs and docs/, point at the pages.

Every line of the two old files is on the new pages but the titles,
the reworded design and security-review pointers, and the uninstall's
corrected Secret list.

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

Copy link
Copy Markdown
Member Author

Both review points are fixed, and the branch is rebased onto main (257ec998, with #914 and #915). It's now one commit, bade7bc. The fixes are folded into it, since the conflict resolution and the #915 carry-over belong to the move itself.

From a clean clone of the branch: make check-links 236 files, 0 broken; publish check 84 files, no matches; site build 61 pages, no broken links. CI is re-running on the new head.

@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.

Re-review — rebased onto 257ec998; both items fixed

bade7bcf is a single commit on current main. Both comments from the b64e95b review are addressed, and the rebase kept #915's content.

The two items

  • must-fix (install.md:59): the SBX_WORKSPACE_IMAGE_MB row now carries #915's sentence — "at most 2048: the snapshot's workspace drive (#907)" — so the table's new home has the cap note the pointer would have dropped.
  • suggestion (runbook.md): the data-loss warning now names both claims — "moca-sbx-credentials (moca-credentials on the combined profile)", which matches ocp-sbx/egress-credentials/pvc.yaml and ocp-combined/pvc-credentials.yaml.

The rebase itself

  • mergeStateStatus is BLOCKED (review required), not DIRTY; no conflict is left. deploy/sbx/README.md and RUNBOOK.md are the two short pointers, and neither carries leftover content or a conflict marker.
  • #915 survived the resolution: SNAPSHOT_WORKSPACE_MB=2048 is still in setup.sh:180 and install-host.sh:146, the two ((… <= SNAPSHOT_WORKSPACE_MB)) refusals are at setup.sh:287 and install-host.sh:724, and build-snapshot.sh:1483 is unchanged, so the cross-file test still holds.
  • Content and numbering unchanged by the rebase: every ## heading in install.md (1–4) and runbook.md (1–14 plus the unnumbered sections) is byte-identical to the old files, and the page/old-file diff is still only link targets, the #914 P4 labels, the publish-safe design/security pointers, and the uninstall corrections.
  • make check-links → 236 files, 0 broken; check-docs-publish.sh → 84 files, clean. CI is 17/17 green on this head.

Approving; this clears the CHANGES_REQUESTED from #916's earlier head.

Author: pdettori (MEMBER — maintainer). Agent/IDE config: none. Commits: 1, signed off. No new inline comments.

@pdettori
pdettori merged commit a4c5886 into rossoctl:main Nov 19, 2026
17 checks passed
@pdettori
pdettori deleted the docs/operate-sbx branch November 19, 2026 13:27
galmasi pushed a commit that referenced this pull request Nov 19, 2026
PVC.spec.storageClassName is immutable once set (the API allows only nil
to set), and the render's patches apply with the same field manager as
the redis one, so a run whose knob disagrees with a live claim this run
renders was the same Forbidden one object later in the stream -- redis
applied, then the claim failed partway through. check_storage_class now
reads each claim this run renders (rendered_pvc_claims mirrors
write_overlay's patch conditions, so an unrendered claim is neither
patched nor read) and refuses both directions before anything is
applied: set and differing, and unset against a class an earlier knob
run set (server-side apply would drop the field its manager owns). A
classless claim passes against a set knob -- nil to set is the one
transition the API allows.

Also the SBX_STORAGE_CLASS row in the settings table
(docs/operate/sandbox-service/install.md, where #916 moved it from the
README), and main merged in so the row lands where the table now lives.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: George Almasi <[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.

2 participants