carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1# Review brief: fleet-internal engines (#335)
2
3You are an independent second reader of a design spec for the CARLOS
4platform (this repository). Read it cold and adversarially.
5
6**Spec:** `docs/superpowers/specs/2026-10-21-fleet-internal-engines-design.md`,
7at the commit named in the prompt.
8
9## What it claims
10
11A registered doc engine's hostname is refused to every public request on
12every box, and granted apps reach it through a per-instance unix socket (or
13the edge-local door), relayed over the existing backhaul hop, which now
14signs the caller. Read §2's anti-goals first: the spec fails if an engine
15can become public again by accident, if a tenant can forge a caller, or if
16an isolated instance's fence opens.
17
18## What to check
19
20Check against the code on `main`, not the spec's description of it. Cite
21`file:line` for every claim about existing code.
22
23- **The edge:** `internal/edge/edge.go` (`ServeHTTP`, `backhaul`,
24 `backhaulTo`, `httpFallbackHandler`, `Allowed`, `unknownHost`, the
25 cache path), `homemap.go` (`acceptHop`, `dialAddress`, `Owner`,
26 `ExactHome`), `mesh.go` (hop MAC), `door.go`, `doorkeys.go`,
27 `purge.go` / `purge_listen_unix.go` (`ListenControl`).
28- **Instances:** `internal/activator/backend_exec.go` (launch env,
29 `CARLOS_CONTROL_SOCKET`), `provision.go`, `prepare.go`,
30 `generations.go`, `cmdunit.go`, `internal/host/units/carlos-instance*@.service`,
31 `internal/instancectl/gen.go`, `internal/layout/preflight.go`.
32- **Grants and records:** `internal/doorkey`, `internal/caps`,
33 `internal/console/apistore.go` (store grant), `apisystemupdate.go`
34 (`systemOperator`).
35
36## Questions to answer
37
381. Can a public request reach a registered engine by any path: a spelling
39 of the host, a wildcard route, the :80 handler, a door caller, a
40 backhaul from an old box, the login re-resolution, an upgrade, the
41 cache, a hibernating wake?
422. Can a tenant forge or borrow a caller identity: through headers, through
43 another instance's socket, across generations, in the flat layout, via
44 the door?
453. Does §6.3's "never reopens" hold across restarts, stale mirrors, revision
46 rollback by a bucket writer, and `engines remove`?
474. Can the per-instance socket be built as described for every unit kind,
48 within the 107-byte socket path limit, and is the "one socket per
49 instance" claim true of the binds?
505. Does the hop extension stay compatible with boxes on the old build in
51 both directions?
526. Anything §5.5's limits break (streaming, upgrades, long conversions).
53
54## Output
55
56Findings ranked P1 (spec fails a goal or anti-goal, or cannot be built), P2
57(a real gap a builder would hit), P3 (worth fixing). For each: the section,
58the failure scenario as concrete steps, the code citation, and a suggested
59fix. End with an overall verdict: accept, accept with fixes, or reject.
60Do not report wording or style.
61
62## Round 2 and later
63
64Read your previous findings (`CODEX-FINDINGS-ENGINES-R<n-1>.md`) and the
65spec's §12 disposition table first. Start your answer with a table: each
66previous finding, and whether the new revision actually fixes it (cite the
67section). Then report only NEW findings.
68
69§2.1's rulings are fixed: do not argue for registration-based internal
70marking or for unit-backed callers. Report only a mechanism that fails to
71honour a ruling, fails a goal or anti-goal, breaks something else in the
72platform, or cannot be built against `main`. A mechanism the spec names,
73bounds and assigns is complete at spec level; do not ask for plan-level
74detail.
75