Skip to content

Commit d59cee3

Browse files
committed
FEATURE-ci-v3-runtime-green: bound installed receipts by digest and size the platform retention to the measured producers
The Windows acceptance job passed its entire installed matrix for the first time and then tripped the 64 MiB receipt bound: PE/COFF inspector stdout (objdump -p up to 11.9 MB per binary with -g debug sections, nm 20.9-26.5 MB per archive) rode the command records twice while the resolved import graphs and archive_symbols already retain the evidence. tls-no audit.json measured 287,825,888 bytes and tls-yes 711,751,936; the Windows inspector and the nm inspections now record only their digest and byte count, and the simulated transformation brings the real receipts to 45.1/57.0 MB with suites.json at 0.2-0.5 MB. The FreeBSD acceptance job passed every installed and native check and then crossed the 2026-10-15 platform retention budget: the recovered tree measures 8.249 GB across 6,220 files and the byte bound fired with only 2,793 files catalogued, so MAX_BYTES moves to 16 GiB with the measured producer documented, and the collapsed bound message now names the exceeded budget and its value.
1 parent 0232737 commit d59cee3

5 files changed

Lines changed: 53 additions & 6 deletions

File tree

‎ChangeLog‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
Version 3.0.0 - 2026-10-10
2+
Retain platform evidence bundles within a 16 GiB budget: the
3+
FreeBSD acceptance tree (two -O0 -g lanes with llvm19 debug
4+
info, 8.249 GB across 6,220 files) outgrew the 2026-10-15
5+
8 GiB bound after passing every installed and native check,
6+
and the single bound message named neither budget; the file
7+
count stays bounded, the byte budget now documents the
8+
measured producer, and each bound names itself and its value
9+
when exceeded.
10+
Retain installed-package inspector stdout by digest in the command
11+
records: PE/COFF objdump -p and nm output reach tens of
12+
megabytes per binary with -g debug sections, which inflated the
13+
Windows installed receipts (audit.json 288-712 MB, suites.json
14+
up to 341 MB) past the 64 MiB receipt bound at package
15+
validation, the first lane to reach it; the resolved import
16+
graphs and the verbatim archive member symbols keep the
17+
evidence, so the duplicated raw stdout keeps only its digest
18+
and byte count.
219
Bind native listeners with SO_EXCLUSIVEADDRUSE on Winsock instead
320
of SO_REUSEADDR, which on Windows forcibly shares a live
421
listener's port: the installed-consumer rollback scenarios

‎scripts/audit-v3-installed-package.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ def platform_inspector(path):
185185
if platform.system() == 'Windows':
186186
if runtime(path) and windows_system(Path(path).name):
187187
return []
188-
return [(name, resolve_pe(name)) for name in parse_pe(run(['objdump', '-p', path]))]
188+
# PE/COFF inspector stdout reaches tens of megabytes per binary with
189+
# -g debug sections; the resolved import table below retains the
190+
# evidence gates need, so the command record keeps only its digest.
191+
return [(name, resolve_pe(name)) for name in parse_pe(run(['objdump', '-p', path], retain_output=False))]
189192
if platform.system() == 'Darwin':
190193
names = parse_otool(run(['otool', '-L', path]), path)
191194
resolved = []
@@ -402,7 +405,10 @@ def audit(prefix, build, consumer, tls, mode, provider_prefix, compiler='c++'):
402405
violations += graph_violations(native, mode, tls, 'native', policy, provider_prefix)
403406
symbols = {}
404407
for artifact, surface in [(p, 'aggregate') for p in archives] + [(native_archive, 'native')]:
405-
output = run(['nm', str(artifact)])
408+
# The verbatim member symbols are retained in archive_symbols below;
409+
# the command record keeps only its digest so the receipt respects
410+
# the read_json size bound (COFF symbol tables are tens of MB).
411+
output = run(['nm', str(artifact)], retain_output=False)
406412
if not output.strip():
407413
raise AuditError('empty archive inspection: ' + str(artifact))
408414
symbols[str(artifact)] = output

‎scripts/lib/release_platform.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111

