review: Astra R2 READY for instance-control-memory-1291
docs/superpowers/reviews/CODEX-FINDINGS-instance-control-memory-1291-R2.md+33 −0
CI passed — run details
Intent
<task-notification> <task-id>b7epmj0du</task-id> <tool-use-id>toolu_01KMSwk8uKgtgZb98peorqNK</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/95f33cc2-8998-4fa5-abb8-8043c3daeffb/tasks/b7epmj0du.output</output-file> <status>completed</status> <summary>Background command "Run Astra's round 2 review of the memory fix" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 14.5 g CO₂e (1,916,167 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on instance-control-memory-1291, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-instance-control-memory-1291-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-instance-control-memory-1291-R2.md| new file mode 100644 |
| index 000000000..7d7eaca81 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-instance-control-memory-1291-R2.md |
| @@ -0,0 +1,33 @@ |
| +Reviewed round **2 of 3** at `c7eaa1c600b26706a206684f99e686dcbcc715ce`, including fix `dde07131`. **No new P1, P2 or P3 findings.** Round 1’s compatibility finding is resolved under the controller’s acceptance of the upgrade transient. |
| + |
| +Both directions behave as stated: |
| + |
| +| Mode | New renderer → old template | Old renderer → new template | After successful adoption | |
| +|---|---|---|---| |
| +| Claims | 256 MiB + `GOMEMLIMIT=192MiB` | 256 MiB, no GOMEMLIMIT | 256 MiB + 192 MiB | |
| +| Build worker | 1 GiB + `GOMEMLIMIT=768MiB` | 256 MiB, no GOMEMLIMIT | 1 GiB + 768 MiB | |
| +| Off / ordinary demo box | Template’s 64 MiB | 256 MiB | Already correct | |
| + |
| +The dual-anchor replacement is correct at [claimunit.go:42](internal/host/claimunit.go#L42). I also confirmed that the reconstructed legacy template matches `origin/main` exactly. |
| + |
| +**The healing path is wired, but is conditional and not immediate.** Normal, `--stage-only` and `--config-only` root adoption reach `ensureUnits()` in both claims and demo modes; `--restart-only` skips it. Claims startup opens its registry and constructs claim wiring first, so failures there prevent repair. See [agent.go:6016](internal/host/agent.go#L6016) and [agent.go:6057](internal/host/agent.go#L6057). |
| + |
| +The stale comparison uses the running binary’s embedded template and renderer. A mismatch defeats the “already armed” return, writes the rendered unit, performs `daemon-reload`, then calls `restartClaimControl`. That uses `try-restart`: running control restarts; inactive control gets the corrected settings on its next activation. See [systemunits.go:200](internal/host/systemunits.go#L200), [systemunits.go:252](internal/host/systemunits.go#L252), and [claimunit.go:224](internal/host/claimunit.go#L224). |
| + |
| +**Timing:** successful apply re-arms the timer and paths. The timer’s configured cadence is one hour plus up to ten minutes of jitter; boot delay is five minutes plus jitter. Config or staging requests can repair sooner, but the agent’s one-minute in-process adoption does not itself repair units. A pass encountering the apply lock skips repair and waits for another trigger. Thus this is an hourly backstop, not an immediate or strict deadline. Group-marked boxes additionally require a `repair` maintenance permit; the automatic-healing claim does not extend unconditionally to them. See [timer](internal/host/units/carlos-adopt.timer#L9) and [repair gates](internal/host/systemunits.go#L98). |
| + |
| +Census verdicts for changed entries: |
| + |
| +| Entry | Verdict | |
| +|---|---| |
| +| `claimUnitContent`, lines 159–217, including helper lines 42–49 | **APPROVE** existing authority disposition. Only memory substitutions change; no additional reads, paths or permissions. | |
| +| `ensureSystemUnitsWithGuard`, lines 69–305; helper lines 312–314 | **APPROVE** existing legacy disposition. The extracted predicate is identical; guards and effects remain unchanged. | |
| +| `internal/host` envelope | **APPROVE**, including both new helpers and changed tests. | |
| + |
| +The service entry and `internal/host/units` envelope are unchanged since round 1; their approvals stand. |
| + |
| +In-memory substitution checks passed for all four modes, and `git diff --check` passed for `dde07131`. The new upgrade test checks stale detection, not a complete update/restart integration. Targeted Go tests could not start because the read-only sandbox denied creation of the build directory. No files changed. |
| + |
| +No third review round is required under the stopping rule. |
| + |
| +**READY** |
| \ No newline at end of file |