Repository navigation
docs: a glossary that tells the two capabilities apart; archive REORG-PLAN - #919
Conversation
…-PLAN Step 6 of the docs migration, the last: - glossary: "sandbox" names both things the word means (a harness session's tool sandbox, and a sandbox-service sandbox) and that mocactl sbx manages only the second; "control plane" gains its three route profiles (harness, sandbox, combined); new entries for the harness (and the narrower @moca/harness package and the historical serverless-harness/SH_* names), the sandbox service, template, build and tag, activation lease, sandbox mode and subject -- each from the CLI's help text, the OpenAPI contract or the deploy pages. - docs/REORG-PLAN.md moves to docs/archive/ with a Historical banner naming the migration that superseded it; CONTRIBUTING-DOCS.md points there, and the publish check and denylist drop it from their list of unpublished root files (archive/ is excluded as a whole). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Review — docs: a glossary that tells the two capabilities apart; archive REORG-PLAN
The split and every new entry except one check out against the code; the archive move is clean.
Verified against the source
- Route profiles (
sandbox-config.ts:87-94): exactlyharness,sandbox,combined, absent or empty meansharness— the glossary's wording matches, androutes.ts:16types it the same way. - Subject forms (
identity.ts:100-101,:255-271):github:<numeric id>andoidc:<provider sub>, withMEMBER_SUBJECT_FORMSphrased identically;SH_ALLOWED_SUBJECTS/SH_ADMIN_SUBJECTSare the enrollment lists (member-handlers.ts:94). - template/build/tag (
sandbox-handlers.ts:2232-2234,:2321;ownership.ts:109;openapi.yaml:3108):id,id:tagandid@<build id>resolve as described; the default tag is moved, never removed, and the bare id must resolve. - sandbox mode (
sandbox-config.ts:119-125,setup.sh:57-59):per-execis the default and lease modes stay off until listed. - activation lease (
cli.ts:297,:304):templates activate/deactivateexist with the flags the entry implies. - Archive move:
check-docs-publish.shalready excludeddocs/archive/, so dropping theREORG-PLAN.mdroot-file rule is correct rather than a loosening;CONTRIBUTING-DOCS.mdpoints atarchive/REORG-PLAN.md; nothing else in the tree references the old path; the Historical banner names the superseding PRs. make check-links→ 236 files, 0 broken (in-page anchors included);check-docs-publish.sh→ 83 files, clean. CI: 17 green, 1 pending at review time.
One must-fix inline: the harness entry's narrower-use sentence describes the wrong package.
Author: pdettori (MEMBER — maintainer). Agent/IDE config: none. Commits: 1, signed off.
| tools run in a harness [sandbox](#sandbox). Its sibling capability is the | ||
| [sandbox service](#sandbox-service). | ||
|
|
||
| Narrower uses of the word: the `@moca/harness` package (`harness/`) is only the adapter between |
There was a problem hiding this comment.
must-fix: this describes a file inside the package, not the package. @moca/harness is the turn-execution library: harness/package.json exports run-turn, run-leaf, leaf-job-runner, turn-stream, audit-log, pool-records and sandbox-affinity, and packages/server/src/server.ts:5 imports runTurn, executeTurn from it (called at :415); the supervisor, relay and control plane import it too. The Pi SessionStorageBackend adapter is one class in it, BufferedRedisBackend (harness/src/buffered-redis-backend.ts).
Something like: "the @moca/harness package (harness/) is the turn-execution library the supervisor, relay and control plane import — runTurn, run-leaf, turn streaming, the audit log, pool records; the Pi session-log adapter, BufferedRedisBackend, is one file inside it."
There was a problem hiding this comment.
Fixed in 8ad7b6b. The entry now reads: "the @moca/harness package (harness/) is the turn-execution library the worker (@moca/server) and the sandbox relay import: runTurn, run-leaf, turn streaming, the audit log, pool records and sandbox selection (the Pi session-log adapter, BufferedRedisBackend, is one module in it)".
One deviation from the suggested wording: I didn't list the supervisor and control plane as importers, because the code says they aren't.
packages/supervisor/src/config.ts:109: the supervisor shipsdependencies: {}on purpose, so the parent never loads@moca/harness.packages/control-plane/src/turn-result.ts:3: the control plane "does NOT depend on" it.
The importers are packages/server (8 files) and packages/sandbox-relay (2). The exports list is from harness/package.json.
The glossary's harness entry described @moca/harness as only the Pi session-log adapter, which is one module in it (buffered-redis-backend). The package is the turn-execution library: its exports are run-turn, run-leaf, leaf-job-runner, turn-stream, audit-log, pool-records, sandbox-affinity, select-sandbox and more, imported by the worker (@moca/server) and the sandbox relay. The supervisor and the control plane do not depend on it at runtime (supervisor/src/config.ts:109, control-plane/src/turn-result.ts:3). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Re-review — the @moca/harness entry is now right
8ad7b6b8 changes one paragraph in docs/glossary.md and nothing else, so the rest of the review from 75d2988 stands unchanged.
The new sentence matches the package: @moca/harness as the turn-execution library that the worker (@moca/server) and the sandbox relay import, with runTurn, run-leaf, turn streaming, the audit log, pool records and sandbox selection named — all of them are in the package's exports (run-turn, run-leaf, turn-stream, audit-log, pool-records, sandbox-affinity), and packages/server/src/server.ts:5 plus packages/sandbox-relay/src/main.ts import it. BufferedRedisBackend is correctly demoted to "one module in it".
make check-links → 236 files, 0 broken; check-docs-publish.sh → 83 files, clean. CI at review time: 15 green, 2 pending. Approving; this clears the CHANGES_REQUESTED at 75d2988.
Author: pdettori (MEMBER — maintainer). No inline comments.
rossoctl/moca#919 moved docs/REORG-PLAN.md into docs/archive/, which the sync already leaves out as a whole, so the separate REORG-PLAN.md entry in MOCA_EXCLUDED matches nothing. Drop it, and its mentions in the comment above and in the README. Checked: a sync of moca main (with #919) publishes no REORG-PLAN file, and moca's own check-docs-publish.sh dropped the same entry in #919. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Summary
This is step 6 of the docs migration, the last one.
Glossary: the two capabilities, told apart. The docs audit found that "sandbox", "harness" and "control plane" each mean several things, and no page said so.
sandboxnow names both meanings: a harness session's tool sandbox, and a sandbox-service sandbox. It also states thatmocactl sbxneither sees nor manages a harness session's sandbox.control planegains its three route profiles (SH_ROUTE_PROFILE:harness,sandbox,combined), so "the sandbox service's control plane" reads as the same package on another profile.@moca/harnesspackage and the historicalserverless-harness/SH_*names;defaultis the tag used when none is given and can't be removed;per-exec,leaseorlease+processes;github:<id>/oidc:<sub>.I dropped one sentence I couldn't verify: whether a harness session made from a sandbox template (
sandboxTemplate) still runs in a harness sandbox.REORG-PLAN.mdretired. It moves todocs/archive/with a "Historical" banner naming the migration PRs that superseded it.CONTRIBUTING-DOCS.mdnow points at the archived copy.scripts/check-docs-publish.shanddocs/.publish-denylistdrop it from their list of unpublished root files, sincearchive/is excluded as a whole.The Project page stays a draft, as decided. I didn't add roadmap items I couldn't source; it keeps pointing at the milestone registry and the open items.
Testing (from a clean clone of the branch)
make check-links: 236 files, 0 broken links, including the new in-page anchors.scripts/check-docs-publish.sh: 83 files.scripts/check-docs-site.sh: 61 pages, no broken links.bash -n scripts/check-docs-publish.shpasses; Prettier 3.10.1 is clean.Assisted-By: Claude Code