oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Try Equipo review fixes: controller report
2
3All C1–C4, I1–I4 and M1–M6 changes are implemented on the existing try-equipo
4branch. The replacement full CI and final setup timing check passed.
5No real sign-ins, provider runs, additional agents,
6copy-review server, release, merge or deployment were used. README is unchanged.
7
8Sign-in and live-gate subprocesses retain the terminal process group. Other
9guide commands retain process-group cancellation. The official CLI receives
10terminal file descriptors directly for stdin, stdout and stderr; login output
11never passes through a guide buffer. Codex uses device authentication, and both
12providers receive SHET_BRIDGE. Pseudo-terminal tests send input through /dev/tty
13and check both output streams.
14
15The guide resolves and hashes the provider executables, copies them into private
16try/bin files with mode 0700, then uses those copies for version checks, sign-in,
17identity probes, runner configuration and live certification. The code-mode host
18is resolved beside the original resolved Codex executable. Executables under
19interactive or ZeroSub homes, including symlink aliases, are refused before use.
20
21Every guide failure prints its phase, cause and retry guidance. Startup errors
22also print diagnostics. The missing-Go shell refusal reads the same copy catalog.
23Build diagnostics and live-test stderr are retained in the appropriate output.
24The live go test uses -timeout=0; the configured calibration deadline still
25limits the driver.
26
27Confirmed homes pass the provider's OpenAccount and Validate checks before use.
28Account maintenance triggers a fresh official sign-in. The identity must still
29match after sign-in. All homes are validated, including accounts outside the
30primary certification pair. Unconfirmed homes do not increase the minimum;
31reducing a count drops them from setup state while leaving their directories on
32disk. Confirmed homes and IDs are retained. Base paths use the operating system
33account's home rather than the HOME environment variable.
34
35Resume and driver startup remove change-source-* and change-policy-* scratch
36only after checking recorded controllers and retiring their namespaces. The
37check compares boot identity, PID and start ticks, so PID reuse cannot block
38cleanup or cause an unrelated process to be stopped. Both providers' second
39homes and every additional connected home receive isolation sentinels and probes.
40Known tools that cannot request a filesystem read record not-applicable evidence;
41unknown tools and filesystem readers still require denied-read observations.
42
43The obsolete refresh branches in both launchers are removed. Runtime credential
44changes require account maintenance even if an old test policy names an auth host.
45Existing low-level AccountLease refresh tests remain, but launchers no longer
46call that operation. Stale v1 refresh comments were corrected.
47
48During implementation, containment's same-executable check exposed another
49blocker in the original guide: both go test and resume tried to create the
50manager outside the runner executable. These callers now invoke explicit
51direct-live runner entry points. The live child retains terminal access; resume
52uses process-group cancellation. The opt-in is required, configuration bytes
53must match the caller's configuration, and failures retain their actual cause.
54A test builds the runner and resumes empty fixture scratch in that process,
55without starting providers.
56
57## Verification
58
59New tests were written first. Initial failures included missing helper symbols,
60the existing rejection of not-applicable tool evidence. Early test runs also
61caught an error in dropping sparse unconfirmed homes. Two fixture errors were
62corrected: Python requires
63os.open for the bidirectional terminal descriptor, and synthetic recovery records
64need a manifest hash. Behavioral mutation checks below then verified the guards.
65
66All commands below use CGO_ENABLED=0. Tests use Go-managed temporary directories
67and do not require TMPDIR. Session scratch uses the supplied on-disk TMPDIR;
68Go caches remain at their defaults.
69
70Passing targeted commands:
71
72- go test ./internal/tryequipo ./internal/directlive ./internal/runner/provider/... ./internal/plan3test -run 'TestReview|TestAccount|TestConnectAll|TestDuplicateAccount|TestLiveConfig|TestUpgradeOriginal|TestDirectLiveGateEvidence|TestPlan3ReleaseBoundaries/inventory|Test.*Refresh' -count=1
73- go test ./internal/directlive -run '^TestDirectDriverFakeCLI/Engineering$' -count=1
74- go test -tags direct_live ./cmd/equipo-runner -count=1
75
76The fake Engineering run passed in 48.811s. It checks both providers' second-home
77observations, pathless-tool evidence, source preservation and scratch cleanup.
78The final targeted package run passed: directlive 1.172s, tryequipo 12.620s,
79provider 3.074s, Claude 2.359s, Codex 0.755s, and plan3test 0.202s.
80The tagged runner tests passed in 3.374s.
81
82Each mutation was compile-valid, caused its targeted test to fail with exit 1,
83and was restored. In C1, the background child printed tty-ready but could not
84read the answer; the test killed it on timeout. Removing driver cleanup left
85both injected scratch directories and failed the fake Engineering run.
86
87| Broken guard | Command | Result |
88| --- | --- | --- |
89| C1 foreground | `go test ./internal/tryequipo -run ^TestReviewForegroundTerminal$ -count=1` | Failed, exit 1; restored |
90| C2 device auth | `go test ./internal/tryequipo -run ^TestCodexAccountOfficialFlow$ -count=1` | Failed, exit 1; restored |
91| C2 bridge | `go test ./internal/tryequipo -run ^TestDuplicateAccountRefusedAndRetryable$ -count=1` | Failed, exit 1; restored |
92| C2 terminal output | `go test ./internal/tryequipo -run ^TestReviewForegroundTerminal/login$ -count=1` | Failed, exit 1; restored |
93| C3 hashes | `go test ./internal/tryequipo -run ^TestReviewPrivateExecutables$ -count=1` | Failed, exit 1; restored |
94| C3 forbidden homes | `go test ./internal/tryequipo -run ^TestReviewPrivateExecutables$ -count=1` | Failed, exit 1; restored |
95| C3 sibling host | `go test ./internal/tryequipo -run ^TestReviewCodexSiblingHost$ -count=1` | Failed, exit 1; restored |
96| C4 timeout | `go test ./internal/tryequipo -run ^TestReviewGateDeadlineAndGroups$ -count=1` | Failed, exit 1; restored |
97| I1 cause | `go test ./internal/tryequipo -run ^TestReviewRefusalExplainsCause$ -count=1` | Failed, exit 1; restored |
98| I2 validate homes | `go test ./internal/tryequipo -run ^TestReviewExpiredAccountSignsIn$ -count=1` | Failed, exit 1; restored |
99| I3 resume scratch | `go test ./internal/directlive -run ^TestReviewResumeScratchAndParentIdentity$ -count=1` | Failed, exit 1; restored |
100| I3 driver scratch | `go test ./internal/directlive -run ^TestDirectDriverFakeCLI/Engineering$ -count=1` | Failed, exit 1; restored |
101| I4 Codex other home | `go test ./internal/directlive -run ^TestReviewAllOtherHomesProbed$ -count=1` | Failed, exit 1; restored |
102| I4 all connected homes | `go test ./internal/tryequipo -run ^TestLiveConfigAccountChangeBothProviders$ -count=1` | Failed, exit 1; restored |
103| M1 confirmed minimum | `go test ./internal/tryequipo -run ^TestReviewDropUnconfirmedHome$ -count=1` | Failed, exit 1; restored |
104| M1 drop unconfirmed | `go test ./internal/tryequipo -run ^TestReviewDropUnconfirmedHome$ -count=1` | Failed, exit 1; restored |
105| M2 system home | `go test ./internal/tryequipo -run ^TestReviewSystemHome$ -count=1` | Failed, exit 1; restored |
106| M3 claude refresh | `go test ./internal/runner/provider/claude -run ^TestClaudeRefreshBeforeTurn$ -count=1` | Failed, exit 1; restored |
107| M3 codex refresh | `go test ./internal/runner/provider/codex -run ^TestCodexRefreshAndAdmission$ -count=1` | Failed, exit 1; restored |
108| M4 gate stderr | `go test ./internal/tryequipo -run ^TestReviewForegroundTerminal/gate$ -count=1` | Failed, exit 1; restored |
109| M5 start ticks | `go test ./internal/directlive -run ^TestReviewResumeScratchAndParentIdentity$ -count=1` | Failed, exit 1; restored |
110| M6 applicability | `go test ./internal/runner/provider -run ^TestReviewPathlessToolEvidence$ -count=1` | Failed, exit 1; restored |
111| Runner delegation | `go test ./internal/directlive -run ^TestReviewControllerUsesRunner$ -count=1` | Failed, exit 1; restored |
112
113
114The first size check exceeded the app's existing allowance by 23 lines.
115Combining each pending copy annotation with its entry restored the budget;
116no budget allowance changed. The changed guide path also required updating its
117exact reference-inventory hash.
118
119While CI was running, review found an unconfirmed expired home could be confirmed
120and then fail validation without starting sign-in. The new regression failed
121for both providers before the fix. A just-confirmed home now gets one additional
122pass through validation and sign-in; another maintenance failure stops it.
123The full tryequipo package passed after this final change (27.671s while CI ran),
124and go vet ./internal/tryequipo passed. An overlay mutation disabling that retry
125failed TestReviewUnconfirmedExpiredAccountSignsIn for both providers. The overlay
126left the working source intact.
127
128| Broken guard | Command | Result |
129| --- | --- | --- |
130| Unconfirmed maintenance | `go test -overlay=<scratch>/mutation-24.json ./internal/tryequipo -run '^TestReviewUnconfirmedExpiredAccountSignsIn$' -count=1` | Failed, exit 1; working source unchanged |
131
132The first background make ci completed with exit 2. Its test step ran all 26
133packages in 7m43.656s; the only failure was
134TestFinalFixLiveGateRunnerEnvironment, which requires the literal installer
135path using $HOME in the guide. The guide now retains that usual path and
136explains that the setup uses the system home even when HOME differs. Several
137existing timing limits produced advisory notes under shared load; no limit was
138changed. The brief requested one complete CI run, but this failed result could
139not satisfy the required passing gate, so a second full run was necessary.
140
141A second resume regression was reproduced while the replacement CI run was
142underway: interruption after saving confirmation but before writing the identity
143marker caused validation to stop. The guide now finishes that missing marker
144write while holding the home lock, after the provider observes the saved account
145and version. It refuses a different identity without writing a marker. The
146pre-fix test failed with provider_account_containment. The complete setup package
147then passed in 15.213s, followed by its vet check; the final marker identity test
148passed in 0.478s. A targeted staticcheck of internal/tryequipo also passed.
149These supplemental checks cover the correction made after the replacement
150full-suite invocation started.
151
152| Broken guard | Command | Result |
153| --- | --- | --- |
154| Finish the interrupted marker write | `go test -overlay=<scratch>/mutation-25.json ./internal/tryequipo -run '^TestReviewResumeBeforeIdentityMarker$' -count=1` | Failed, exit 1; working source unchanged |
155| Verify identity before restoring the marker | `go test -overlay=<scratch>/mutation-26.json ./internal/tryequipo -run '^TestReviewResumeBeforeIdentityMarker$' -count=1` | Failed, exit 1; working source unchanged |
156
157All 26 deliberate mutations were caught. Session overlays and logs are removed
158at handoff. Both full CI outcomes are recorded; no failed result is treated as passing.
159
160## Final CI result
161
162The replacement background make ci finished with exit 0. Its full test step ran
16327 packages without cached results or failures in 5m27.323s. Build, vet,
164formatting, staticcheck, govulncheck, gitleaks, size budgets, adapter checks,
165namespace checks, migrations and performance all passed. No reachable
166vulnerabilities or leaked secrets were reported. Cold boot had a 124ms median
167against 500ms, and every measured GET stayed below 150ms.
168
169The setup package took 14.944s in that run, above its 10s CI timing limit
170(reported locally as an advisory). Independent fake-account tests now run in
171parallel. Their bridge fixture is fixed once in the test process; tests that
172change other environment values remain serial. No assertions or limits changed.
173The final test-only scheduling change was verified with:
174
175`CI=1 CGO_ENABLED=0 go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -count=1 ./internal/tryequipo`
176
177Result: exit 0, one uncached package, zero failures; package time 5.021s and
178whole step 5.580s. The final package vet check also passed. The full CI rerun was
179not repeated after this test-only scheduling change.
180
181## Copy and limits
182
183Changed runtime messages remain individually marked COPY REVIEW PENDING in
184internal/equipo/copy.go. Their current text is in the existing Plan 3 copy
185inventory. Guide changes are flagged as pending copy review. The controller
186report records implementation and test evidence; no copy-review server was run.
187Live provider certification still has to be performed by Paul before release.
188