docs: hosted slice 2 rulings record
Every controller ruling from the build ledger, verbatim and in order, so the decisions made on Paul's behalf outlive the gitignored workspace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+69
−0
docs/superpowers/plans/HOSTED-SLICE2-RULINGS.md+69 −0
CI failed — run details
CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/hosted-runners-2: Type Size Avail | ext4 96G 84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 84G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: image pulled in 9.8s
ci-box: claude: fetched and verified in 10.9s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
ci-box: tofu: fetched and verified in 1.5s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: pi: installed and verified in 7.2s
ci-box: opencode: installed and verified in 2.4s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.8s
ci-box: clone deepened in 6.1s
ci-box: file times set from content: 4045 files, 303 directories
ci-box: ready in 27.1s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
--- FAIL: TestReleaseCopyReviewed (0.09s)
task_pages_test.go:236: COPY REVIEW REQUIRED: copy-status.py verify found copy pending review or stale bookkeeping
FAIL
rastrillo-budget/v1 ran 91ms
FAIL amadan.net/oficina/equipo/internal/equipotest 0.242s
FAIL
make: *** [Makefile:322: copy-release-check] Error 1
amadan: step copy failed: exit status 2
amadan: job failed at step copy — its output is above, not at the tail of this log
diff --git a/docs/superpowers/plans/HOSTED-SLICE2-RULINGS.md b/docs/superpowers/plans/HOSTED-SLICE2-RULINGS.md| new file mode 100644 |
| index 00000000..af6e0109 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/HOSTED-SLICE2-RULINGS.md |
| @@ -0,0 +1,69 @@ |
| +# Hosted runners slice 2: rulings made during the build |
| + |
| +Every ruling the controller made on Paul's behalf while building Tasks 1 to 33, copied verbatim from the build ledger, in order. Each says what was decided, why, and what it costs if wrong. Fix-round rulings for Task 33 and the whole-branch review are in full in task-33-fix1.md, task-33-fix2.md, task-33-fix3.md and task-32-fixwave.md, summarised here. |
| + |
| +- | T32 ordering | runs after T33 | Ruling: execute order 1..31, 33, 32 — plan says T32 runs after T33 — none | |
| +- Ruling: migration placeholders 01NN become 0125, 0126, ... in task order — coordinator ruling — renumber on merge. |
| +- Ruling: implementers run mutation checks in a scratch copy when another agent could share the package; no parallel implementers (1a lesson) — avoids reverted edits — none. |
| +- Ruling: the new protocol constant is wire.ProtocolHostedRunners = Protocol39; ProtocolHostedChecks (Protocol5, hub hosted CI) stays — implementer found the clash; renaming the old one would break hub CI for every current runner — none. Plan renamed in c5c15e9c. |
| +- Ruling: Task 4 moves the launch payload to BootstrapV2, filling Services from the intent's services_json and the proxy fields from the manifest — no task named it and Task 4 adds the proxy code it needs — if wrong, a later task re-plumbs the payload. |
| +- Ruling (T2 R1 #1): the snapshot's delivery to the provider is proved in Task 4, which builds BootstrapV2; Task 4's plan text now carries TestReplaySendsSnapshotServices — Astra's finding is right but the v1 payload has no services field — if wrong, Task 4's reviewer will catch the gap. |
| +- Ruling (T2 R1 #2): exclude exactly amadan.net, not its subdomains — spec §6 names amadan.net as the only forge hostname — none. |
| +- Ruling (T2 R2 minor): controller HTTP error texts (hostedctl/http.go table, 1a pattern) are exempt from the internal/equipo/copy.go rule — AGENTS.md's copy rule covers app-owned runtime strings people see; the controller's API codes are mapped to app copy by the instance — if wrong, move them in the copy task (31). |
| +- Ruling: Task 4's controller migration is 0004_proxy.sql (Task 3 took 0003_cert.sql) — numbering follows build order — none. |
| +- Ruling: Task 21's reachability probe counts any signed controller answer for a made-up attempt (Admission answers a signed 403 for unknown attempts, as Get does) as reachable — the probe proves pin and keys, not existence — none. |
| +- Ruling: Task 5 adds certification launches and its own refusal for images outside certification-images.json (image_not_allowed is gone); reload keeps Task 3's split (removed key drops its certs; a bad cert under a listed key fails the reload and keeps the old set). |
| +- Ruling (T4 R1 #1): the proxy code is derived, not stored: ProxyCode = base64url(HMAC-SHA256(controller proxy-code key from config, "equipo-proxy-code-v1\n"+launch_id)); spec_json keeps the bootstrap with the code removed, Replay re-derives it; the DB holds only the SHA-256 — meets "hash only" and exact replay — if wrong, a key rotation invalidates unredeemed codes of in-flight launches (they retry once). |
| +- Ruling (T4 R1 #2): the code window opens at the first Refresh (reconciliation) that sees the VM running; GET /v1/vms is an operator view and does not open it — narrows the contract explicitly; a later-opening window only lengthens the VM's own redeem time, and the code stays single use — none. |
| +- Ruling (T4 R1 #4): controller refusal texts stay exempt from the app copy rule (Task 2 ruling). |
| +- Ruling (T4 R1 #5): the metric keeps the house prefix, equipo_hosted_proxy_last_feed_seconds{proxy}; plan text amended — consistency with existing metrics — none. |
| +- Ruling (T4 R2 concern 2): proxy-silence alerts are at-least-once (alert, then mark delivered; a crash in between repeats one alert, identified by its episode) — losing an alert is worse than a duplicate — none. |
| +- Ruling (T4 R3, at cap): the implementer fixes the never-polling-proxy deadline (clearly right, small) without a 4th Astra round; the whole-branch review (Task 32) must check commit after e5542afe in ctlproxy/feed.go — house limit is three rounds — if wrong, the final review catches it. |
| +- Ruling: certification launches live 30 min (reaper stops at 20 min) — the account plan waits 20 min for evidence — none. Attempt ID derived from (key, image, size, launch-by): Task 13 may add an explicit attempt_id if it needs one. |
| +- Ruling (T5 R1, corrects my dispatch note): POST /v1/admin/reload fetches the controller/ objects from the config bucket first (through a fetcher injected by the composition command; S3 SDK only in cmd/equipo-hosted-controller), then verifies; any fetch or verify failure keeps the old sets — the plan and account plan (6.1, 6.4) depend on it — none. |
| +- Task 5: fix round 1 implementer done e42bf9bc. Ruling: Paul's certification public key lives at controller/cert-keys.json in the config bucket; account plan 3.5 must upload it (doc edit pending) — implementer's name, consistent with the other controller/ objects — none. Operators reload only at restart (account plan 9.3 already rotates by reboot). Note: govulncheck not run on new s3 module (network) — Task 32's make ci covers it. |
| +- Ruling (T6 R1 #4): add the resolved-address guard now (refuse loopback, link-local, private, ULA, unspecified, multicast, mapped forms; dial the checked IP) — the proxy host holds an instance role; cheap hardening at the H3 boundary — none. |
| +- Ruling (T6 fix 1 concerns): keep the wider refused ranges (100.64/10, 0/8, ::/96, NAT64, 6to4) and the new reasons bad_request and origin_address — the instance a VM reaches is public; nothing legitimate lives there — if a deployment ever needs a CGNAT origin, allow it by config then. |
| +- Ruling: the forged-identity-header requirement is met by headers never being forwarded plus the fake controller refusing them directly — the proxy terminates VM requests and builds its own — none. |
| +- Task 8: implementer DONE_WITH_CONCERNS cb29ccd5 (base b3b30565). Notes: Config.Resolvers and Config.Metadata have no defaults (Task 10's image passes -metadata, likely 169.254.169.254:80; Task 34 confirms the MicroVM resolver addresses); measured.json is flat {runner, vm_init, sandbox_policy, policy:<path>} and Tasks 10/13 must use vminit.PolicySetDigest; bootstrap file is StateDir/bootstrap.json {vm_ref, bootstrap}, TMPDIR StateDir/tmp. Ruling: Task 12 moves the bootstrap-file type into hostedwire (vminit is linux-only; the runner builds for darwin) — none. Image /run hook timeout 60 s (Task 10). |
| +- Ruling: guarded AWS tools (equipo-hosted-image, later equipo-hosted-ops) accept static keys only; each invocation obtains them with `aws configure export-credentials --profile <p> --format process` and passes them in its environment only (the R42 pattern from Task 17) — the prod profile is an assume-role chain — none. Task 33 implements this inside ops; the account plan's img wrapper must do the same (doc fix batched: DOCFIX-1). |
| +- Ruling (T10 R3, at cap): implementer fixes the three scanner gaps without a 4th Astra round; Task 32 must check the commit after cf29aa9b in internal/hostedimage — house limit — if wrong, the final review catches it. |
| +- Ruling (T11 R1 #1): checkrun.Inputs/Outcome extra fields accepted as an interface amendment (needed for identical primary reports); Inputs.Record is required and a nil recorder is refused before launch with a tested failure; Mac adapters ignore gate pins and must never run certified checkrun — none. |
| +- Ruling: the proxy sends its intercept CA after each leaf; the runner pins that CA (ProxyCAPin) and uses it as the only root — standard chain delivery; the pin carries the trust — none. |
| +- Ruling: Task 12 closes without a 3rd Astra round — round 2's only open item was recorded mutation evidence, now present (93-96); no code changed — Task 32 may re-check. |
| +- Ruling (T13 R1 #5): operator/CLI tool output (equipo-hosted-certify, controller API texts) is exempt from the app copy catalogue — AGENTS.md's rule covers app-owned runtime strings people see in Equipo — if wrong, Task 31 moves them. #6: TDD deviation for the certify command stays recorded; fixes go red-first. |
| +- Ruling (T13 R3, at cap): implementer makes migration 0006 drop-then-create, with an upgrade test, without a 4th Astra round; Task 32 checks the commit after 8dd964a3 — trivial and clearly right — none. |
| +- Ruling (revises my Task 14 dispatch): a failed renewal retries with backoff (5 s doubling to 60 s) until 2 minutes before that credential expires; only then does it fail the job — one transient outage must not end a 90-minute job — none. |
| +- Ruling (T15 R1): pack_incomplete is registered now with its pending copy key (work.reason.pack_incomplete); Task 25 still owns the other hosted reasons' copy and the copy JSON — the reason must survive ingestion now — none. |
| +- Ruling (T16 R1 #5): sending the bundle over the relay is Task 23's (the briefs overlap; Task 23 names it explicitly) — none. |
| +- Ruling (T16 concern 3): Task 17, which first emits deps_conflict/deps_new_module/deps_missing/deps_too_large, registers them in wire.StepReasons with pending copy — reasons must be registered when first emitted — none. |
| +- Ruling (T16 R1 #4, contract change per Astra's offered option): a requirement pinned only by its /go.mod line is metadata-only: stage its .mod, do not report it Missing; if a build needs its source, the offline build fails and checks.NeedsNetwork reports needs_network — go.mod-only lines are common (graph pruning) and would fail checks that never build them — if wrong, a needs-source case is reported as needs_network rather than deps_missing. |
| +- Ruling (T16, replaces the previous go.mod-only ruling): a base pin with only a /go.mod line stages the .mod and is not Missing; a candidate go.sum zip (h1 tree) line for a module@version the base pins only by /go.mod is a new pin -> deps_new_module, decided from the pins before any build; a candidate importing such a module without adding the line fails as a real candidate error (same as a personal runner) — Go requires the zip hash line to build a package, so the pins decide it — none. |
| +- Ruling (T16 R2 #3): module discovery skips testdata, dot- and underscore-prefixed directories, as the go tool does for ./... and as personal runners' GoModuleDirs does — consistency with what checks build — if wrong, a testdata module's deps would be missing and its build fails like on a personal runner. |
| +- Ruling (T17 R1): indexing the hosted pack before awaiting the deps bundle is accepted (indexing needs only the pack; no behaviour depends on the order) — none. Runner log-tail diagnostics are technical output, exempt from the app copy catalogue — none. TDD deviation for some Task 17 tests stays recorded. |
| +- Ruling (T19 R1 #1): never-launched evidence = a signed controller observation made after LaunchBy + 2 min (instance clock) showing either the intent abandoned with no VM ref, or no record of the attempt; plus no local launch call in flight. Anything else needs controller stop proof. Basis: Task 3's LaunchBy guard refuses/abandons any launch after LaunchBy, so nothing can start later — if wrong, a VM could outlive its job record (the reaper still stops orphans). |
| +- Ruling for Task 21: the controller's Get/Admission answer a signed 404 'absent' for an attempt ID with no record at all, and keep the signed 403 for an attempt owned by another key; the dispatcher builds HostedNeverLaunched only from that signed 404 or an abandoned view without VM, never from 403 or transport errors; it calls hostedLaunchReturned when Launch returns without a reply — otherwise a job whose launch never reached the controller could never end — none (attempt IDs are random; absence leaks nothing). Task 21's reachability probe then expects the signed 404. |
| +- Ruling (T20): a hosted limit set by an owner no longer on the roster falls back to the defaults (checked at read, inside the transaction) — AGENTS.md: revoked owners confer no continuing authority; same as Task 18 — none. |
| +- Ruling (T21 R1 #1, CORRECTS the Task 19 evidence ruling): an 'abandoned' intent with no VM ref is NOT evidence until ObservedAt >= LaunchBy + job lifetime + 2 min — a lost launch reply can leave an unlinked live VM, but every launch carries maximum duration = lifetime, so any VM from that intent has ended by then; 'absent' (signed 404) keeps LaunchBy + 2 min. Retries and replacement still need this proof or controller stop proof — if wrong, a duplicate VM could overlap for up to the lifetime (limits still count both). |
| +- Ruling (T21 R1 #5): throttled jobs stay 'launching' (contract correction): the controller keeps an intent that may still launch, so the job must not look un-launched — none. |
| +- Task 21: fix round 2/3 (test-only, c9144cd6). Ruling: closes without a 3rd round (only a guard test was added; Task 32 may re-check). |
| +- Ruling (T22 R1 #3): if running_seen_at is unset at enrolment, the enrol path records it from the verified admission (state running) in the same transaction and applies the 2-minute window from the earliest recorded sighting — keeps the window unconditional without blocking on the dispatcher — none. |
| +- Ruling (T22 R3, at cap): implementer reloads the job before capping at enrolment, with tests, without a 4th Astra round; Task 32 checks the commit after 5298ab96 — none. |
| +- Ruling (T23 R1 #2): the recorded tests-after exceptions for TestCommitTree and TestPrimarySendsBundleMalformedGoMod are accepted as historical (mutation evidence stands); the malformed-go.mod fix goes red-first — none. |
| +- Ruling (T24 R1 #3): presenting deps_new_module and deps_missing as needs_network in the task view is in Task 24's scope by my dispatch ruling (recorded here); Task 25 adds words and the other consumers — none. |
| +- Ruling (T25 R1 #1): SetHostedLimits (and the editor) refuse limits that could never admit one job: Running < 1, DailySeconds < HostedLaunchWindow + HostedChecksLifetime, MonthlyMicros < one Large job's full hold; so every limit chip's recovery promise holds — none. |
| +- Ruling (T26): option 2 — commit Research quoting + the Research floor (protocol 39) now; the Engineering/Design floor at protocol 28 and deleting the brief folding (wire/runners.go ~:860) become a follow-up after slice 2 (they break dozens of old-protocol thintest rigs; hosted work requires 39 anyway). FOR PAUL: follow-up item, M4 residue for runners below protocol 28. |
| +- Ruling (T27 R1 #3): the key test's tests-after exception is accepted as historical; record kept truthful. |
| +- Task 27: fix round 1 test-only (fd36bc2c). Ruling: closes without a 2nd Astra round (only guard tests added) — Task 32 may re-check. |
| +- Rulings (T28): add lambda:PassNetworkConnector to the controller role (Task 34 confirms need); add the LitestreamLag alarm (aws_cloudwatch_metric_alarm.litestream_lag); move the budget action role's permission to aws_iam_role_policy.budget_action; update phases.json and the account plan 5.1 list to match (DOCFIX-4). |
| +- Ruling (T28 R1 #4): generate a genuine network-plan fixture offline: a test-only override (not in the committed roots) with static fake credentials, skip_credentials_validation/skip_requesting_account_id/skip_metadata_api_check, every endpoint pointed at 127.0.0.1:1 so nothing can reach AWS; commit the resulting tofu show -json; if tofu cannot plan offline, record why and keep the hand-built fixture plus Task 34's live check — none. #7 dev budget limitation documented; Task 34 tests the launch fence directly. |
| +- Ruling (T29): wire the cloud-init templates into aws_instance.user_data now (variables, tofu tests, regenerated plan-check fixtures) — hosts must configure themselves; Task 29's scope — none. DOCFIX-5: account plan 6.3/6.4 pass -release image-manifest.json (the image manifest), not the release manifest. |
| +- Ruling (T29 R1 #6): infra/hosted/README.md is the ops document Task 28's file list created, so ops sections there are in scope (not the repo README that AGENTS.md protects) — none. |
| +- Ruling (T29 R2 #1): plan-check renders each committed cloud-init template itself (templatefile-subset substitution with the plan's validated variables only) and requires the planned user_data to match exactly; user_data_base64 and unprovable values are refused. #3: tests-after exception accepted as historical; CGO_ENABLED=0 set explicitly — none. |
| +- Ruling (T30): the 5-minute rule matches S2-3 as Paul approved it ('a checks step then fails hosted_unavailable and retries once on a new VM') — none. |
| +- Ruling: the 5-minute admission latch also fails live hosted jobs when the instance or dispatcher itself pauses 5+ minutes with the controller up; accepted. Such a pause already starves renewals and the feed, the job retries once after stop proof, and fencing an attempt whose admission we cannot vouch for is the safe side of S2-3. Cost if wrong: rare spurious hosted_unavailable retries after an instance stall; fix would be a separate dispatcher-liveness record. Two Task 22 enrol tests now refresh admissions each minute, as the dispatcher does. FOR PAUL (minor). |
| +- Task 33: dispatched implementer a44f4f2402bd71561 (opus), BASE dcfaf0a7. Task 31: copy JSON verified complete (34 keys = all new copy.go keys, all PENDING); Luna delegated copy pass running (copy-luna-r1.md). Ruling: plan copy gets Luna as the delegated copy reviewer per Paul's standing rule (2026-10-25); its text is applied verbatim to copy.go and the review JSON, markers stay PENDING; acceptance stays with Equipo's own path. Cost if wrong: Paul re-edits wording. |
| +- Task 33 review r1: CHANGES REQUESTED (4 Critical, 14 Important). Rulings in task-33-fix1.md (F1-F18). Ruling: red-first breach on 5c6d7afd accepted on mutation evidence, FOR PAUL; fix round must be red-first. Ruling: cert key ID becomes a required -cert-key-id flag; plan passes paul-cert-1 (as told to coordinator). |
| +- Task 33 review r2: CHANGES REQUESTED (N1,N2 Critical; N3-N6 Important; extras partial). Rulings task-33-fix2.md: single recovery owner unit + flock; filtered miss never proves absence; settlement invalidated by renewed fence; IAM action semantics fail-closed; ARN bound at intent; import blocks + durable adoption. |
| +- Task 33 review r3 (cap): N3-N5 ADDRESSED; N1 (INVOCATION_ID dropped by env -i; --recovery unenforced; start collision errors), N2 (detached IGW), N6 (check_adopt rejects unchanged deps) remain; extras: tf reconcile parse, budgets 2-page. Ruling: one after-cap fix (task-33-fix3.md), checked by Task 32's whole-branch review, as for Tasks 4/10/13/22 — defects are precise and fixes local — cost if wrong: Task 32 reopens them. |
| +- Ruling (for Task 32 fix wave): gateways attached to a VPC that section 0's pre-run inventory recorded (the default VPC) count as accounted — they pre-date the run — cost if wrong: an orphan of ours re-attached to the default VPC would be missed (implausible: our stacks never attach to it). |