Skip to content

Commit 7709505

Browse files
authored
docs(raw): publish 0.1.0 benchmark provenance (#12)
Publish the release-bound benchmark report and sanitized raw data, clarify the agent-layer/account-control model, include benchmark documentation in future archives, and fix draft verification by numeric release ID.
1 parent 99cc140 commit 7709505

7 files changed

Lines changed: 534 additions & 16 deletions

.github/workflows/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ the ruleset also closes the unavoidable API check-to-publish race window.
3131

3232
The workflow then follows GitHub's immutable-release guidance: it creates a
3333
draft, packages the platform binary with the version-matched public Markdown
34-
guides and policies, uploads exactly the four archives plus `SHA256SUMS`,
35-
verifies every draft asset's name, state, size, and SHA-256 digest, and only
36-
then publishes the draft. It also checks GitHub's real `immutable` field after
34+
guides, benchmark report, and policies, uploads exactly the four archives plus
35+
`SHA256SUMS`, verifies every draft asset's name, state, size, and SHA-256
36+
digest, and only then publishes the draft. Draft verification uses the
37+
release's numeric ID because GitHub's REST tag endpoint does not expose draft
38+
releases. The workflow also checks GitHub's real `immutable` field after
3739
publication.
3840

3941
If the gate was set incorrectly and GitHub reports a mutable release, the

.github/workflows/codex-raw-release.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ jobs:
259259
cp "codex-rs/target/${RELEASE_TARGET}/release/codex-raw" "dist/$bundle/"
260260
cp \
261261
API.md \
262+
BENCHMARKS.md \
262263
CHANGELOG.md \
263264
CODE_OF_CONDUCT.md \
264265
CONTRIBUTING.md \
@@ -288,6 +289,7 @@ jobs:
288289
Copy-Item "codex-rs\target\$env:RELEASE_TARGET\release\codex-raw.exe" "dist\$bundle\"
289290
$rootDocs = @(
290291
"API.md"
292+
"BENCHMARKS.md"
291293
"CHANGELOG.md"
292294
"CODE_OF_CONDUCT.md"
293295
"CONTRIBUTING.md"
@@ -650,6 +652,30 @@ jobs:
650652
fi
651653
readonly expected_prerelease
652654
655+
release_view_json="$(
656+
gh release view "$GITHUB_REF_NAME" \
657+
--repo "$GITHUB_REPOSITORY" \
658+
--json databaseId,isDraft,isPrerelease,name,tagName
659+
)"
660+
readonly release_view_json
661+
jq -e \
662+
--arg tag "$GITHUB_REF_NAME" \
663+
--arg name "codex-raw ${RELEASE_VERSION}" \
664+
--argjson prerelease "$expected_prerelease" \
665+
'
666+
.tagName == $tag and
667+
.name == $name and
668+
.isDraft == true and
669+
.isPrerelease == $prerelease and
670+
(.databaseId | type == "number") and
671+
.databaseId > 0
672+
' <<< "$release_view_json" > /dev/null || {
673+
echo '::error::Could not resolve the exact draft release identity'
674+
exit 1
675+
}
676+
release_id="$(jq -er '.databaseId' <<< "$release_view_json")"
677+
readonly release_id
678+
653679
declare -A expected_sizes
654680
declare -A expected_digests
655681
for asset in "${assets[@]}"; do
@@ -678,7 +704,9 @@ jobs:
678704
--arg tag "$GITHUB_REF_NAME" \
679705
--arg name "codex-raw ${RELEASE_VERSION}" \
680706
--argjson prerelease "$expected_prerelease" \
707+
--argjson release_id "$release_id" \
681708
'
709+
.id == $release_id and
682710
.tag_name == $tag and
683711
.name == $name and
684712
.draft == true and
@@ -726,7 +754,7 @@ jobs:
726754
--method GET \
727755
--header 'Accept: application/vnd.github+json' \
728756
--header 'X-GitHub-Api-Version: 2026-03-10' \
729-
"repos/${GITHUB_REPOSITORY}/releases/tags/${GITHUB_REF_NAME}"
757+
"repos/${GITHUB_REPOSITORY}/releases/${release_id}"
730758
)" || true
731759
732760
if [[ -n "$release_json" ]] &&
@@ -758,14 +786,16 @@ jobs:
758786
--method GET \
759787
--header 'Accept: application/vnd.github+json' \
760788
--header 'X-GitHub-Api-Version: 2026-03-10' \
761-
"repos/${GITHUB_REPOSITORY}/releases/tags/${GITHUB_REF_NAME}"
789+
"repos/${GITHUB_REPOSITORY}/releases/${release_id}"
762790
)"
763791
readonly published_json
764792
765793
if jq -e \
766794
--arg tag "$GITHUB_REF_NAME" \
767795
--argjson asset_count "${#assets[@]}" \
796+
--argjson release_id "$release_id" \
768797
'
798+
.id == $release_id and
769799
.tag_name == $tag and
770800
.draft == false and
771801
.immutable == true and
@@ -778,7 +808,9 @@ jobs:
778808
779809
if jq -e \
780810
--arg tag "$GITHUB_REF_NAME" \
811+
--argjson release_id "$release_id" \
781812
'
813+
.id == $release_id and
782814
.tag_name == $tag and
783815
.draft == false and
784816
.immutable == false

