Skip to content

docs(sandbox): split the user guide into task and concept pages; add lease mode and a generated CLI reference - #905

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

pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:docs/sandbox-section

Conversation

@pdettori

@pdettori pdettori commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

This is step 3 of the docs migration: the sandbox service section of rossoctl.dev/moca. The 943-line user guide becomes an overview plus one page per task or concept. It also adds the missing lease-mode page and a mocactl sbx reference generated from the CLI.

Page From
sandbox/user-guide.md (Overview) §1, plus a table of the pages. It keeps its URL, which deployed control planes print
how-to/set-up.md §2 Install and the first part of §3 (login, up, templates, lifetime, worktrees)
how-to/connect-agents.md §3: Claude Code, OpenCode, Codex CLI, IBM Bob
how-to/push-and-pull.md §3, "Take the work back"
how-to/agent-configuration.md §4, what sbx up changes
how-to/work-with-a-sandbox.md §5
how-to/egress-credentials.md §6 (not credentials.md: .gitignore ignores credentials.*)
how-to/templates.md §8
how-to/direct-api.md §9, plus docs/api/sandbox-v1-direct-client.md (moved)
how-to/troubleshoot.md §10
concepts/isolation.md §1's safety bullets and §11, data handling
concepts/limits.md §7
how-to/lease-mode.md new: CLI-level lease mode, from sbx/cli.ts, deploy/sbx/README.md (SBX_MODES_ALLOWED, SBX_IDLE_CEILING_S) and the direct-API lease sections
reference/cli-sbx.md new: mocactl sbx --help, generated

The moved text is unchanged apart from cross-references and headings: subsections became ## under each page's title. A line-by-line check against main finds every non-heading line of the old guide and the old direct-client page in the new pages. The 12 exceptions are deliberate rewrites: the banner, three "below"/"above" pointers, and the intro and §9 pointer reflowed.

Generated reference. packages/mocactl/test/sbx-reference.test.ts checks that the block between the page's markers equals SBX_ABOUT + SBX_USAGE. It fails with the regenerate command when they differ: UPDATE_SBX_REFERENCE=1 pnpm -C packages/mocactl exec vitest run test/sbx-reference.test.ts. It also checks that the help text can't close the code fence early.

Links into the old pages are retargeted across the repo: deploy/sbx README, RUNBOOK and template-onboarding, docs/specs/README.md, get-started, and comments in ci.yml, .gitignore, smoke.sh, the Python examples and remote-worker/cmd/sbx. The "user guide, §8" mentions now link to the templates page.

Testing

  • make check-links: 227 files, 0 broken links.
  • scripts/check-docs-publish.sh: 70 published files, no matches.
  • scripts/check-docs-site.sh against a fresh rossoctl/.github: 52 pages, no broken links or anchors. On its first run it caught a real bug the offline checker misses: subsection headings promoted to H1, so #ibm-bob didn't resolve on the site. Fixed before this push.
  • sbx-reference.test.ts: passes; fails on an edited block; passes again once regenerated.
  • Prettier 3.10.1 is clean on every changed file.

Assisted-By: Claude Code

@pdettori
pdettori force-pushed the docs/sandbox-section branch from 68803ae to 0a1f310 Compare November 19, 2026 00:03
…lease mode and a generated CLI reference

The sandbox service section of rossoctl.dev/moca, step 3 of the docs
migration:

- docs/sandbox/user-guide.md (one 943-line page) becomes the section
  overview, and its sections become pages: how-to/set-up,
  connect-agents, push-and-pull, agent-configuration,
  work-with-a-sandbox, credentials, templates, troubleshoot;
  concepts/isolation (with data handling) and concepts/limits. The text
  is unchanged apart from cross-references; the overview keeps its URL,
  which deployed control planes print.
- docs/api/sandbox-v1-direct-client.md moves to how-to/direct-api.md,
  after the guide's "Using the API directly" section.
- how-to/lease-mode.md (new): per-exec, lease and lease+processes from
  the CLI (create --mode, get, mode, reset, proc), from sbx/cli.ts, the
  deploy/sbx policy inputs and the direct-API lease sections.
- reference/cli-sbx.md (new): `mocactl sbx --help` (SBX_ABOUT and
  SBX_USAGE), generated. packages/mocactl/test/sbx-reference.test.ts
  fails when the page and the CLI disagree and rewrites the block with
  UPDATE_SBX_REFERENCE=1.

Links into the old pages and anchors across the repository (deploy/sbx,
the specs index, CI and script comments) follow the move.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori
pdettori force-pushed the docs/sandbox-section branch from 0a1f310 to bb8dbf1 Compare November 19, 2026 00:12
@pdettori
pdettori marked this pull request as ready for review November 19, 2026 00:14
@pdettori
pdettori requested a review from cwiklik as a code owner November 19, 2026 00:14
@pdettori pdettori added the ready-for-ai-review Request automated AI code review from clawgenti label 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.

Verified against origin/main:

  • Generated reference — the cli-sbx.md block matches SBX_ABOUT + SBX_USAGE byte-for-byte, and sbx-reference.test.ts guards both markers correctly (including the fence-collision case).
  • Lease-mode facts — all check out against source: SBX_MODES_ALLOWED (default per-exec, always allowed), SBX_IDLE_CEILING_S (default 1800, worker default 300 s), mode_not_allowed (api.ts), TTY-gated upgrade, and every documented command/flag matches the help text.
  • Parity — a line-by-line check finds every non-heading line of the old guide and the old direct-client page in the new pages; divergences are rewraps, forced link retargets, or the listed rewrites, plus one extra small rewrite (inline nit). No content dropped.
  • Links — every retargeted link and anchor resolves, including direct-api.md#lease-mode / #tracked-processes-leaseprocesses, and the sandbox-v1-direct-client reference list is complete.
  • URL stability — keeping user-guide.md's URL is right: the control plane prints it (handlers.ts).

One advisory outside the diff: the title and commit subject run ~110 chars vs. the 72-char convention.

Author: pdettori (MEMBER — maintainer)
Commits: 1, signed-off ✓
CI: 18/18 passing

> **Preview.** The sandbox service is implemented, but not yet declared Stable; interfaces and
> limits may change.

**Run your agent** in a repository you have brought up

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: the clause "in a repository you have brought up (Install, log in and bring a repository up)" reworks old user-guide.md:108 ("Run your agent in the repository…") — a deliberate-looking rewrite that isn't one of the 12 exceptions the PR body lists. Content is preserved; only noting it so the parity enumeration is complete.

@pdettori
pdettori merged commit 5948564 into rossoctl:main Nov 19, 2026
18 checks passed
@pdettori
pdettori deleted the docs/sandbox-section branch November 19, 2026 01:45
@pdettori pdettori added this to the v0.11.0 milestone Nov 19, 2026
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