1212
PLATFORMS = ('FreeBSD', 'Darwin', 'Windows')
1313
MAX_FILES = 20000
14-
MAX_BYTES = 8 * 1024 * 1024 * 1024
14+
# The retained tree is the whole platform evidence directory plus the
15+
# selected tools and receipt-referenced files. Measured 2026-12-03
16+
# (run 47064150035): the FreeBSD tree alone is 8.249 GB (6,220 files, two
17+
# -O0 -g lanes with llvm19 debug info; 122-150 MB installed archives), and
18+
# the byte bound fired with only 2,793 files catalogued, while darwin
19+
# retained comfortably. Keep room above the largest observed producer.
20+
MAX_BYTES = 16 * 1024 * 1024 * 1024
1521

1622

1723
def read_document(path):
@@ -53,7 +59,8 @@ def retain(destination, platform, receipt, paths):
5359
for path in sorted(paths):
5460
logical = str(path)
5561
value = record(path); total += value['bytes']
56-
require(len(catalog) < MAX_FILES and total <= MAX_BYTES, 'platform evidence exceeds bounds')
62+
require(len(catalog) < MAX_FILES, 'platform evidence exceeds the file-count bound: ' + str(MAX_FILES))
63+
require(total <= MAX_BYTES, 'platform evidence exceeds the byte bound: ' + str(total))
5764
name = 'bytes/' + value['sha256']
5865
target = destination / name
5966
if not target.exists(): shutil.copyfile(path, target)

‎scripts/test-v3-installed-package.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,15 @@ def enumerate_alias(prefix):
369369
self.assertEqual([record['argv'] for record in inspected],
370370
[['nm', str(selected[0])], ['nm', str(native)]])
371371
self.assertFalse(selected[0].samefile(native))
372-
self.assertEqual(inspected[1]['stdout'], 'used.o:\n U _fixture_runtime\n')
373-
self.assertEqual(inspected[0]['stdout'], 'unused.o:\n U _MHD_start_daemon\n')
372+
# The command record keeps only its digest; archive_symbols retains
373+
# the verbatim member symbols for each inspected archive.
374+
for record, expected in ((inspected[1], 'used.o:\n U _fixture_runtime\n'),
375+
(inspected[0], 'unused.o:\n U _MHD_start_daemon\n')):
376+
self.assertNotIn('stdout', record)
377+
self.assertEqual(record['stdout_sha256'], hashlib.sha256(expected.encode()).hexdigest())
378+
self.assertEqual(record['stdout_bytes'], len(expected.encode()))
379+
self.assertEqual(receipt['archive_symbols'][str(selected[0])], 'unused.o:\n U _MHD_start_daemon\n')
380+
self.assertEqual(receipt['archive_symbols'][str(native)], 'used.o:\n U _fixture_runtime\n')
374381
self.assertEqual(receipt['violations'], ['legacy archive symbol: MHD_start_daemon'])
375382

376383
def test_no_policy_mode_accepts_legacy_closure(self):

