Skip to content

docs(spec): P4.1 amendment — moca-egress, transport-first slice, E13 not gating (#277) - #581

Merged
pdettori merged 2 commits into
mainfrom
docs/277-p41-amendment
Oct 22, 2026
Merged

pdettori merged 2 commits into
mainfrom
docs/277-p41-amendment

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

The P4.1 decision record for the first implementation of #277: a dated 2026-10-21 amendment block on
docs/specs/2026-09-15-p4-1-microvm-egress-transport-design.md, a "Decided" pointer at §12.2, and the
docs/specs/README.md P4.1 row moved to "implementing — transport + core (MI1 S4 without S2)".

Bottom of a three-PR stack (this → transport → moca-egress). Docs only.

What the amendment records:

  1. §12.2 is decided: the proxy is moca-egress (MI1 D4, §2.4, §14). P4.1: implement microVM egress transport (vsock → shared proxy) #277 is implemented as MI1 S4's
    transport and core, without S2.
  2. Scope: no grants, no token endpoint, no TLS interception, no CA, no placeholder swap. Allowlisted
    hosts are tunnelled unauthenticated; CredentialPolicy is the seam S2 fills; MOCA_TENANCY=multi
    is refused. P4.1: implement microVM egress transport (vsock → shared proxy) #277's CA/swap acceptance items stay open for the interception slice.
  3. E13 (E13: root-cause E12's rung C@128 dropped connections — and the CPU-contention follow-up it opened moca-experiments#7) is not a gate, but its design requirements are adopted
    (pre-bound listener, never a process per connection; named error on a refused vsock dial; scale
    gates are distributions).
  4. The jail vsock path moves to /run/v.sock, carried by restore's existing vsock_override.
  5. New settings: MOCA_EGRESS_CONTROL_SOCK, MOCA_EGRESS_CONTROL_UIDS, MOCA_EGRESS_RESOLVER,
    MOCA_EGRESS_PERMIT_CIDRS (link-local never exempt).
  6. Allowlist port rule: no port → 443 for CONNECT, 80 for plain HTTP.
  7. Standby admission requires moca-egress's Register ack (fail-closed).

The top PR adds item 8 (audit bytes_up/bytes_down/dial_addr vs MI1 §8.5, which owes a matching
amendment) and the GitHub 401 note, because those came out of review of the code.

Checklist

  • Commits are signed off (git commit -s).
  • make lint and the tests for the touched packages pass. (prettier on both files)
  • Docs: changed behavior, flags or environment variables are reflected in the relevant README or
    docs/ page, with the right maturity label (see docs/CONTRIBUTING-DOCS.md).
  • Docs: make check-links passes if any Markdown changed. (206 files, 0 broken, on the stack head)
  • A new spec or ADR is registered in docs/specs/README.md or docs/adrs/README.md. (existing
    P4.1 row updated)

🤖 Generated with Claude Code

…not gating (#277)

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

Copy link
Copy Markdown
Member Author

Live acceptance for the whole stack passed on nested-m8i on 2026-10-22: KVM gates 11/11, plus live egress through the real relay. Details are in #583.

@pdettori
pdettori marked this pull request as ready for review October 22, 2026 11:29
@pdettori pdettori added the ready-for-ai-review Request automated AI code review from clawgenti label Oct 22, 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.

Docs-only decision record for #277 (P4.1 amendment + specs index row). I checked the amendment against the spec and code at this head: T1 already names <jail>/run/v.sock_1025, so moving vsockRelPath to /run/v.sock is consistent; vsock_override already exists in vmpool/fcapi.go; MI1 D4/§8/S4 say what the amendment cites. CI is green and the single commit is signed off.

One nit, inline. Approving.

Author: pdettori (MEMBER — maintainer)
Areas reviewed: Docs
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: passing

Comment thread docs/specs/README.md Outdated
| **P3.1** | **E6 workload-parameterized sandbox-load** — replace the trivial marker-check leaf with real Archetype-A code-review variants (L0/L1/L2); report N as a curve over per-leaf sandbox work (not one optimistic number); raise `max-scale`, warm baseline, multi-sample, sustained-decline `detectKnee` | **design ✅** | [`2026-07-03-e6-workload-parameterized-sandbox-load-design.md`](2026-07-03-e6-workload-parameterized-sandbox-load-design.md) (#62) |
| **P4** | **MicroVM sandbox tier** — one ephemeral microVM per `Exec` behind the unchanged `Attach` wire contract, warm-standby-provisioned so VM creation never sits inside a request; `microvm-worker` + `vmpool`, one additive `workspace_key` proto field. Delivers **E10** lifecycle primitives + **E11** density/replenishment ceiling. The "no nested KVM" infra gate is retired by EC2 nested virt (Feb 2026) + P6's VM substrate. gVisor/Kata arms still deferred | **implemented** (verified 2026-09-30; limits #277, #274, #338 in `deploy/microvm/P4-ON-P6.md`) | [`2026-09-09-p4-microvm-sandbox-design.md`](2026-09-09-p4-microvm-sandbox-design.md); [ADR-0035](../adrs/0035-per-exec-microvm-warm-standby.md) (#57) |
| **P4.1** | **MicroVM egress transport** — reaching **Z5**'s credentialed-egress proxy from a Firecracker guest that has **no network device**: vsock hop (`CID 2:1025` → `<jail>/run/v.sock_1025`), one **shared** host proxy replacing RC1 Profile B's per-sandbox sidecar (density: Σ PSS 0.41 GB for 128 VMs), caller identity behind an interface whose first implementation is the jail socket path — a scoped, tier-local discharge of **Z1** for this one hop. Queried KB and long-term memory become Z5 allowlist destinations, so **no host filesystem mount** is needed. Gated by **E12** (guest-initiated vsock across restore, unproven) | **design (proposed)** | [`2026-09-15-p4-1-microvm-egress-transport-design.md`](2026-09-15-p4-1-microvm-egress-transport-design.md) |
| **P4.1** | **MicroVM egress transport** — reaching **Z5**'s credentialed-egress proxy from a Firecracker guest that has **no network device**: vsock hop (`CID 2:1025` → `<jail>/run/v.sock_1025`), one **shared** host proxy replacing RC1 Profile B's per-sandbox sidecar (density: Σ PSS 0.41 GB for 128 VMs), caller identity behind an interface whose first implementation is the jail socket path — a scoped, tier-local discharge of **Z1** for this one hop. Queried KB and long-term memory become Z5 allowlist destinations, so **no host filesystem mount** is needed. Gated by **E12** (guest-initiated vsock across restore, unproven) | **implementing — transport + core (MI1 S4 without S2)** | [`2026-09-15-p4-1-microvm-egress-transport-design.md`](2026-09-15-p4-1-microvm-egress-transport-design.md) |

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 row's status now says implementing, but its description still ends "Gated by E12 (guest-initiated vsock across restore, unproven)". E12 answered yes on 2026-09-22 (the spec's own STATUS note), so consider changing this to "E12 answered yes (2026-09-22)" so the row doesn't contradict its own status column.

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 07905cd. The description now reads "E12 (guest-initiated vsock across restore) answered yes (2026-09-22)", so it no longer contradicts the status column. The rest of that diff is prettier re-padding the table, because the row got shorter. #582 and #583 are rebased onto it and their content is unchanged.

Review on #581: the row's status is now "implementing", but its description still ended
"Gated by E12 (guest-initiated vsock across restore, unproven)". E12 answered yes on
2026-09-22, per the spec's own status note. The rest of the diff is prettier re-padding
the table to the shorter row.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori
pdettori merged commit 7bca401 into main Oct 22, 2026
14 checks passed
@pdettori
pdettori deleted the docs/277-p41-amendment branch October 22, 2026 12:03
pdettori added a commit that referenced this pull request Nov 16, 2026
Docs and agent-facing text that the code no longer matches, found by an
issue triage against main:

- The microVM guest and the SBX sandbox have no network device, but
  reach the hosts on moca-egress's allowlist through the host's proxy
  (P4.1 #581-#583; SBX egress #641/#646). Concepts, guides, P4-ON-P6,
  the VM README, research-smoke, hardening, maturity, the demo's limits,
  the SBX user guide and direct-client doc said "no network" outright.
  So did the sandbox MCP instructions, the tool descriptions and the
  sbx status text agents read, which made agents refuse allowlisted
  calls (#779).
- openapi.yaml said the worker enforces a turn's caps; nothing does
  yet (#391).
- harness-openapi.yaml called /turn and /runs "deliberately not
  described", while change-policy decision 3 makes them supported
  aliases (#507).
- The changelog is now the API changelog for both documents, with an
  index of the data-plane versions; both OpenAPI files point at it, and
  change-policy decision 5's follow-up is done (#511).
- upgrades.md and change-policy: the configRef ordering only matters
  from before v0.5.0 or for a bundle-format change (#512, #510).
- dispatch-archetypes and maturity: deploy/k8s's async drain is proven
  by its smoke claims (#688, #765).
- Specs: slice 3's relay restart is graceful since #462 (#453); MI1
  §2.2 gains a status note for the scrub (#350) and the vsock hop.

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.

2 participants