Skip to content

Commit e0e3234

Browse files
authored
Merge pull request #2825 from lidge-jun/codex/promote-preview-2350
[WRONG BRANCH] promote dev onto preview for v2.35.0-preview
2 parents 809a06b + 6667e34 commit e0e3234

219 files changed

Lines changed: 18208 additions & 498 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,12 @@ jobs:
424424
- name: Privacy scan
425425
run: bun run privacy:scan
426426

427+
# The ocx skill ships a capability -> route map generated from src/cli/capabilities.ts.
428+
# `bun run test` already covers this via tests/skill-ocx.test.ts; this step exists so the
429+
# failure names the fix instead of surfacing as a byte-comparison diff in a test log.
430+
- name: Check the generated ocx skill surface is current
431+
run: bun run skill:surface:check
432+
427433
- name: Check release helper syntax
428434
run: bun build scripts/release.ts --target=bun --outdir=.tmp/ci-release-script-check
429435

‎AGENTS.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,19 @@ bun run privacy:scan # credential/privacy scan used by CI
177177
bun run build:gui # Vite GUI build
178178
```
179179

180+
`skills/ocx/` is the operating reference for the CLI — what an agent reads to *drive* a running
181+
proxy, as opposed to [`AGENTS_INSTALL.md`](./AGENTS_INSTALL.md) (installing and operating consent)
182+
or this file (changing the codebase). Its surface map is generated:
183+
184+
```bash
185+
bun run skill:surface # regenerate after adding a capability
186+
bun run skill:surface:check # what CI asserts
187+
```
188+
189+
`tests/skill-ocx.test.ts` fails if the committed map drifts from `src/cli/capabilities.ts`, and
190+
also if the hand-written pages name a command the registry does not have. That second check is not
191+
hypothetical: it caught a documented `ocx request-history` that never existed.
192+
180193
During implementation, use the smallest focused checks that directly cover the
181194
changed subsystem. Do not run repository-wide `bun run typecheck` or
182195
`bun run test` for a scoped change unless the change affects shared runtime,
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# 000 — igwanu bug-PR merge round: plan
2+
3+
Round base: `dev @ 8b1b65b8d` (local == `origin/dev`, verified 2026-08-27).
4+
Scope: the 13 open **bug**-labelled PRs. Four are Ingwannu's (#2767, #2766, #2764,
5+
#2761); nine are other authors' (#2747, #2745, #2740, #2733, #2729, #2726, #2693,
6+
#2638, #2497).
7+
8+
Enhancement-labelled PRs are explicitly out of scope for this round.
9+
10+
## The finding that orders the whole round
11+
12+
Three PRs (#2767, #2764, #2747) show **failing required CI** — `ci`, `macos`,
13+
`test 3/4`, `gates` — while their own merged trees compile clean. The failure is
14+
not theirs. Every one of them fails the same repository-wide assertion:
15+
16+
```
17+
error: package.json version 2.34.0 equals release tag v2.34.0, but this commit is
18+
not the one that tag names. The tree claims an already-published version.
19+
(fail) release version line > the in-tree version is never behind a released one
20+
```
21+
22+
`dev` still carries `2.34.0` after tag `v2.34.0` shipped, so *every* PR opened
23+
after the release train inherits a red matrix. A second shared failure hits
24+
`gates`: `privacy:scan` reads the scp-style SSH remote principal recorded in
25+
`devlog/_plan/260827_release_train/020_preview_release.md` as an email address.
26+
27+
**#2766 repairs both.** It is the keystone: until it lands, no other PR in this
28+
round can produce a trustworthy green matrix, and re-running their CI is wasted
29+
work. This is the inverse of the previous round's lesson — there, green checks
30+
were not evidence of health; here, red checks are not evidence of harm.
31+
32+
Evidence: run `33081644562` job `98550259965` (#2767), run `33080634739` job
33+
`98546624127` (#2764), run `33059606933` job `98534630924` (#2747) — each shows
34+
`1 fail` and that one failure is `release version line`.
35+
36+
## Merged-tree gate (this round's own evidence, not GitHub's)
37+
38+
Every PR head was fetched, merged against `dev @ 8b1b65b8d` with
39+
`git merge-tree --write-tree`, committed as `mtp/<n>`, checked out to an isolated
40+
worktree sharing this repo's `node_modules`, and compiled.
41+
42+
| PR | ahead | behind dev | merge-tree | tsc on MERGED tree |
43+
|---|---|---|---|---|
44+
| #2767 | 1 | 0 | CLEAN | OK |
45+
| #2766 | 2 | 0 | CLEAN | OK |
46+
| #2764 | 1 | 0 | CLEAN | OK |
47+
| #2761 | 1 | 2 | CLEAN | OK |
48+
| #2747 | 1 | 26 | CLEAN | OK |
49+
| #2745 | 2 | 26 | CLEAN | OK |
50+
| #2740 | 1 | 26 | CLEAN | OK |
51+
| #2733 | 1 | 43 | CLEAN | OK |
52+
| #2729 | 2 | 89 | CLEAN | OK |
53+
| #2726 | 1 | 63 | CLEAN | OK |
54+
| #2693 | 2 | 118 | CLEAN | OK |
55+
| #2638 | 2 | 179 | CLEAN | OK |
56+
| #2497 | 1 | **386** | **CONFLICT** | not reachable |
57+
58+
The typecheck gate was itself verified rather than trusted: 12 runs finishing in
59+
~12s looked like a no-op, so a deliberate `const x: number = 'str'` was injected
60+
into a merged worktree and `tsc` returned `error TS2322`, exit 1. The speed is
61+
real — this repository is on the native TypeScript 7.0.2 compiler (~0.44s full
62+
typecheck). The gate works.
63+
64+
## Cross-PR file contention
65+
66+
`src/server/responses/core.ts` — **#2745, #2638, #2497**. Pairwise
67+
`git merge-tree` required before any second one of those lands; textual
68+
mergeability is not behavioral compatibility on the auth/routing boundary.
69+
70+
`src/adapters/openai-chat.ts` — #2764 only. `src/adapters/openai-responses.ts`
71+
— #2767 only. `src/codex/auth-context.ts` — #2638 and #2497.
72+
No other file is touched by two in-scope PRs.
73+
74+
## Loop-spec
75+
76+
- Loop archetype: verifier-defined (spec-satisfaction repair per PR).
77+
- Write scope: `devlog/_plan/260827_igwanu_bug_pr_merge_round/`, `src/` and
78+
`tests/` only where needed to land or reimplement a PR, plus PR metadata on
79+
GitHub and `codex/` topic branches.
80+
- Out of scope: `main`, `preview`, releases, tags, npm publish, docs deploy,
81+
enhancement PRs, force-push, history rewrite.
82+
- Bounds: `dev` is push-protected — every lane travels a `codex/` branch and a PR
83+
targeting `dev`. `bun test` takes a machine-wide lock: one suite at a time,
84+
long suites on `ssh lidge` via `ocx-run`. Never `OCX_TEST_NO_QUEUE=1`.
85+
86+
## Work-phase map (one phase = one full PABCD cycle)
87+
88+
| WP | Doc | Slice | Depends on |
89+
|----|-----|-------|------------|
90+
| wp1 | 000 | Docs-only roadmap: intake, merged-tree gate, contention map, lanes | — |
91+
| wp2 | 010 | **Keystone** #2766 — unblock the repository-wide CI gates | wp1 |
92+
| wp3 | 020 | Ingwannu remainder #2761, #2764, #2767 | wp2 |
93+
| wp4 | 030 | Clean approved lane #2733, #2726, #2747 | wp2 |
94+
| wp5 | 040 | Maintainer changes-requested #2745, #2729 | wp2 |
95+
| wp6 | 050 | Contributor remainder #2740, #2693, #2638 | wp2, wp5 |
96+
| wp7 | 060 | #2497 adjudication + round close-out | all |
97+
98+
## Standing gates (inherited, all mandatory)
99+
100+
1. Compile evidence comes from the MERGED tree, never the PR head alone.
101+
2. Any two PRs touching a shared file get `git merge-tree` before either merges.
102+
3. Green checks are not health unless the list includes `ci` / `test N/4` /
103+
`macos`. **Corollary discovered this round: red checks are not harm until the
104+
shared baseline is green.**
105+
4. One `bun test` suite at a time; remove a stale
106+
`/tmp/opencodex-bun-test.lock` rather than bypassing the queue.
107+
5. Every lane travels a `codex/` branch and a PR targeting `dev`.
108+
6. A safety net that exists in code is not a safety net that functions.
109+
110+
## Accept criteria (mirrored into goalplan criteria[])
111+
112+
- c1 — all 13 PRs carry a recorded terminal disposition with SHA or reason.
113+
- c2 — merged-tree compile gate ran for every candidate (this doc's table).
114+
- c3 — each landed change carries a focused test receipt from the merged tree.
115+
- c4 — `dev` advanced only through PRs targeting `dev`.
116+
- c5 — auth/credential/OAuth surfaces are not landed autonomously.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# 010 — wp2: the keystone, #2766
2+
3+
**Lane L1 (commit-then-merge). Every other MERGE in this round serializes behind
4+
this one.**
5+
6+
Precisely scoped: review, focused verification, rebases, and approval requests for
7+
other PRs run in parallel — their changed paths are disjoint from this one's
8+
(`package.json` plus a release-runbook document). What must wait is the act of
9+
merging, because landing anything else first leaves `dev` sitting on known-red
10+
release-version and privacy gates.
11+
12+
PR #2766 `ingw/fix-release-doc-privacy-scan-2762` — head `076ad3036`, ready
13+
(not draft), MERGEABLE, 0 commits behind `dev`, 30 checks with **zero failures**.
14+
It is the only PR in the round whose matrix is already green, because it is the
15+
one that repairs the matrix.
16+
17+
## Why it is the keystone
18+
19+
Two repository-wide gates went red after the v2.34.0 release train, and they fail
20+
on `dev` itself, not on any contributor's code:
21+
22+
1. `tests/release-version-line.test.ts` — `package.json` is `2.34.0` and tag
23+
`v2.34.0` is published, so every commit after the tag "claims an
24+
already-published version". Fails `ci`, `macos`, `test 3/4`.
25+
2. `privacy:scan` — `devlog/_plan/260827_release_train/020_preview_release.md:36`
26+
contains a literal scp-style SSH remote whose `user@host` principal the scanner
27+
reads as an email address. Fails `gates`.
28+
29+
Confirmed inherited by #2767, #2764, #2747. Merging anything else first means
30+
reading a red matrix that says nothing about the PR under review.
31+
32+
## MODIFY map (exact, already authored by the PR)
33+
34+
MODIFY `package.json`:
35+
36+
```diff
37+
- "version": "2.34.0",
38+
+ "version": "2.35.0",
39+
```
40+
41+
MODIFY `devlog/_plan/260827_release_train/020_preview_release.md`:
42+
43+
The runbook's push line is rewritten to build the destination from two shell
44+
variables (`release_host=github.com`, `release_repo=lidge-jun/opencodex.git`) and
45+
interpolate them, so the scp-style principal never appears as one literal token.
46+
The exact diff is on the PR; it is not reproduced here, because quoting it
47+
verbatim would reintroduce the very literal the scan rejects — this document is
48+
itself scanned.
49+
50+
The push destination is byte-identical after expansion and the deploy-key override
51+
is preserved. This is documentation text, not executed release automation.
52+
53+
## Security-boundary judgement (MAINTAINERS.md)
54+
55+
The PR touches `package.json` version metadata and a release runbook document.
56+
`AGENTS.md` flags release automation — `scripts/release.ts`,
57+
`.github/workflows/release.yml` — for mandatory security review. **Neither file is
58+
touched.** Verified: `release.yml` triggers on `workflow_dispatch` only, with an
59+
explicit `version` input that must equal `package.json` and an immutable commit
60+
input. A version bump on `dev` therefore cannot initiate a publish; a human
61+
dispatch with an explicit version is required.
62+
63+
Dependencies and lockfiles are unchanged, and no scheduled, push-triggered,
64+
auto-merge, or version-keyed publish path exists: `release.yml` is
65+
`workflow_dispatch`-only and additionally rejects any ref that is not `main` or
66+
`preview`. A version bump on `dev` cannot publish.
67+
68+
**It is still not unreviewed-autonomous.**
69+
`.github/scripts/pr-sponsored-surface.cjs` lists `package.json` as a restricted
70+
surface, and `MAINTAINERS.md` requires approval from at least one maintainer who
71+
is not the author, plus explicit security review for release/package boundaries.
72+
The PR body's unticked box says exactly this.
73+
74+
A round-level instruction to "merge the bug PRs" is not the exact-head PR approval
75+
that `MAINTAINERS.md` and GitHub require. **Approval gate: before merge, a
76+
non-author maintainer approves #2766 at its exact head.** `Ingwannu` is the
77+
author, so the approval must come from another maintainer account. Cannot be
78+
self-satisfied and cannot be inferred from this document.
79+
80+
## TESTS
81+
82+
No new test. The behavior proof is that the two already-red repository gates turn
83+
green, which is observable on the merged tree and on post-merge `dev` CI.
84+
85+
## Verification (C)
86+
87+
```bash
88+
# merged tree already built as mtp/2766
89+
bun x tsc --noEmit # expect exit 0
90+
bun test tests/release-version-line.test.ts # expect 3 pass / 0 fail
91+
bun run privacy:scan # expect exit 0
92+
```
93+
94+
Post-merge, the decisive evidence is the *next* PR's matrix: re-run CI on #2767 or
95+
#2764 and confirm `ci`, `macos`, `test 3/4`, `gates` go green with no change to
96+
their own diffs. That is the proof the keystone actually was the keystone.
97+
98+
## Lane execution
99+
100+
Ready, mergeable, green, 0 behind, targets `dev`, needs no rebase — so no
101+
`codex/` branch is required.
102+
103+
Merge sequence, in order, none skippable:
104+
105+
1. Confirm the merged-tree receipts above.
106+
2. **Obtain a non-author maintainer approval at the exact head `076ad3036`.**
107+
`gh pr view 2766 --json reviewDecision` must read `APPROVED`, not
108+
`REVIEW_REQUIRED`.
109+
3. `gh pr merge 2766`.
110+
111+
If step 2 cannot be satisfied in this round, #2766 exits as **NEEDS_HUMAN
112+
(approval)** — and because it is the keystone, every PR gated behind it inherits
113+
that outcome. That is a real possible terminal state for this round, not a
114+
formality to route around.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# 011 — wp1 outcome: roadmap lock
2+
3+
Docs-only cycle. No production code changed. Deliverable is the plan unit itself:
4+
`000_plan.md` plus six decade docs, locked at `77635d8c9`.
5+
6+
## A-gate: two independent Sol-high reviewers, four rounds
7+
8+
| Round | Lane | Verdict | Result |
9+
|---|---|---|---|
10+
| r1 | facts | NEAR-PASS | 1 correction applied (`27b040931`) |
11+
| r1 | judgement | **FAIL** | 2 blockers, both accepted |
12+
| — | judgement re-verify | **FAIL** | 1 blocker incompletely closed |
13+
| — | judgement re-verify | PASS | both closed |
14+
| r2 | judgement confirm | PASS | rebound to the repaired files |
15+
16+
### What the facts reviewer independently re-derived
17+
18+
Re-ran `git merge-tree` for all 13 PRs from `dev@8b1b65b8d` and confirmed all 12
19+
clean tree hashes matched `mtp/<n>^{tree}` exactly before typechecking, plus the
20+
`#2497` conflict. Counted every changed path across all 13 PRs and confirmed the
21+
contention map is exhaustive: `src/codex/auth-context.ts` (#2638, #2497) and
22+
`src/server/responses/core.ts` (#2745, #2638, #2497), nothing else shared.
23+
24+
Its correction: the plan had collapsed two distinct shared defects into one per-PR
25+
line. `test 3/4` and `macos` fail on `release version line`; `gates` fails on
26+
`privacy:scan`; `ci` is the fan-in. #2747 has no `gates` failure at all because
27+
its head predates the runbook document.
28+
29+
### What the judgement reviewer caught — the two that mattered
30+
31+
**1. I violated this repository's own security rule.** The plan reproduced the
32+
unfixed #2745 credential-boundary defect — mechanism, activation sequence,
33+
remediation direction — inside `devlog/`, a public tracked directory, while the PR
34+
is open. `AGENTS.md` §"Security working notes" forbids exactly that, and says so in
35+
a section written because maintainer-authored triage had done it before.
36+
37+
My error in reasoning: I treated the detail as publishable because the reviewer had
38+
already written it in a public PR comment. But the rule keys on whether the **fix
39+
has shipped**, not on where the analysis first appeared. An open PR means
40+
pre-disclosure.
41+
42+
The first repair was incomplete — the `TESTS` section still named the regression
43+
design, which carries the activation shape without the prose. The reviewer caught
44+
that too. Both are now in `.tmp/2745-security-triage.md` (gitignored, confirmed via
45+
`git check-ignore`).
46+
47+
**2. Every merge lane skipped the approval `MAINTAINERS.md` requires.** The plan
48+
went from "CI green" straight to `gh pr merge`. `MAINTAINERS.md:57-59` requires
49+
approval from at least one maintainer who is not the author, and
50+
`.github/scripts/pr-sponsored-surface.cjs:52` lists `package.json` as a restricted
51+
surface. All four Ingwannu PRs read `REVIEW_REQUIRED`. A round-level instruction
52+
from the user is not an exact-head PR approval.
53+
54+
It also refuted the release-safety framing as incomplete rather than wrong: no
55+
scheduled, push-triggered, auto-merge, or version-keyed publish path exists
56+
(`release.yml` is `workflow_dispatch`-only and rejects any ref that is not `main`
57+
or `preview`), but `package.json` is still a restricted surface needing review.
58+
59+
### Approval path, resolved
60+
61+
The operator is authenticated as `lidge-jun` (`gh auth status`), listed in
62+
`MAINTAINERS.md:10` as project owner. `Ingwannu` is a separate maintainer. A
63+
`lidge-jun` approval of an Ingwannu-authored PR is therefore a valid non-author
64+
maintainer approval, confirmed by the reviewer against `MAINTAINERS.md:57-59`.
65+
The gate is satisfiable without self-approval.
66+
67+
## Keystone verification (full suite, remote)
68+
69+
`mtp/2766` pushed as `codex/mtp-2766-probe`, checked out on `lidge`
70+
(`~/ocx-ci/opencodex`), full `bun run test` under `ocx-run`:
71+
72+
```
73+
k2766: OK rc=0 finished 2026-08-28T00:25:04+09:00
74+
15334 pass / 0 fail
75+
```
76+
77+
Focused, on the same merged tree:
78+
79+
```
80+
tests/release-version-line.test.ts 3 pass / 0 fail
81+
bun run privacy:scan Privacy scan passed (exit 0)
82+
bun x tsc --noEmit exit 0
83+
```
84+
85+
On plain `dev` the same scan fails on the runbook literal, and the same test fails
86+
repository-wide. The keystone claim is proven on both sides.
87+
88+
## Gate honesty note
89+
90+
The typecheck gate was verified rather than trusted: 12 merged trees compiling in
91+
~12s looked like a no-op, so a deliberate `const x: number = "str"` was injected
92+
into a merged worktree — `error TS2322`, exit 1. The speed is real; this repository
93+
runs the native TypeScript 7.0.2 compiler at ~0.44s for a full typecheck.
94+
95+
## Carried into wp2
96+
97+
1. Merge #2766 first; it is the only PR that can produce a trustworthy green
98+
matrix for the others. Approval at exact head `076ad3036` before merge.
99+
2. Review, rebase, and verification of other PRs may proceed in parallel — only
100+
the merges serialize.
101+
3. Follow-up outside this round's scope: the same pre-disclosure material exists
102+
in `devlog/_plan/260826_wp7e_presence_driven_oauth_failover/` and
103+
`devlog/_plan/260827_dev_hardening/`. Pre-existing, belongs to other active
104+
work streams, needs separate authority. **Escalate; do not silently rewrite.**

0 commit comments

Comments
 (0)