‎specs/tasks/FEATURE-ci-v3-runtime-green.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,13 @@ Full local `make check -j1` (TLS=no, g++ 15.2, WSL2): 232/235 pass, 2 platform s
226226
- [x] FreeBSD repair: the test payload grows to 2 MiB (bytes owed after the parked chunk ≈ 2 MiB, past any plausible `st_blksize`) and the bounded wake-and-pull drive grows to 256 rounds so buffered pulls drain before the shrink must surface; the test comment and PORTABILITY.md document the readahead bound for future mid-send-mutation tests. A permanent stall still fails the same assertions with the same evidence.
227227
- [x] Local gates (macOS arm64 scratch worktree at 9c9b47ae + these edits): `response_definition` 32/311 checks green ×3 (the enlarged fixture included), `response_sources` 30/304 green ×3, `io_poll_sys_listener` green including the new live-listener refusal; cpplint clean on the changed C++ files; `git diff --check` clean; the same workflow/platform script-test environmental baseline as stages 15/16.
228228
- [ ] Full exact-source CI on the working branch (mingw64 and Windows acceptance past the installed http2 rollback, FreeBSD make check past the readahead bound, darwin/macos lanes green).
229+
230+
## Stage 18: installed-receipt digest records and the platform retention budget (2026-12-03)
231+
232+
- [x] Evidence (run 47064150035 acceptance + run 47064149933 package, both at 02327378): the package flow recorded its first fully green mingw64 lane (the stage-17 repair held through the whole tls-yes installed matrix); freebsd and linux package lanes green; the macos package job was cancelled with zero executed steps (runner acquisition, infrastructure). On acceptance, darwin went fully green (bundle retained, tar uploaded); the Windows job passed the entire installed matrix for the first time and then failed `validate_package` with `missing/oversized receipt: .../matrix/tls-no/audit.json`; the FreeBSD job passed the entire installed matrix, package validation and BOTH native `make check` lanes (every stage 15–17 fixture repair held on the VM) and then failed `retain` with `platform evidence exceeds bounds`.
233+
- [x] Windows root cause (receipts measured from artifacts 15703172883 and the mingw64 package evidence): `read_json` bounds every receipt at 64 MiB (`MAX_JSON`), and on Windows the receipts embed raw PE/COFF inspector stdout — per-suite `inspection_commands` retain a full `objdump -p` per suite executable (~7.4 MB each with `-g` debug sections) and the lane `commands` retain `objdump -p` (up to 11.9 MB per binary) plus `nm` stdout (~26.5 MB per archive) that `archive_symbols` already retains verbatim. tls-no audit.json measured 287,825,888 bytes (287.8 MB present on disk — oversized, not missing), tls-yes 711.8 MB, suites.json 63–341 MB: every document `validate_package` reads was over or at the cap. Package-validation jobs never apply the cap (they run the consumer script directly); acceptance is its first Windows exposure past the installed matrix.
234+
- [x] Windows repair (scripts/audit-v3-installed-package.py): the Windows PE inspector (`objdump -p`) and the `nm` archive inspections use the module's existing `retain_output=False` digest mechanism — command records keep argv, resolved tool, returncode, stderr, `stdout_sha256`/`stdout_bytes`; the resolved import graphs every gate checks and the verbatim `archive_symbols` member symbols keep the evidence, so only the raw-stdout duplication disappears (POSIX inspectors unchanged). `test-v3-installed-package.py` nm-record assertions moved to the digest form plus new verbatim-retention assertions on `archive_symbols`. Size proof against the actual oversized acceptance receipts (exact transformation simulated on the real data): tls-no audit.json 287.8 → 45.1 MB, tls-yes 711.6 → 57.0 MB, all four suites.json → 0.2–0.5 MB — everything `validate_package` reads now fits with ≥10% headroom.
235+
- [x] FreeBSD root cause (failure evidence artifact 15707993624, 15,839,113,165 bytes, extracted to external storage and measured): the in-VM job passed the entire installed matrix, `validate_package` and BOTH native `make check` lanes, then `retain` (release_platform.py) fired its single collapsed bound message. The recovered tree measures 8.249 GB / 7.683 GiB across 6,220 files (two `-O0 -g` lanes with llvm19 debug info: 20–46 MB static test binaries, 122–150 MB installed archives, 35.6/44.0 MB audit receipts) plus the selected tools and receipt-referenced files — the walk crossed MAX_BYTES=8 GiB with only 2,793 files catalogued (measured from the partial `bundle/bytes` copy), so the byte bound is the proven trigger and the 20,000-file bound has 3× headroom. No core files, fifos or other junk in the tree. The 8 GiB budget shipped with the original acceptance design (29a849ed, 2026-10-15) and predates this tree shape.
236+
- [x] FreeBSD repair (scripts/lib/release_platform.py): MAX_BYTES 8 → 16 GiB with the measured producer documented beside it; MAX_FILES unchanged at 20000; the retain `require` is split so a future trip names its bound and value (`platform evidence exceeds the file-count bound: N` / `platform evidence exceeds the byte bound: T`) instead of one message covering both. Consumer-side Catalog checks already had distinct messages.
237+
- [x] Local gates (macOS arm64): `test-v3-installed-package.py` 60/60; `test-v3-installed-consumer.py` matches its HEAD environmental baseline exactly (verified by stash-rerun at 02327378: ps-snapshot timeouts, Python 3.9 missing `add_note`, stale generated configure); `test-v3-cutover.py` 9/9; `test-v3-package-workflow.py` 4/4; `py_compile` on all three changed scripts and `git diff --check` clean; the usual `test-v3-ci-workflows.py` 30/31 and `test-v3-platform-ci.py` 11/20 environmental baseline. ChangeLog entries added.
238+
- [ ] Full exact-source CI on the working branch (Windows acceptance past receipt validation, FreeBSD acceptance past retention into the bundle upload, darwin/macos lanes green).

0 commit comments

Comments
 (0)