oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1# Controller report: Codex startup notice
2
3Brief: CODEX-BRIEF-codex-startup-notice.md. Branch: codex-startup-notice.
4Starting revision: a127a14, which contains the brief above main 85d9ea8.
5
6## Changes and path trace
7
8R1: The terminal login probe, launcher preflight, and session handler accept
9one account/updated notification per process, with no id and authMode equal
10to chatgpt. planType is ignored. A shared predicate checks the frame shape;
11each process reader owns its allowance. The probe stops at the account/read
12response. Preflight never sends turn/start. The session closes its allowance
13under its mutex before its first turn/start call and never reopens it, including
14after a completed turn. Duplicate notices, other or missing auth modes, and
15ID-bearing frames remain refused.
16
17The session path is reachable: Open starts a preflight process, then a separate
18session process whose handler is installed before initialize and account/read.
19Both processes receive the recorded startup sequence. The direct-live driver
20constructs this same Codex launcher for its exercises and certification, so it
21inherits both fixes. Its policy-readback collector only inspects result frames;
22its certificate validation does not dispatch account events. There is no second
23account-event exception to change. Its fake CLI now emits the recorded sequence.
24
25R2: LoginEnvironment omits TMPDIR for both providers when unset or empty, and
26preserves a nonempty value. The prerequisites version command uses a bounded
27stdout-only helper; command failure still fails the check. Other command output
28handling is unchanged.
29
30R3: Fixtures include the recorded disabled remote-control frame with a fake
31installation ID, followed by the ChatGPT/promax notice. Coverage includes the
32probe, preflight, session, official login, guided account setup, multiple-account
33setup, and direct-live fake CLI. Tests cover ID values (including empty and null),
34missing/null/other auth modes, duplicates, arbitrary planType, notices before
35initialize, duplicates across initialize, notices during config/thread setup,
36and notices both during and after a completed turn. TestCodexPreflightNotification
37also checks the shared startup predicate. No runtime copy or README changed.
38
39## Verification
40
41All Go commands use CGO_ENABLED=0 and the default Go caches. New tests use
42`t.TempDir()` and do not require TMPDIR. Environment tests explicitly cover
43unset, empty and nonempty values. Scratch is under the on-disk TMPDIR.
44
45Before implementation, this command exited 1 at the intended assertions:
46
47```sh
48go test ./internal/runner/provider ./internal/runner/provider/codex ./internal/tryequipo -run 'TestCodex(LoginStartupNotice|StartupNotice|SessionStartup|AccountOfficialFlow)|TestLoginEnvironmentTMPDIR|TestOnboardingOfficialLogin$' -count=1
49```
50
51The recorded notice was refused in all three readers and the guide; empty and
52unset TMPDIR produced an unwanted TMPDIR= entry. The initial test compilation
53was corrected to use the concrete terminal driver before recording these failures.
54
55`go test ./internal/tryequipo -run '^TestVersionStdout$' -count=1` also exited 1
56with the old merged-output behavior: the version contained the stderr warning.
57
58After implementation:
59
60- `go test ./internal/runner/provider ./internal/runner/provider/codex ./internal/tryequipo ./internal/directlive -count=1`
61 exited 0 for all four packages (9.155s, 29.808s, 5.825s and 150.708s).
62- `go test ./internal/runner/provider/codex -run '^TestCodex(Startup|SessionStartup|PreflightNotification)' -count=1`
63 exited 0, including the final first-turn timing tests.
64- `go test ./internal/runner/provider ./internal/tryequipo -run 'TestCodexLoginStartupNotice|TestVersionStdout|TestLoginEnvironmentTMPDIR' -count=1`
65 exited 0, including the final cross-initialize probe tests.
66- `git diff --check` and `python3 scripts/runner-dead-references.py` exited 0.
67 No reference hashes needed remapping.
68
69Each guard mutation used a Go overlay, leaving working source unchanged. The
70command form was `go test -overlay=<scratch>/<mutation>.json <packages> -run <pattern> -count=1`.
71Every row below exited 1 at the intended test assertion, with no build failures.
72
73| Mutation | Packages | Pattern |
74| --- | --- | --- |
75| notice-id: allow IDs | ./internal/runner/provider | ^TestCodexLoginStartupNotice$/.*id$ |
76| notice-id: allow IDs | ./internal/runner/provider/codex | ^TestCodexStartupNotice$/(preflight\|session)/(id\|empty-id)$ |
77| notice-mode: allow another nonempty auth mode | ./internal/runner/provider | ^TestCodexLoginStartupNotice$/api-key$ |
78| notice-mode: allow another nonempty auth mode | ./internal/runner/provider/codex | ^TestCodexStartupNotice$/(preflight\|session)/api-key$ |
79| probe-duplicate: ignore consumed allowance | ./internal/runner/provider | ^TestCodexLoginStartupNotice$/duplicate$ |
80| preflight-duplicate: ignore consumed allowance | ./internal/runner/provider/codex | ^TestCodexStartupNotice$/preflight/duplicate$ |
81| session-duplicate: ignore consumed allowance | ./internal/runner/provider/codex | ^TestCodexSessionStartupNoticeConsumed$ |
82| turn-cutoff: leave allowance open | ./internal/runner/provider/codex | ^TestCodex(SessionStartupBeforeFirstTurn\|StartupAfterCompletedTurn)$ |
83| empty-tmpdir: append even when empty | ./internal/runner/provider | ^TestLoginEnvironmentTMPDIR$ |
84
85The initial shared-predicate mutation commands also selected the launcher
86package without matching its nested subtests. The explicit launcher commands
87above then verified both preflight and session refusals separately.
88
89## Full gate and delivery
90
91R4: Run one full `make -k ci` after staging the complete candidate, including
92this report. The result and any permitted retry are recorded in the commit
93body and the required three-line summary. Scratch overlays and logs are removed
94before handoff. No live gate, real sign-in, deployment, copy-review server, or
95access to the live equipo data directory was performed.
96