BENCHMARKS.md

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# Reproducible benchmarks
2+
3+
This page publishes Codex Raw measurements together with the exact release,
4+
binary, workload, environment, calculation method, and raw samples that
5+
produced them.
6+
7+
> [!CAUTION]
8+
> These results are recorded observations, not performance guarantees. Model
9+
> routing, account state, network conditions, cache state, generated output,
10+
> and upstream behavior can materially change latency and token usage.
11+
12+
## Published result
13+
14+
The first release-bound benchmark was recorded from the immutable Windows x64
15+
asset for `codex-raw 0.1.0`. One uninterrupted invocation completed exactly
16+
two warm-up turns and twenty measured turns. It performed no retries and had
17+
no failed or timed-out request.
18+
19+
| Record ID | Release | Mode | Model | Measured runs | Median TTFT | p95 TTFT | Median total | p95 total |
20+
| --------------------------------------- | ------------------ | ------------ | -------------- | ------------: | ----------: | ----------: | -----------: | ----------: |
21+
| `raw-0.1.0-app-windows-x64-20260728-01` | `codex-raw-v0.1.0` | `app-server` | `gpt-5.4-mini` | 10 | 701.73 ms | 969.14 ms | 904.12 ms | 1,125.31 ms |
22+
| `raw-0.1.0-api-windows-x64-20260728-01` | `codex-raw-v0.1.0` | `api-server` | `gpt-5.4-mini` | 10 | 658.40 ms | 2,024.18 ms | 874.14 ms | 2,251.11 ms |
23+
24+
### Artifact identity
25+
26+
| Field | Exact observed value |
27+
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
28+
| Release | [`codex-raw-v0.1.0`](https://github.com/bproject07/Codex-Source/releases/tag/codex-raw-v0.1.0), release ID `361408465`, published and immutable |
29+
| Tag object | `3942faacc179e129c88960b259b1f2421b2da890` |
30+
| Tag commit | `99cc140866c4f66da6d8f283a013e6b43e4458e9` |
31+
| Asset | `codex-raw-0.1.0-x86_64-pc-windows-msvc.zip`, 12,228,846 bytes |
32+
| Asset SHA-256 | `c5551071b41245c33d6406a2a2f20c95fc8ff91bcd7468ab41b701a30c661d08` |
33+
| Extracted binary SHA-256 | `7a5d8b8a1b7144a2a6efd619b53a477a251acc19c14a6e06f85e8e23baa15208` |
34+
| Version output | `codex-raw 0.1.0` |
35+
| Target | `x86_64-pc-windows-msvc` |
36+
| Benchmark harness | `codex-rs/raw-cli/scripts/benchmark_persistent.ps1` from the tagged commit |
37+
| Harness Git blob | `2c92994556a50dd2c83be9c844ad41d141a6fbc8` |
38+
| Harness SHA-256 | `a3b17cd9c9c3445bfbe07c530cb8884f3f9a24f755c772dcc4822368525edc16` |
39+
40+
The archive digest independently matched both GitHub's asset digest and the
41+
release's `SHA256SUMS` record before extraction.
42+
43+
### Environment
44+
45+
| Field | Exact observed value |
46+
| -------------------- | ------------------------------------------------------------------------------------ |
47+
| Machine | VirtualBox virtual machine (`innotek GmbH`) |
48+
| CPU exposed to guest | 12th Gen Intel Core i7-12700, 4 physical/logical guest cores |
49+
| Memory | 12,776,771,584 bytes (about 11.90 GiB) |
50+
| Operating system | Microsoft Windows 11 Pro, version/build `10.0.26200` |
51+
| Architecture | x64 OS and x64 process |
52+
| PowerShell | `7.6.3` |
53+
| Local time zone | `FLE Standard Time` |
54+
| Network | Local workstation connection; route and upstream model placement were not controlled |
55+
| Start UTC | `2026-07-28T22:30:30.6465170Z` |
56+
| End UTC | `2026-07-28T22:30:56.3387855Z` |
57+
58+
No hostname, account identifier, credential, token, private address, or
59+
response text is present in the published data.
60+
61+
### Workload and method
62+
63+
| Field | Exact value |
64+
| ------------------------------- | ------------------------------------------------------------------------ |
65+
| Interfaces | persistent JSONL `app-server` and local HTTP `api-server` |
66+
| Model | `gpt-5.4-mini` |
67+
| Prompt | `hello` |
68+
| Prompt UTF-8 SHA-256 | `2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824` |
69+
| Reasoning effort / service tier | omitted; executable defaults applied |
70+
| Concurrency | one request at a time; API server `--max-concurrency 1` |
71+
| Warm-up | one successful turn per mode, fixed order: app then API |
72+
| Measured | 10 turns per mode, 20 total |
73+
| Measured order | sequential pairs; the first mode alternated for each pair |
74+
| Timeout | 120 seconds per operation |
75+
| Retries | none |
76+
| TTFT | client monotonic stopwatch start to first non-empty assistant text delta |
77+
| Total latency | same start to terminal turn/completion event |
78+
| Median | arithmetic mean of the two middle sorted values |
79+
| p90 / p95 | nearest rank, index `ceil(p × n) - 1` in the zero-based sorted values |
80+
81+
The tagged harness normally prints only aggregate statistics. A PowerShell
82+
line breakpoint immediately after its measured loop copied the already
83+
completed sample objects to JSON. It therefore did not run inside a measured
84+
request or change its stopwatch boundaries. The tagged harness itself was not
85+
modified.
86+
87+
### Detailed results
88+
89+
| Mode | Metric | Median | p90 | p95 | Minimum | Maximum | Mean |
90+
| ------------ | ------ | --------: | ----------: | ----------: | --------: | ----------: | ----------: |
91+
| `app-server` | TTFT | 701.73 ms | 857.32 ms | 969.14 ms | 591.13 ms | 969.14 ms | 738.38 ms |
92+
| `app-server` | Total | 904.12 ms | 1,047.71 ms | 1,125.31 ms | 756.16 ms | 1,125.31 ms | 920.72 ms |
93+
| `api-server` | TTFT | 658.40 ms | 947.07 ms | 2,024.18 ms | 595.88 ms | 2,024.18 ms | 813.98 ms |
94+
| `api-server` | Total | 874.14 ms | 1,165.71 ms | 2,251.11 ms | 728.89 ms | 2,251.11 ms | 1,009.37 ms |
95+
96+
| Invariant or outcome | Observed value |
97+
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
98+
| Successful warm-up turns | 2 of 2 |
99+
| Successful measured turns | 20 of 20 |
100+
| Failed / timed-out turns | 0 / 0 |
101+
| Input tokens | exactly 7 in every measured turn |
102+
| Output fingerprints | 19 responses had the same 32-character fingerprint; one app response had a distinct 29-character fingerprint |
103+
| Output text | deliberately not retained |
104+
| Cached-input, output, and reasoning tokens | not retained by the `0.1.0` harness; no values are inferred |
105+
106+
With only ten samples per mode, nearest-rank p95 is the maximum observed
107+
sample. One API request took 2,024.18 ms to first text and 2,251.11 ms total,
108+
which explains that mode's p95 and mean. The API median was 43.34 ms lower for
109+
TTFT and 29.99 ms lower for total latency, but this single small run does not
110+
establish a general speed advantage. One response also differed in length and
111+
fingerprint, so the result is not presented as an exact output-equivalence
112+
claim.
113+
114+
### Published raw data
115+
116+
| File | SHA-256 |
117+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
118+
| [`benchmarks/data/codex-raw-v0.1.0-windows-x64-20260728T223030Z.samples.json`](benchmarks/data/codex-raw-v0.1.0-windows-x64-20260728T223030Z.samples.json) | `d084f60c3d7dac252a8490f4783f7d03e62809cb600eed997b184cb8a8cfbcbe` |
119+
| [`benchmarks/data/codex-raw-v0.1.0-windows-x64-20260728T223030Z.provenance.json`](benchmarks/data/codex-raw-v0.1.0-windows-x64-20260728T223030Z.provenance.json) | `c23d438caac0d8af9cc60c3a46751c278252e0bbea2a1b1ab52ba69a196b68d9` |
120+
121+
The samples file contains one row for each measured turn, including global
122+
order, mode, TTFT, total latency, input tokens, output length, and a SHA-256
123+
fingerprint of the output. The two warm-up turns completed successfully but
124+
their timings were discarded by the tagged `0.1.0` harness before capture;
125+
this limitation is recorded in both JSON files.
126+
127+
### Reproduce the aggregate run
128+
129+
Download and verify the exact release asset first, then use the harness from
130+
the exact tagged source:
131+
132+
```powershell
133+
$archive = 'codex-raw-0.1.0-x86_64-pc-windows-msvc.zip'
134+
$expected = 'c5551071b41245c33d6406a2a2f20c95fc8ff91bcd7468ab41b701a30c661d08'
135+
136+
Invoke-WebRequest `
137+
"https://github.com/bproject07/Codex-Source/releases/download/codex-raw-v0.1.0/$archive" `
138+
-OutFile $archive
139+
if ((Get-FileHash $archive -Algorithm SHA256).Hash.ToLowerInvariant() -ne $expected) {
140+
throw 'release asset digest mismatch'
141+
}
142+
143+
Expand-Archive $archive -DestinationPath .\codex-raw-0.1.0
144+
$exe = Resolve-Path `
145+
'.\codex-raw-0.1.0\codex-raw-0.1.0-x86_64-pc-windows-msvc\codex-raw.exe'
146+
& $exe --version
147+
148+
pwsh -File .\codex-rs\raw-cli\scripts\benchmark_persistent.ps1 `
149+
-Exe $exe `
150+
-Model gpt-5.4-mini `
151+
-Prompt hello `
152+
-Runs 10 `
153+
-TimeoutSeconds 120
154+
```
155+
156+
This command uses the caller's existing Codex Raw browser-login state and
157+
performs 22 live model turns. Do not automate a retry after a partial failure,
158+
because some turns may already have completed.
159+
160+
## Publication rules for future results
161+
162+
- Use an asset downloaded from a named, published, immutable release, never an
163+
unnamed local build.
164+
- Record the tag, full commit, asset name, archive and binary SHA-256, exact
165+
version output, harness identity, environment, model, prompt, ordering,
166+
warm-ups, measured runs, timeouts, and calculation methods.
167+
- Preserve failed and timed-out attempts. Never discard an outlier without
168+
retaining and explaining it.
169+
- Publish sanitized per-sample data. Never publish credentials, tokens,
170+
account identifiers, private prompts, private infrastructure addresses,
171+
absolute local paths, or response text that was not explicitly public.
172+
- State unavailable fields as unavailable; do not reconstruct or infer token
173+
values that the measured client did not retain.
174+
- Comparisons must identify every client artifact and use the same machine,
175+
account, model, prompt, and time window. Report output and token differences
176+
beside latency.
177+
- Treat every result as a dated observation, not a promise about future
178+
latency or upstream service behavior.

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ and uses semantic versioning for the `codex-raw` executable.
99

1010
## [Unreleased]
1111

12+
### Added
13+
14+
- A release-bound benchmark report with sanitized per-sample data and exact
15+
release, commit, archive, binary, harness, environment, and methodology
16+
provenance.
17+
18+
### Changed
19+
20+
- The README now explains the removed Codex agent layer and the retained
21+
ChatGPT/Codex account controls near the top of the page.
22+
- Future release archives include `BENCHMARKS.md`.
23+
- Draft release verification now resolves the draft's numeric GitHub release
24+
ID before using the REST API, whose tag endpoint does not expose drafts.
25+
1226
## [0.1.0] - 2026-07-29
1327

1428
### Added

0 commit comments

Comments
 (0)