Repository navigation
test(link): record the attested digest of the pinned Codex for the link WebSocket release gate - #8668
Merged
Merged
Conversation
…nk WebSocket release gate tests/fixtures/link-gate-codex.json now carries the sha256 of codex-rs built at openai/codex 88c58562580aa4abe2da6ce4d7676bf171682230 for x86_64-unknown-linux-gnu, and its note records who built it, when, with which toolchain, target and command. With this digest, a run of tests/e2e-style/link-websocket-release-gate.test.ts with that binary is labelled release evidence; any other binary stays a smoke check. The revision is unchanged. structure/remote-link.md no longer says the fixture records none, and states that the digest attests one Linux x86_64 build. Nothing opens the gate: linkWebsocketTransportReady() stays false.
Contributor
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
…ease gate (#8668 review P2-1) The gate hashed OCX_LINK_GATE_CODEX relative to the working directory and then spawned the value as given, which Bun looks up on PATH for a bare name. With OCX_LINK_GATE_CODEX=codex, the attested bytes saved as ./codex and another codex on PATH, every title said "release gate" while the PATH binary ran; the file could also be replaced between the hash at module load and the spawns. The value is now resolved once to an executable regular file (anything else is refused and the scenarios are skipped), copied read-only into a scratch directory, and that copy is both hashed and spawned by absolute path (tests/helpers/link-gate-binary.ts). tests/e2e-style/link-gate-codex-binary.test.ts covers a bare name with another codex on PATH, a replacement after hashing, and refused values, with two small scripts instead of Codex; all three cases failed against the earlier behaviour. structure/remote-link.md describes the copy and says the smoke rule once, for each Codex scenario's title (P3-1).
…testation note The note now says the attestation was made in #8668, and lists another build directory among the things that may change the digest (rustc embeds absolute paths). Review P3-2.
…py up on every path Review of the previous commit: - tests/e2e-style/link-gate-codex-binary.test.ts used #!/bin/sh scripts and a colon-separated PATH, which the Windows shards cannot run. The stand-ins for Codex are now copies of the running Bun executable named codex (codex.exe on Windows); each prints its own process.execPath, so a run shows which file executed. PATH is joined with path.delimiter, and the execute-permission case is POSIX-only. Against the earlier behaviour the bare-name case reports the PATH copy (bin/codex) where the hashed file (work/codex) was expected. - The copy keeps the file's name, so an extension a platform needs stays. - The gate registers the scratch cleanup before copying, and removes the scratch directory at once when the value is refused or preparing it throws.
scripts/test-layout/layout.json: both sides appended to the explicit map; the union keeps link-websocket-traffic.test.ts from #8647 and link-gate-codex-binary.test.ts from this branch. tests/fixtures/test-layout-expected.json auto-merged to the same set.
… pinned binary (#8668 review P3-3) structure/remote-link.md and the gate file comment said every case is skipped when OCX_LINK_GATE_CODEX is absent; the pin test always runs.
…t from the hashed file (#8668 review P3-4) Both stand-ins were copies of the same Bun executable, so the digest assertion could not tell work/codex from bin/codex. The PATH-side file now holds other bytes (mode 0755; the gate must never run it), and the test asserts the digest differs from its hash. Against c28e59a behaviour the bare name runs that PATH file (ENOEXEC), a replaced file is what runs (ENOEXEC), and a directory throws EISDIR while hashing; a 0644 file was already refused.
…8668 review P3-5) The copy now uses COPYFILE_EXCL | COPYFILE_FICLONE, so the 1.6 GB binary costs no space on APFS, btrfs or XFS, and an interrupted direct run leaves nothing large behind there. Checked on Bun 1.4.4: with FICLONE the exclusive flag still refuses an existing destination (EEXIST) and keeps it; on ext4 the copy falls back to an ordinary one. A new case makes the first copy writable and requires EEXIST for a second copy into the same scratch directory; without COPYFILE_EXCL it fails.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
lidge-jun
added a commit
that referenced
this pull request
Nov 13, 2026
lidge-jun
added a commit
that referenced
this pull request
Nov 13, 2026
…-gate-evidence The layout maps (layout.json, layout-clients.json, test-layout-expected.json) are the union of both sides, checked key by key. structure/remote-link.md keeps both sides: this branch's paragraph is dev's plus the U11, real-Child, restart and Autobahn sentences. The gate file keeps this branch's version, in which #8668's labels and binary copy live in tests/helpers/link-gate-codex.ts.
lidge-jun
added a commit
that referenced
this pull request
Nov 13, 2026
…assertion, the gate scenarios through the real Child, a Child restart measurement, and the Autobahn client conformance run (#8681) * test(link): record the attested digest of the pinned Codex for the link WebSocket release gate tests/fixtures/link-gate-codex.json now carries the sha256 of codex-rs built at openai/codex 88c58562580aa4abe2da6ce4d7676bf171682230 for x86_64-unknown-linux-gnu, and its note records who built it, when, with which toolchain, target and command. With this digest, a run of tests/e2e-style/link-websocket-release-gate.test.ts with that binary is labelled release evidence; any other binary stays a smoke check. The revision is unchanged. structure/remote-link.md no longer says the fixture records none, and states that the digest attests one Linux x86_64 build. Nothing opens the gate: linkWebsocketTransportReady() stays false. * test(link): assert the pinned Codex sends no Origin on its link WebSocket upgrade (U11) Design T4 U11 needed a release-gate test that Codex's WebSocket client sends no Origin header; until now the gate showed it only indirectly (the Home refuses an upgrade carrying one). The relay stand-in now records the Origin header of every upgrade Codex sends, before forwarding it, and the gate's drain scenario asserts that every upgrade of both sessions arrived without one. The release-gate labels, the codex exec runner and the fixture turns move unchanged into tests/helpers/link-gate-codex.ts, so the real-Child scenarios that follow label their runs with the same digest check. The gate's scenario bodies are unchanged; runCodex takes an optional stream_max_retries, default 3 as before. * test(link): hash and run the same copy of the pinned Codex in the release gate (#8668 review P2-1) The gate hashed OCX_LINK_GATE_CODEX relative to the working directory and then spawned the value as given, which Bun looks up on PATH for a bare name. With OCX_LINK_GATE_CODEX=codex, the attested bytes saved as ./codex and another codex on PATH, every title said "release gate" while the PATH binary ran; the file could also be replaced between the hash at module load and the spawns. The value is now resolved once to an executable regular file (anything else is refused and the scenarios are skipped), copied read-only into a scratch directory, and that copy is both hashed and spawned by absolute path (tests/helpers/link-gate-binary.ts). tests/e2e-style/link-gate-codex-binary.test.ts covers a bare name with another codex on PATH, a replacement after hashing, and refused values, with two small scripts instead of Codex; all three cases failed against the earlier behaviour. structure/remote-link.md describes the copy and says the smoke rule once, for each Codex scenario's title (P3-1). * test(link): name #8668 and the build directory in the pinned Codex attestation note The note now says the attestation was made in #8668, and lists another build directory among the things that may change the digest (rustc embeds absolute paths). Review P3-2. * test(link): make the pinned-Codex copy test portable and clean the copy up on every path Review of the previous commit: - tests/e2e-style/link-gate-codex-binary.test.ts used #!/bin/sh scripts and a colon-separated PATH, which the Windows shards cannot run. The stand-ins for Codex are now copies of the running Bun executable named codex (codex.exe on Windows); each prints its own process.execPath, so a run shows which file executed. PATH is joined with path.delimiter, and the execute-permission case is POSIX-only. Against the earlier behaviour the bare-name case reports the PATH copy (bin/codex) where the hashed file (work/codex) was expected. - The copy keeps the file's name, so an extension a platform needs stays. - The gate registers the scratch cleanup before copying, and removes the scratch directory at once when the value is refused or preparing it throws. * test(link): run the pinned-Codex release-gate scenarios through the real Child relay tests/e2e-style/link-websocket-child-gate.test.ts drives the pinned Codex through the real TypeScript Child listener and relay (lane T6) in front of a real Home, where the gate file uses a test-only stand-in. It is opt-in on OCX_LINK_GATE_CODEX and labelled exactly as the gate file. Scenarios: - the switch goes off under a running turn: both requests of the turn run on the Child's one socket, and the next session's upgrade is answered 426 by the Child (not_advertised) and completes over HTTP; - the drain past its deadline: the tool result's create is fenced and never reaches the upstream, and the same request completes over HTTP; - design 11.2-8 (a): with the Child's own 101 carrying the 8 MiB limit, a larger request goes over HTTP while the socket is open; - a Home restart mid-turn: the turn completes after Codex reconnects (logged: the cut request ends 502 on the socket and Codex completes on a new socket). It observes the Child's link WebSocket diagnostics and the Home's request-log rows. Which side closes a fenced socket first is a race between the Home and Codex exiting, so the close is asserted without its side. * test(link): prove through a TCP tap that the oversized request never went on the real Child's socket The real-Child 11.2-8 (a) scenario asserted only that a socket opened, that no upgrade fell back and that the Home saw one HTTP row; an oversized message the Child refused with 1009 before the Home, followed by an HTTP retry, would have passed it too. A TCP tap between Codex and the Child now records each connection's request head, the Child's answer head and the bytes Codex sent after its request head. The scenario asserts that the Child's 101 carries x-codex-websocket-max-message-bytes at the 8 MiB limit, that Codex wrote less than the limit on every upgraded connection, and that the whole body went on one POST connection of its own. Raising the Child's limit to 64 MiB makes Codex send 8,408,470 bytes on the socket and the scenario fail. * test(link): pin the 8 MiB the real Child must advertise to the design value, not the Child constant The 11.2-8 (a) scenario took its expected header value and its size threshold from LINK_CHILD_WS_LIMITS.localMessageBytes, the constant the Child itself uses, and matched the header as a substring. It now parses x-codex-websocket-max-message-bytes and requires exactly 8388608 (design T4 6.1), and uses that fixed value for the request size and the byte checks. * test(link): type the TCP tap chunks in the real-Child release-gate scenarios bun check reported the tap callbacks taking string | Buffer; they receive Buffers. No behaviour change. * test(link): measure a real Child restart under a running pinned-Codex turn, today and with T6's two proposed fixes tests/e2e-style/link-websocket-child-restart.test.ts restarts the real TypeScript Child between the two requests of a pinned-Codex turn, in the order the runtime follows since #8658: the tunnel gate's onStopping drains the relay (sockets close 1001, upgrades get 503), the old listener stays bound for the drain phase, stops (refused), and a replacement binds the same port with no advertisement remembered. Variants model lane T6's proposals before they exist: the listener closing when the drain starts, and the replacement treating "no advertisement since start" as "try" (the relay's advertised seam), and both. Each runs with stream_max_retries 3 and 5, for a 5.5 s and a 1 s restart. The cases assert only that the turn completes; the transport it ends on, the 503s, the replacement's 426s and Codex's retry notices are printed as one JSON line per case. The restart phases are wall-clock waits against an external process, by design. runGateCodex gains an optional stderr line callback. * docs(link): say that only the Codex scenarios are skipped without the pinned binary (#8668 review P3-3) structure/remote-link.md and the gate file comment said every case is skipped when OCX_LINK_GATE_CODEX is absent; the pin test always runs. * test(link): give the codex on PATH other bytes, so the digest tells it from the hashed file (#8668 review P3-4) Both stand-ins were copies of the same Bun executable, so the digest assertion could not tell work/codex from bin/codex. The PATH-side file now holds other bytes (mode 0755; the gate must never run it), and the test asserts the digest differs from its hash. Against c28e59a behaviour the bare name runs that PATH file (ENOEXEC), a replaced file is what runs (ENOEXEC), and a directory throws EISDIR while hashing; a 0644 file was already refused. * test(link): reflink the pinned-Codex copy where the file system can (#8668 review P3-5) The copy now uses COPYFILE_EXCL | COPYFILE_FICLONE, so the 1.6 GB binary costs no space on APFS, btrfs or XFS, and an interrupted direct run leaves nothing large behind there. Checked on Bun 1.4.4: with FICLONE the exclusive flag still refuses an existing destination (EEXIST) and keeps it; on ext4 the copy falls back to an ordinary one. A new case makes the first copy writable and requires EEXIST for a second copy into the same scratch directory; without COPYFILE_EXCL it fails. * docs(link): describe the Child restart measurement in the release-gate paragraph * test(link): mark the restart measurement turn when Codex actually exits The codex exit mark was written after the replacement Child was bound and the run awaited, so a turn that ended early (over HTTP through the draining Child) had its boundary at the bind. It is now marked when the process exits, and the first-session counts stop there. * test(link): mark the restart turn at the Codex process exit itself, not after its output is collected runGateCodex resolves once the process exited and its stdout and stderr were read; the restart measurement marked the exit there, which output draining could delay. runGateCodex gains an onExit callback fired from child.exited, and the measurement uses it to bound the first session. * test(link): the Autobahn fuzzingserver client conformance run for the Child link WebSocket leg (design 3.3) tests/clients/link-ws-autobahn.test.ts drives every fuzzingserver case through the Child's own 101 check and a real HomeLeg, with an echo stub in place of Codex that sends one message at a time as Codex does. It is opt-in on a running fuzzingserver (OCX_LINK_WS_AUTOBAHN_URL) and its report directory (OCX_LINK_WS_AUTOBAHN_REPORTS), and it judges each case against reviewed rules in tests/fixtures/link-ws-autobahn-expectations.json: deflate cases unimplemented (the Child offers no extension), a Home message over 4 MiB + 64 KiB or over 4,096 data frames closed 1009, other binary messages closed 1003, everything else OK, NON-STRICT or INFORMATIONAL. Against crossbario/autobahn-testsuite@sha256:519915fb...3074 all 517 cases land in their class. * test(link): make the Autobahn harness enforce every condition its verdict rests on Review of 559c34c: a refusal (1003, 1009) now also requires, from the case report, that the Child sent nothing but a close frame and that the close was clean with no handshake or drop timeout; the deflate cases require UNIMPLEMENTED with a clean OK close; each run uses its own agent name, so a report left in the directory by an earlier run cannot supply the verdict, and a control exchange that does not close 1000 fails the run; setting only one of the two variables fails and names the other; the run prints the expectations sha256, the agent and the server. * test(link): accept the fuzzingserver control close without a status code (1005) The fuzzingserver ends getCaseCount and updateReports with a close frame that carries no code, which Bun reports as 1005; a dropped connection (1006) or any other code still fails the run. * test(link): fail an Autobahn refusal case whose report has no valid frame statistics A missing or malformed rxFrameStats was read as no frames, which would pass the no-data check; it now fails the case, and a refusal must also show the Child's close frame. * test(link): commit the recorded Autobahn run and refuse a fuzzingserver off loopback (#8681 review P2-1) structure/remote-link.md described a pinned image and a loopback binding that nothing in the tree started or checked. tests/fixtures/link-ws-autobahn/ now holds the fuzzingserver spec (every case) and run.sh, the recorded run: it starts crossbario/autobahn-testsuite@sha256:519915fb...3074 with that spec, publishes it on 127.0.0.1:9001 only, waits for it, runs the test, removes the container and writes provenance (commit, clean tree, Bun, image, expectations and spec sha256, command, exit) and the report tarball with its sha256. The test refuses an OCX_LINK_WS_AUTOBAHN_URL whose host is not loopback, and the structure sentence cites the script. * test(link): pin the Autobahn case set (#8681 review P3-1) The expectations file records caseCount 517 and the run asserts the server reports exactly that many cases, and that every rule matches at least one case of the run, so a different suite or a stale rule fails instead of passing on a subset. * test(link): require a clean close in every Autobahn class and check the stated limits against the Child (#8681 review P3-2) The comment said the clean close is checked for every class, but the pass class did not use it; it now does. The expectations file states the Home message and fragment limits its 1009 rules are written for; the run now asserts they equal LINK_CHILD_WS_LIMITS. * test(link): keep the pinned-Codex copy for the whole process and remove it at exit (#8681 review P3-3) The copy lives once per module registry. Each file removed it from its afterAll, so a plain multi-file bun test (one shared registry) removed it under the next file, whose scenarios then failed with spawn ENOENT while titled release gate (reproduced: real-Child file then gate file, 7 failures). The helper now removes it once, when the process exits, and at once when the value is refused or preparing it throws; the per-file afterAll calls are gone. The same two files in one run now pass 12 of 12, and a plain process that loaded the helper leaves no copy behind. * test(link): title the real-Child drain scenarios with what they assert (#8681 review P3-4) The titles said the idle socket is fenced and the next create is fenced on the socket, but the assertions accept a close from either side, and Codex closed first in every recorded run. The titles now say what is asserted: the turn finishes on the socket (or its tool result never reaches the upstream over it), the socket closes from either side, and the request completes over HTTP. The fence itself is shown by the stand-in scenarios in the gate file. * test(link): require exactly one socket in the real-Child 11.2-8 (a) scenario (#8681 review P3-5) At least one upgraded connection allowed a loop in which Codex ignores the advertised limit, is cut under 8 MiB per attempt and ends on HTTP with every assertion passing. The scenario now requires exactly one upgraded connection through the tap and exactly one link_ws_open record. * test(link): end the waits on Codex exiting first, and say where the scenarios wait on time (#8681 review P3-6) The restart measurement waited for the tool result to reach the Home, and the real-Child Home restart for the first request, without racing Codex exiting: a binary that fails early cost the 180 s bound per case, with no stderr. untilOrExit (tests/helpers/link-gate-codex.ts) ends such a wait at once with Codex exit code and the tail of its stderr, and leaves nothing behind when Codex exits after the event. With a fake codex that exits 3 at start, both cases now fail within a second naming it. The helper header no longer says the scenarios never sleep: the restart phases are wall-clock waits by design. * docs(link): say what a Child restart drain does to the Codex session, as measured (#8681 review P3-7) structure/remote-link.md said the drain 503 lets Codex keep its WebSocket session for the replacement instead of falling back to HTTP. With the pinned Codex every 503, like a refused or dropped connect, spends one stream retry, and the four today cases of the restart measurement ended the interrupted turn on HTTP. Only that clause of the sentence changes. * test(link): end the stand-in Home restart wait on Codex exiting first Review of G-2-3: the gate file Home restart scenario still awaited the first request without racing Codex exiting. It now uses untilOrExit, as the helper header says every wait on an event does; with a fake codex that exits 3 at start it fails within a second naming its stderr. * test(link): end untilOrExit when the Codex run itself rejects before the event Review of G-2-3: a rejected run (its output could not be read) was swallowed, so the wait held until the test bound. It now rejects the wait when it comes before the event, and is still handled after it. Checked with three probe cases (rejecting run, early exit, late settle): all pass with no unhandled rejection. * test(link): describe the real-Child drain cases by what they observe, not by a fence they do not establish Review of G-2-3: comments in the real-Child file still said the create was fenced; the assertions accept a close from either side and establish only the upstream and transport outcomes. The comments now say so and point to the stand-in scenario for the fence. * test(link): connect to an IPv6 loopback fuzzingserver without the URL brackets Review of G-2-3: the loopback check accepts http://[::1]:9001, whose URL.hostname keeps the brackets, which node:net cannot connect to. The case runner now strips them. The recorded runs use 127.0.0.1 and are unaffected. * test(link): name try-when-unknown as the Child's rule since #8682 in the restart measurement; the old rule stays for comparison * docs(structure): the restart measurement names try-when-unknown as the Child's rule since #8682 * test(link): run try-when-unknown through the relay's default rule in the restart measurement; count the replacement's answers around its fetch * test(link): say what --isolate does to the pinned Codex copy * test(link): run.sh refuses a used run directory and stops when the fuzzingserver never answers * docs(structure): the Autobahn run.sh is the recording script * test(link): the real-Child switch case says the 426 is answered without forwarding the upgrade * docs(structure): the measured restart outcomes are from one Linux x86_64 machine, printed, not asserted * docs(devlog): gate-opening item 4: #8681 already runs the restart scenarios under #8682 rule, through test seams
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The link WebSocket release gate (design T4 11.1 item 13,
tests/e2e-style/link-websocket-release-gate.test.ts) runs the pinned Codex binary as its client. A run counts as release evidence only when that binary's sha256 equals the digest intests/fixtures/link-gate-codex.json. Until now the digest wasnull: no build of codex-rs at openai/codex88c58562580aa4abe2da6ce4d7676bf171682230had been attested, so every run was labelled a smoke check.This PR records the digest of one attested build of that revision and replaces the fixture's note with the build facts.
"revision"is unchanged.structure/remote-link.mdno longer says the fixture "records none until a build is attested"; it now says the digest attests one Linux x86_64 build and that a run with any binary whose digest differs is a smoke check by design (a second build with identical bytes would get the gate label). The gate stays closed:linkWebsocketTransportReady()(Home) andlinkWebsocketChildReady()(Child) are still hard-codedfalse, and nothing insrc/changes.What is hashed is what runs. The gate resolves
OCX_LINK_GATE_CODEXonce to an executable regular file (anything else is refused and the scenarios are skipped), copies it, exclusively and read-only (0555), into a fresh private scratch directory, and both hashes and spawns that copy by absolute path (tests/helpers/link-gate-binary.ts). The copy is a reflink where the file system supports one (APFS, btrfs, XFS) and an ordinary copy elsewhere. Before this, it hashed the value relative to the working directory and spawned the value as given, which Bun looks up on PATH for a bare name: withOCX_LINK_GATE_CODEX=codex, the attested bytes saved as./codexand anothercodexon PATH, every title said "release gate" while the PATH binary ran, and the file could be replaced between the hash and the spawns.tests/e2e-style/link-gate-codex-binary.test.tscovers four things: a bare name with anothercodexon PATH, a replacement after hashing, a second copy into the same scratch directory (refused with EEXIST) and refused values. The hashed stand-in is a copy of the running Bun executable namedcodex(codex.exeon Windows), which prints its own path, so the test runs on every platform. Thecodexon PATH holds other bytes (mode 0755) and never has to run, so the digest tells the two apart. The execute-permission case is POSIX-only. Againstc28e59ae6's behaviour, three cases fail: the bare name runs thecodexon PATH (its spawn fails with ENOEXEC); the replacement case runs the replaced file (ENOEXEC); and a directory passes the X_OK check and then fails hashing with EISDIR.c28e59ae6already refused a 0644 file. The scratch copy is removed after the file, and at once when the value is refused or preparing it throws.What the digest attests. The table is the builder's attestation (this lane): the digest, the failures, the OOM kills and the timings are backed by the build logs and the kernel log; the source commit, toolchain, OS, compiler and package versions were read on the build VM right after the build (
environment.txt) and are builder-reported for build time. The small receipts are in this description ("Receipts", below). The build VM keeps the binary, the logs and the kernel log. The coordinator holds a second copy of the binary and the receipts (listed under "Receipts"); the binary's sha256 matchedc80d5ba4a92ffef0ef1ad1e9345429740ada15fa158b1792900e36892573a23con arrival.c80d5ba4a92ffef0ef1ad1e9345429740ada15fa158b1792900e36892573a23cis the sha256 ofcodex-rs/target/release/codex, built by OpenCodex agent lane G on its build VM on 2026-11-13 (successful build 05:35:07Z–06:54:37Z UTC, from the system clock):88c58562580aa4abe2da6ce4d7676bf171682230, shallow fetch of that commit;git rev-parse HEADmatched right after the fetch and again after the build, whengit status --porcelainwas empty (the build writes only to the ignoredtarget/)codex-rs/)cargo build --release --locked -j 1 -p codex-cli --bin codexrust-toolchain.toml(channel = "1.95.0"), with no default toolchain setx86_64-unknown-linux-gnu(native)cc= clang 18.1.3libcap-dev1:2.66-5ubuntu2.4 (the vendored bubblewrap needs it),libssl-dev3.0.13-0ubuntu3.16 (openssl-sysneeds it)[profile.release], unchanged:lto = "thin",codegen-units = 4,debug = "line-tables-only",split-debuginfo = "off",strip = false. NoRUSTFLAGSorCARGO_PROFILE_*overrides-j 1. At the default width (4),codex-coreandcodex-app-serverwere killed with SIGKILL (build-attempt2.log); the kernel log shows the memory-cgroup OOM killer killing two rustc processes at 05:29:44 and 05:30:23 UTC (oom-kernel-log.txt; 16 GiB, no swap). Job count does not change the profile; in principle the output does not depend on it, but that was not checked by building at another width-j 1invocation (real 79m29.651s,user 77m54s), which reused the crates compiled by the two earlier attempts. Total build time across the three attempts was about 1 h 42 min (7.5 + 15.1 + 79.5 min)codex --versioncodex-cli 0.0.0(a source build carries no release version, so the version string does not identify the revision; the digest does)This is one attested build, not a reproducible one. It was not built twice and the digest was not compared across builders. A second builder trying to get the same bytes would have to match at least: the source commit and
Cargo.lock(--locked), the same git dependencies at the locked revisions, the toolchain (1.95.0 x86_64-unknown-linux-gnu with its bundled LLVM), the release profile and an emptyRUSTFLAGS, the C compiler and its version (clang 18.1.3 ascc) for thecc-built crates (bubblewrap, sqlite, zstd, tree-sitter and others), the systemlibcapand OpenSSL development headers, and the absolute build paths, which rustc embeds in panic locations and debug info (the Codex checkout, the Cargo home and the rustup home, all under the builder's home directory). Any difference may change the digest. Then the build is a different binary, and its gate runs are labelled smoke. The fixture keeps one digest; see "Proposal" below for more than one platform.Gate results
Smoke run first, with the digest still
null(on7316cb7d6): 8 pass, 0 fail, exit 0, 10 s. Every Codex scenario was titled[smoke only, not release evidence: Codex sha256 c80d5ba4… is not the reviewed digest for openai/codex 88c5856 (tests/fixtures/link-gate-codex.json records none yet)]. No scenario failed, so no stand-in, Child, Home or Codex discrepancy needed analysis. The design's assumptions C1 (426 switches to HTTP), C5 (retry budget then HTTP) and C7 (the max-message header keeps a larger request off the socket) all held for this binary.Gate runs with the digest recorded, three in sequence on this PR's head
248e7321d, with an absolute binary path (full output under "Receipts"). Earlier sets of three were also 8/8 each: on two local commits made before the rebase and the first review (never pushed), and onc28e59ae6,dab27510eand6fe94b208.Each Codex scenario's title ends in
[release gate: Codex sha256 c80d5ba4a92ffef0ef1ad1e9345429740ada15fa158b1792900e36892573a23c matches the reviewed digest for openai/codex 88c5856 in tests/fixtures/link-gate-codex.json]:None of the gate's runs needs credentials or network access to a model provider: Codex talks to a loopback stand-in or the real Child listener in front of an in-process Home whose upstream is a loopback fixture, with scratch
HOMEandCODEX_HOMEand an explicit environment.U11 was also checked outside the suite, with an untracked probe server: the pinned binary's single WebSocket upgrade carried no
Originheader. It does carrySec-WebSocket-Extensions, which both the stand-in and the real Child strip before the Home's shape check.Release-gate evidence inventory (design T4)
The design (T4, a private lane note, not in this repository) has no section 11.3 in its current revision. The review table's "11.3" references (R1-10 "11.3-11", R2-06 "11.3") point to the T6 gates that are now 11.2: the Autobahn client run and the size cases 11.2-8. They are listed under those numbers below.
startChild), but the tunnel gate is test-driven:waitForConnectedresolves at once, so the 3 s and 15 s hold durations are not exercised in real timetests/clients/link-ws-relay.test.ts:91with a scripted clienttests/clients/link-ws-relay.test.ts:178(8 MiB + 1, unfragmented, Bun client)tests/clients/link-ws-framer.test.ts:95covers server frames read by the Child, the other direction)tests/clients/link-ws-relay.test.ts:189(oversized Home message before any text: Codex 1011, Home 1009).:199/:211/:450deliver a completed message before a refused frame, but the refused frame there is an RSV-bit protocol error (Home 1002), not an oversized message. A scripted client's retry after a dropped Home (1011) is intests/clients/link-ws-fallback.test.ts:124tests/clients/link-ws-relay.test.ts:234,:343src/client/link-websocket-limits.ts:61keeps the Child gate closed until it passessrc/client/link-websocket-limits.ts:61)Origin, and the Home'slinkResponsesUpgradeShaperefuses it,src/server/index/link-websocket.ts:100, so every "upgrade" assertion would fail; the real Child would record anoriginfallback)u11-probe.txt). Proposal: one explicit assertion in the gate file (the stand-in records whether the upgrade carriedOrigin)tests/e2e-style/link-websocket-rss.test.ts(opt-in)What the Home RSS acceptance needs to count as evidence. It runs only with
OCX_LINK_WS_RSS_ACCEPTANCE=1and no otherOCX_LINK_WS_RSS_*variable set (any other turns it into a diagnostic that asserts nothing), at the full 24 sockets, on Linux 4.0 or later where the peak is the kernel'sVmHWM(a sampled peak cannot pass), on the pinned Bun (1.4.4, U3). The settle logic of open PR #8647 is required: each Home announces its stall only after a 2.5 s quiet window, and a load not settled within 180 s fails. Per #8647, only settled 24-socket runs count; the four earlier runs under #8625 are not evidence. In practice it needs #8647 merged, then three settled canonical runs on a quiet machine (nothing heavy beside it, a few GiB free) at a recorded commit, with each run's WebSocket and HTTP peaks, the difference against 768 MiB, and the settle times. #8647's own table (three settled passes on2e8b3f383) becomes evidence for that commit once it lands. It does not involve the pinned Codex.9.2 controlled validation: skipped by the owner on 2026-11-13, not measured. For the record, what exists and what is missing. Existing pieces: the gate file's
runCodexdrives the pinned binary with scratch homes against a scripted loopback upstream, which can already script tool calls (toolCall) so one turn makes several model requests;startChildplus an in-process Home give a real Child-to-Home link; the Home's request-log fields (transport, continuation with reason, threadRef/turnRef,tests/server/link-request-log-fields.test.ts) supply L1 and L1d and the M2/M3 classification; the Child's?transport=1counters supply L2; the gate already forces a Home restart and a fallback, andsetLinkWebsocketLimitsForTestscan force fences. Missing:previous_response_not_foundmiss with an upstream that keeps previous responses (the gate's fixture upstream is stateless), plus a run with Codex request compression on (U8).usageis whatever the fixture says, so a meaningful ratio needs either the canonical provider (credentials and network, outside this lane's local-only rule) or an agreed token estimate for the fixed prompts.Estimate: about 3–5 days of lane work for items 1–3 and 5 against local fixtures. Item 4 needs provider access or an agreed token estimate; without it a local harness can show the plumbing but cannot produce the 20% acceptance. The owner skipped 9.2 for now, so the gate-opening change states it as not measured.
Proposal: per-platform digests. One digest is honest for what was attested: a Linux x86_64 build. If release evidence is needed on macOS, Windows or aarch64, the fixture could become
{ "revision", "builds": [{ "target", "sha256", "note" }] }, and the test would accept a binary whose digest matches any reviewed build for its ownprocess.platform/process.arch. Not built here.Receipts
Scrubbed of user and host names. The full logs, the kernel log and the binary stay on the build VM. The coordinator holds a second copy:
c80d5ba4a92ffef0ef1ad1e9345429740ada15fa158b1792900e36892573a23con arrival;G-1-build:build-attempt1.log,build-attempt2.log,build.log,end-attempt1.txt,end-attempt2.txt,end.txt,environment.txt,oom-kernel-log.txt,sha256.txt,start-attempt1.txt,start-attempt2.txt,start.txt;G-1-runs:gate-1.txt,gate-2.txt,gate-3.txt(of an earlier head),pre-rebase/,smoke-1.txt,superseded-588db5f5e/,u11-probe.txt. The gate runs of this head, below, are sent to the coordinator with this change.environment.txt (read on the build VM right after the build; line 2 is the Codex checkout's HEAD, line 3 the line count of its git status --porcelain)
Last lines of the successful build log
sha256sum
gate-1.txt (on 248e732)
gate-2.txt (on 248e732)
gate-3.txt (on 248e732)
Verification
codex-rs/:cargo build --release --locked -p codex-cli --bin codexfailed on missing OpenSSL headers (exit 101, 7.5 min;libssl-devinstalled afterwards); the same command at the default width had two rustc processes OOM-killed (exit 101, 15.1 min; kernel log kept on the build VM);cargo build --release --locked -j 1 -p codex-cli --bin codexsucceeded (exit 0, 79.5 min).sha256sumoftarget/release/codexand of the read-only copy used for the runs (exit 0 each):c80d5ba4a92ffef0ef1ad1e9345429740ada15fa158b1792900e36892573a23c.codex --version(exit 0):codex-cli 0.0.0.bun test tests/e2e-style/link-gate-codex-binary.test.tswith the earlier behaviour extracted into the helper: exit 1, 1 pass, 3 fail. The bare name ran thecodexon PATH, whose spawn failed with ENOEXEC, wherework/codexwas hashed. The replaced file was what ran (ENOEXEC). A directory passed X_OK and then threw EISDIR while being hashed. The 0644 file was refused, asc28e59ae6did. With the fix: exit 0, 5 pass. The exclusive copy, checked with COPYFILE_EXCL removed: the new case fails (it expects EEXIST and receives none). Cleanup checked by hand: with a refused value (/nonexistent/codex) and after a full gate run, noocx-link-gate-bin-*directory is left.OCX_LINK_GATE_CODEX=<absolute path> bun test tests/e2e-style/link-websocket-release-gate.test.ts: smoke on7316cb7d6(digest null) exit 0, 8 pass; gate ×3 on248e7321dexit 0 each, 8 pass, 0 fail, 7 of 7 Codex titles release-labelled.bun test tests/e2e-style/link-websocket-release-gate.test.tswithout the binary, on248e7321d: exit 0, 1 pass (the pin test), 7 skip, 0 fail.bun test tests/e2e-style/link-gate-codex-binary.test.ts: exit 0, 5 pass.248e7321d, after mergingdevc5010b042(thelayout.jsonconflict resolved as the union of both appended entries;test-layout-expected.jsonauto-merged to the same set):bun test tests/test-layout.test.ts tests/test-layout-tooling.test.tsexit 0, 29 pass;bun run structure:checkexit 0;bun test tests/ci-workflows/structure-ssot.test.tsexit 0, 51 pass;bun run privacy:scanexit 0.bun check --no-script --noEmiton the changed test files reports no error in them (three errors intests/fixtures/link-child-relay-standin.ts,tests/helpers/link-ws-child.tsandtests/helpers/link-ws-client.tsexist unchanged ondev;bun run typecheckcoverssrc/only).tests/fixtures/, whichscripts/ci/select-test-lane.shroutes to the full Ubuntu lane, and the fixture is read as data, whichtest changedcannot follow. The five full shards must run and pass on this PR's head before merge (ci:fullif the lane selector does not pick them up).bun run test(full suite; repo-wide runs are excluded on this VM by the lane's rules),bun run typecheck(nosrc/change),bun run test:changed, hosted CI, the opt-in Home RSS acceptance (by instruction), a second independent build of the binary, the Autobahn run, the Child RSS acceptance, the 9.2 controlled validation and U15 (both skipped by the owner on 2026-11-13, not measured), and any gate run on a platform other than Linux x86_64.Checklist
structure/remote-link.md; no user-visible behaviour changes, so nodocs-site/change).