review: census round 4 APPROVED (Astra), unedited
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+67
−0
docs/superpowers/reviews/CODEX-FINDINGS-census-named-unit-delivery-114-R4.md+67 −0
CI passed — run details
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-census-named-unit-delivery-114-R4.md b/docs/superpowers/reviews/CODEX-FINDINGS-census-named-unit-delivery-114-R4.md| new file mode 100644 |
| index 000000000..08b54aad6 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-census-named-unit-delivery-114-R4.md |
| @@ -0,0 +1,67 @@ |
| +- R3 `reap`: **resolved** — cleanup retains hosts referenced by surviving managed drop-ins. |
| +- R3 `runAdoptUnderRootRelease`: **resolved** — production uses the serialized pass and retained-reference protection. |
| +- R3 `stampedPlan.declaredHostRefusal`: **resolved** — former hosts remain protected while their drop-ins survive. |
| +- R3 `SyncWithCallbacks`: **resolved** — the shared flock covers both writers and cleanup; the tripwire precedes delivery mutations. |
| +- R3 envelope `internal/appconfig`: **resolved** — retained references and declaration stability address R3-E1/E2. |
| +- R3 envelope `internal/host`: **resolved** — production delivery and declaration installation share the same lock. |
| + |
| +Reviewed `e5f278e4d83ab6a79fdf7ef04fcd09fa66a0926d` using the R4 brief at `e63e1aa576c305170f70d78478237eb3adae397f`. The requested three-dot diff uses merge base `9bcbab0f5646c11c7d05c9346dcfcea8c84f0751`; local `origin/main` is `de23fa5ec21dddbae95a6be44867abd2652baa81`. |
| + |
| +**46 rows reviewed: 42 units and four envelopes; all approve.** Concurrent root hand edits are excluded as instructed. Presence and digest comparison also resolves the absent-to-empty declaration case. |
| + |
| +| Unit or envelope | Verdict | Reason | |
| +|---|---|---| |
| +| `cli.go:runRouteUnit` | approve | Line 1802 validates the proposed stamp before the existing write. | |
| +| `internal/appconfig/sync.go:reap` | approve | Lines 473–499 retain registry hosts plus declared and surviving-drop-in hosts supplied at lines 413–420. | |
| +| `internal/host/agent.go:runAdoptUnderRootRelease` | approve | Line 5275 supplies fixed production paths and the shared flock to the declaration-gated pass. | |
| +| `system.go:runSystem` | approve | Lines 110–111 dispatch to the installer’s explicit root-only gate. | |
| +| `system.go:systemVerb` | approve | Line 55 recognizes the operator verb without reading authority data. | |
| +| `cli.go:runRouteHibernate` | approve | Lines 1635–1637 add a refusal before the existing daemon check. | |
| +| `internal/appconfig/sync.go:UnitConfigApps` | approve | Lines 578–600 extend discovery without granting mutation authority. | |
| +| `internal/appconfig/sync.go:syncHostClaimed` | approve | Lines 629–652 retain guarded writes and the extracted rendering and acknowledgement checks. | |
| +| `internal/appconfig/syncexec.go:AwaitingRestart` | approve | Lines 1209–1285 preserve account, environment and owned-bundle narrowing. | |
| +| `internal/appconfig/syncexec.go:SyncExecWithCallbacks` | approve | Lines 713–749 keep the added `Stat` behind the route filter, for notices only. | |
| +| `cli.go:hibernateRail` | approve | Lines 1857–1862 refuse hibernation on a stamped row without adding privileged effects. | |
| +| `internal/appconfig/declarations.go:declarations.DeclaredBinding` | approve | Lines 179–188 require the trusted snapshot to match unit, host, account and app. | |
| +| `internal/appconfig/dropin.go:dirIsPlain` | approve | Lines 76–79 inspect the directory entry without following symlinks. | |
| +| `internal/appconfig/dropin.go:ensureDropInDir` | approve | Lines 51–72 reject symlinks and non-directories, then validate ancestry before file writes. | |
| +| `internal/appconfig/dropin.go:hasPending` | approve | Lines 131–134 inspect marker existence without following its target. | |
| +| `internal/appconfig/dropin.go:unitDirs` | approve | Lines 139–158 enumerate the configured systemd root and exclude symlinked children. | |
| +| `internal/appconfig/rootread.go:rootRead` | approve | Lines 53–72 perform bounded reads through trusted descriptors and distinguish empty files from absence. | |
| +| `internal/appconfig/stamped.go:StampShape` | approve | Lines 57–61 wrap the shared refusal predicate without adding effects. | |
| +| `internal/appconfig/stamped.go:Stamped` | approve | Lines 25–28 classify route fields; classification alone grants no authority. | |
| +| `internal/appconfig/stamped.go:stampShapeReason` | approve | Lines 70–79 refuse socket, missing-address and hibernating shapes. | |
| +| `internal/appconfig/stamped.go:stampedForDelivery` | approve | Lines 48–49 classify delivery; dispatch independently protects declared and retained hosts. | |
| +| `internal/appconfig/stamped.go:unitDelivered` | approve | Lines 34–35 extend discovery and fingerprint eligibility without authorizing mutations. | |
| +| `internal/appconfig/sync.go:finishHost` | approve | Lines 797–836 preserve the extracted restart, claim and acknowledgement checks. | |
| +| `internal/appconfig/sync.go:prepareHost` | approve | Lines 670–767 preserve basename, existing-file, key-loss and rendering checks; stamped callers first require declaration binding. | |
| +| `internal/appconfig/syncexec.go:BlockedStamps` | approve | Lines 1106–1135 narrow notices without exposing another account’s conflicting host. | |
| +| `internal/appconfig/unitsync.go:applyStamped` | approve | Lines 400–465 require prepared work, trusted reads, exact effective env paths and declaration binding before restart. | |
| +| `internal/appconfig/unitsync.go:planStamped` | approve | Lines 128–231 retain references and require declared identity before probing validated canonical units. | |
| +| `internal/appconfig/unitsync.go:prepareStamped` | approve | Lines 260–322 bind identity, check base grammar and overlap, validate destinations, and record intent before replacement. | |
| +| `internal/appconfig/unitsync.go:stampedPlan.declaredHostRefusal` | approve | Lines 99–113 protect retained old-host references and refuse mismatched current stamps. | |
| +| `internal/host/unitops.go:InstallNamedUnits` | approve | Lines 49–89 use the shared decoder and flock, then atomically replace the fixed production destination. | |
| +| `internal/host/unitops.go:RunSystemNamedUnits` | approve | Lines 97–107 require effective UID zero before reading the operator-selected source; destination and lock directory are fixed. | |
| +| `internal/host/unitops.go:daemonReload` | approve | Lines 190–195 execute fixed `systemctl` arguments. | |
| +| `internal/host/unitops.go:lockConfigSync` | approve | Lines 122–131 hold the production env-directory lock shared by delivery and installation. | |
| +| `internal/host/unitops.go:probeUnits` | approve | Lines 139–145 receive validated declared names as separate arguments; ambiguous response attribution is refused. | |
| +| `internal/host/unitops.go:systemctlRestartUnit` | approve | Lines 201–207 execute one validated, declaration-bound unit argument without shell interpolation. | |
| +| `internal/rootstate/file_linux.go:OpenTrustedDirFrom` | approve | Lines 40–65 constrain traversal to the anchor and reuse checked descriptor descent; production anchors at `/`. | |
| +| `internal/rootstate/file_linux.go:OpenTrustedFileFrom` | approve | Lines 72–93 require trusted ancestry and a regular, single-link file with trusted ownership and permissions. | |
| +| `cli.go:runAdd` | approve | Lines 211–245 and 394–405 validate the resulting stamped shape before writing. | |
| +| `cli.go:unitRail` | approve | Lines 1838–1851 allow clearing while refusing unsupported proposed stamps. | |
| +| `internal/appconfig/routefingerprint.go:ConfigRouteFingerprints` | approve | Lines 79–85 add unit identity to change detection only. | |
| +| `internal/appconfig/sync.go:SyncWithCallbacks` | approve | Lines 79–85 hold the shared lock; lines 118–125, 230–235 and 413–420 enforce dispatch, tripwire and retained-reference cleanup. | |
| +| `internal/appconfig/syncexec.go:execRouteBase` | approve | Lines 875–879 exclude stamped routes without weakening existing filters. | |
| +| Envelope `.` | approve | CLI changes add refusals and root-only installer dispatch; notices grant no authority, and subprocess tests isolate environment and cwd. | |
| +| Envelope `internal/appconfig` | approve | Delivery and cleanup use the locked snapshot and retained references; trusted readers and base/overlap refusals remain enforced. | |
| +| Envelope `internal/host` | approve | Production uses fixed paths and the shared lock; installer authority and subprocess arguments are constrained. | |
| +| Envelope `internal/rootstate` | approve | New openers reuse checked traversal; the existing opener remains unchanged and non-Linux implementations refuse. | |
| + |
| +History: R1 **ESCALATED (10)**, R2 **ESCALATED (10)**, R3 **ESCALATED (6)**, R4 **APPROVED**. No further round started. |
| + |
| +Static review only: no files edited, subagents spawned or tests run; `GOCACHE` remained unset. This approves the census question, not build or test results. |
| + |
| +Recording the complete verdict on amadan #280 failed because the sandbox denied network access. The verdict has **not** been posted. |
| + |
| +APPROVED |
| \ No newline at end of file |