From 375943fc3f9f66b2c6aabf2aec8f0926ec1e6f2c Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 1 Nov 2026 06:43:21 +0000 Subject: [PATCH] fix(ci): admit current Bun AOT artifact lanes --- .github/openclaw/artifacts.py | 8 ++++-- .github/openclaw/release-notes.md | 4 ++- .github/openclaw/test_artifacts.py | 28 ++++++++++++++++++ .github/openclaw/test_release.py | 16 +++++++---- .github/openclaw/variants.json | 46 +++++++++++++++++++++++++++++- 5 files changed, 92 insertions(+), 10 deletions(-) diff --git a/.github/openclaw/artifacts.py b/.github/openclaw/artifacts.py index 01cb85c776bdb..677d9c4a27cfe 100644 --- a/.github/openclaw/artifacts.py +++ b/.github/openclaw/artifacts.py @@ -154,11 +154,13 @@ def build(label, destination): 'provenance_files':{p.name:digest(p) for p in provenance.iterdir() if p.is_file()}} write(destination/(label+'.manifest.json'), manifest) (destination/'SHA256SUMS').write_text(''.join(files[name]['sha256']+' '+name+'\n' for name in names)) - if label == 'bun-webkit-linux-amd64': + if label in ('bun-webkit-linux-amd64', 'bun-webkit-linux-amd64-aot', 'bun-webkit-linux-amd64-debug-asan-aot'): run(str(artifact/'bin/jsc'), '-e', 'print("OpenClaw WebKit ready")') run(str(artifact/'bin/testFFI')) - run(str(artifact/'bin/testMimallocExit')) - run(str(artifact/'bin/testMimallocExitInFlight')) + # ASan uses the system allocator; only the release lanes build these probes. + if label in ('bun-webkit-linux-amd64', 'bun-webkit-linux-amd64-aot'): + run(str(artifact/'bin/testMimallocExit')) + run(str(artifact/'bin/testMimallocExitInFlight')) run(str(artifact/'bin/testVMEntryRecord')) run(str(artifact/'bin/testVMEntryScope')) run(str(artifact / 'bin/testForeignStackSuspension')) diff --git a/.github/openclaw/release-notes.md b/.github/openclaw/release-notes.md index c913a68727ea5..a1dcd83b14ea6 100644 --- a/.github/openclaw/release-notes.md +++ b/.github/openclaw/release-notes.md @@ -1,3 +1,5 @@ +Artifact builds admit the AOT lanes used by current Bun's release and non-LTO CI builds, including both optional musl targets. Linux x64 Debug ASan AOT supplies the native `bun bd test` gate. The ten existing non-AOT lanes and historical Bun qualification remain selected. Current Bun qualification with the AOT libraries is still pending. + When the AOT source-producing lane is selected, packaging retains its generator sources and built engine declarations in a separate checksum-verified archive for Bun's generator-only jobs. Release assembly checks and includes that archive alongside the native lane output. Static JSC API tests now link the same AOT program callbacks and shared builtin-table object as the standalone tools. The table object belongs to the engine build rather than the optional shell, so API tests can configure with the shell disabled. @@ -39,7 +41,7 @@ Other previously released engine changes remain included: Source-provenance jobs now check out complete Git history so ancestry validation can cover every merged patch commit. Sparse checkouts and the existing provenance guards remain unchanged. -Qualification requires all ten artifact builds and the existing native Linux, Linux ARM64 and Windows ARM64 gates. The Linux Bun comparison now builds only the historical `b83b544ef744b6ab0dc1feadb59652261d64291d`/`1600131e46b5af48bbda3559af8d8a3327230b6e` baseline with recorded patches 000/012, and the exact candidate Bun `7b573c05d0c52dffc67d4d25daf108bed5930cf2` with the measured engine manifest and a measured source compatibility patch for the upstream BuiltinCode and heap-only BigInt APIs. The build receipt binds every original/adapted file digest and the exact compiled-input set, then requires restoration of the frozen checkout before runtime qualification. Baseline and test harness adapters remain excluded from compiled inputs. Existing node:sqlite BigInt read/write, result-metadata and range tests plus the custom-framework Bake production prerender case exercise the changed embedding APIs on the same measured binary. Existing lazy process builtins, even/odd matcher cases and 18 primitive/container serialization cases cover the removed private BigInt32 paths without changing the serialized sign, length or digit encoding. The ordinary embedding retains every feature through the engine removable-feature hooks; an unchanged Collator sensitivity case and a native URL getter smoke must complete without skips. Standalone native probes use the engine-owned untrimmed hook implementation. It preserves the original ordered 44-file/46-result selection and grouped scheduling under the explicit `candidate-pass-baseline-observed-v1` policy, and runs the 85-path historical/current selection union. Every selected candidate file must pass; ordinary baseline failures and unreported file suites remain visible. This measures a Bun-plus-engine upgrade, not an engine-only change. +Qualification requires all 21 artifact builds and the existing native Linux, Linux ARM64 and Windows ARM64 gates. The Linux Bun comparison now builds only the historical `b83b544ef744b6ab0dc1feadb59652261d64291d`/`1600131e46b5af48bbda3559af8d8a3327230b6e` baseline with recorded patches 000/012, and the exact candidate Bun `7b573c05d0c52dffc67d4d25daf108bed5930cf2` with the measured engine manifest and a measured source compatibility patch for the upstream BuiltinCode and heap-only BigInt APIs. The build receipt binds every original/adapted file digest and the exact compiled-input set, then requires restoration of the frozen checkout before runtime qualification. Baseline and test harness adapters remain excluded from compiled inputs. Existing node:sqlite BigInt read/write, result-metadata and range tests plus the custom-framework Bake production prerender case exercise the changed embedding APIs on the same measured binary. Existing lazy process builtins, even/odd matcher cases and 18 primitive/container serialization cases cover the removed private BigInt32 paths without changing the serialized sign, length or digit encoding. The ordinary embedding retains every feature through the engine removable-feature hooks; an unchanged Collator sensitivity case and a native URL getter smoke must complete without skips. Standalone native probes use the engine-owned untrimmed hook implementation. It preserves the original ordered 44-file/46-result selection and grouped scheduling under the explicit `candidate-pass-baseline-observed-v1` policy, and runs the 85-path historical/current selection union. Every selected candidate file must pass; ordinary baseline failures and unreported file suites remain visible. This measures a Bun-plus-engine upgrade, not an engine-only change. Compatibility startup and three unchanged memory-release tests, feature regressions, inspector checks and runtime-cache replay at format 45 all reuse the same candidate binary. Eleven current Bun WebKit-upgrade cases must pass without skips. Native ARM64 also runs the parser-arena and both heap-teardown API regressions with three exact completed JUnit identities. Its existing build also links testaot and executes the two compiled namespace cases and eight compiled module-program cases beside the matching jsc. Both selections use the supported single-process native mode under one 600-second supervisor, retain nested image-process supervision, and require every ordered case name and the exact zero-failure summaries. This proves engine image execution, not the separately pinned Bun AOT compiler or its ALS/facade integration. Immutable build-tool receipts bind the historical baseline logger adapter and actual build commands to the binaries. The current candidate uses its native build logger without a patch; identical source, compiled-input inventory and executable guards still apply. The consumer identity binds those receipts, source/index, sole tracked manifest overlay, engine archive, binary bytes, measured runtime and separately copied worker fixture. Fixed post-build adapters provide the same reporter, retry accounting, safe logging and process-termination evidence to both frozen Bun pins. The optional crash-remapper install also uses its frozen lockfile on both pins; installation refusal still permits tests to run, without exempting the lockfile from source-restoration guards. Each invocation binds its ordered selection, raw results and terminal observations to that identity; its receipt is finalized only after exact source restoration. Assembly verifies the actual uploaded bytes against that receipt. The historical W113/W150 adapter reconstruction is retired; runtime counterparts are already landed in the candidate. Historical findings above are not fresh qualification results for this source. Consumers must jointly rebuild Bun with the exact engine headers and libraries. diff --git a/.github/openclaw/test_artifacts.py b/.github/openclaw/test_artifacts.py index 4337997ebef10..60051bf51783d 100644 --- a/.github/openclaw/test_artifacts.py +++ b/.github/openclaw/test_artifacts.py @@ -229,6 +229,34 @@ def test_lane_abi_defaults_and_consumer_overrides(self): class PreflightAdmission(unittest.TestCase): + def test_configured_matrix_admits_current_bun_aot_consumers(self): + legacy = [ + 'bun-webkit-linux-amd64', + 'bun-webkit-macos-arm64', + 'bun-webkit-linux-amd64-lto', + 'bun-webkit-linux-arm64-lto', + 'bun-webkit-macos-arm64-lto', + 'bun-webkit-macos-amd64-lto', + 'bun-webkit-linux-amd64-musl-lto', + 'bun-webkit-linux-arm64-musl-lto', + 'bun-webkit-windows-amd64-lto', + 'bun-webkit-windows-arm64', + ] + aot = [label + '-aot' for label in legacy] + ['bun-webkit-linux-amd64-debug-asan-aot'] + with tempfile.TemporaryDirectory() as temporary: + output = Path(temporary) / 'output' + env = {'GITHUB_REF': 'refs/heads/claude/sync-webkit-upstream-20261014', + 'INPUT_PUBLISH': 'false', 'INPUT_SHA': 'a' * 40, + 'GITHUB_SHA': 'a' * 40, 'GITHUB_OUTPUT': str(output)} + with patch.dict(os.environ, env), patch.object( + artifacts, 'source', return_value={'source': 'a' * 40}): + artifacts.preflight() + selected = [row['lane'] for row in json.loads(output.read_text().removeprefix('matrix='))['include']] + self.assertEqual(selected, legacy + aot) + definitions = {lane['label']: lane for lane in artifacts.lane_definitions()} + source_producers = [label for label in selected if len(artifacts.archive_names(definitions[label])) == 2] + self.assertEqual(source_producers, ['bun-webkit-linux-amd64-lto-aot']) + def test_sync_branch_is_qualification_only(self): cases = [ ('refs/heads/claude/sync-webkit-upstream-20261014', 'false', True), diff --git a/.github/openclaw/test_release.py b/.github/openclaw/test_release.py index 929acfde771eb..826a6ef3b5677 100644 --- a/.github/openclaw/test_release.py +++ b/.github/openclaw/test_release.py @@ -28,8 +28,16 @@ def setUp(self): q=self.inputs/'qualification';q.mkdir() for lane in config['lanes']: label=lane['label'];d=self.inputs/label;d.mkdir();(d/'provenance').mkdir() - f=d/(label+'.tar.gz');f.write_bytes(label.encode()) - (d/(label+'.manifest.json')).write_text(json.dumps({'source':SOURCE,'base':release.artifact_source.BASE,'history_floor':release.artifact_source.HISTORY_FLOOR,'patches':PATCHES,'lane':{'label':label},'files':{f.name:{'sha256':release.sha(f),'size':f.stat().st_size}}})) + metadata={'label':label} + payloads={label+'.tar.gz':label.encode()} + if label=='bun-webkit-linux-amd64-lto-aot': + metadata['sources']='bun-webkit-aot-sources' + payloads['bun-webkit-aot-sources.tar.gz']=b'built AOT sources' + files={} + for name,data in payloads.items(): + f=d/name;f.write_bytes(data) + files[name]={'sha256':release.sha(f),'size':f.stat().st_size} + (d/(label+'.manifest.json')).write_text(json.dumps({'source':SOURCE,'base':release.artifact_source.BASE,'history_floor':release.artifact_source.HISTORY_FLOOR,'patches':PATCHES,'lane':metadata,'files':files})) release_fixture(self.inputs,SOURCE) w=self.inputs/'windows-arm64-qualification';w.mkdir() archive=self.inputs/'bun-webkit-windows-arm64/bun-webkit-windows-arm64.tar.gz' @@ -138,19 +146,17 @@ def test_assembly_rechecks_raw_facts_after_plausible_redigested_summaries(self): for path,data in originals.items():(proof/path).write_bytes(data) def test_complete_set_roundtrip(self): - self.assemble();self.assertEqual(len(release.verify(self.out,SOURCE)['artifacts']),10) + self.assemble();self.assertEqual(len(release.verify(self.out,SOURCE)['artifacts']),22) def test_aot_source_producer_roundtrip_and_integrity(self): config=json.loads((release.ROOT/'.github/openclaw/variants.json').read_text()) label='bun-webkit-linux-amd64-lto-aot' source_name='bun-webkit-aot-sources.tar.gz' - config['lanes'].append({'label':label}) root=self.root/'source' config_path=root/'.github/openclaw/variants.json' config_path.parent.mkdir(parents=True) config_path.write_text(json.dumps(config)) directory=self.inputs/label - directory.mkdir();(directory/'provenance').mkdir() declaration='bun-webkit/Source/JavaScriptCore/aot/builtins/generated/AOTBuiltinEngineDeclarations.json' generated=b'{"origin":"built-engine-declarations"}\n' for name,members in [ diff --git a/.github/openclaw/variants.json b/.github/openclaw/variants.json index 5e708d64b4482..4a83b49caa279 100644 --- a/.github/openclaw/variants.json +++ b/.github/openclaw/variants.json @@ -41,9 +41,53 @@ { "label": "bun-webkit-windows-arm64", "consumer": "openclaw-release.yml windows-arm64: release without LTO" + }, + { + "label": "bun-webkit-linux-amd64-aot", + "consumer": "openclaw-build-test.yml linux-x64: build:release --lto=off (current Bun AOT)" + }, + { + "label": "bun-webkit-macos-arm64-aot", + "consumer": "openclaw-build-test.yml darwin-arm64: build:release --lto=off (current Bun AOT)" + }, + { + "label": "bun-webkit-linux-amd64-lto-aot", + "consumer": "openclaw-release.yml default linux-x64 (current Bun AOT)" + }, + { + "label": "bun-webkit-linux-arm64-lto-aot", + "consumer": "openclaw-release.yml default linux-arm64 (current Bun AOT)" + }, + { + "label": "bun-webkit-macos-arm64-lto-aot", + "consumer": "openclaw-release.yml default darwin-arm64 (current Bun AOT)" + }, + { + "label": "bun-webkit-macos-amd64-lto-aot", + "consumer": "openclaw-release.yml default darwin-x64 (current Bun AOT)" + }, + { + "label": "bun-webkit-linux-amd64-musl-lto-aot", + "consumer": "openclaw-release.yml optional linux-x64-musl (current Bun AOT)" + }, + { + "label": "bun-webkit-linux-arm64-musl-lto-aot", + "consumer": "openclaw-release.yml optional linux-arm64-musl (current Bun AOT)" + }, + { + "label": "bun-webkit-windows-amd64-lto-aot", + "consumer": "openclaw-release.yml optional windows-x64 (current Bun AOT)" + }, + { + "label": "bun-webkit-windows-arm64-aot", + "consumer": "openclaw-release.yml windows-arm64: release without LTO (current Bun AOT)" + }, + { + "label": "bun-webkit-linux-amd64-debug-asan-aot", + "consumer": "Linux x64 bun bd test: Debug ASan with AOT" } ], - "excluded": "Android, FreeBSD, debug and ASAN are not selected by the fork's active OpenClaw workflows. Windows arm64 uses upstream's non-LTO lane because LLVM CodeView cannot encode its LTO register tuples. There is no separate x64 baseline WebKit archive.", + "excluded": "Android, FreeBSD and developer debug/ASAN variants other than the Linux x64 AOT proof lane are not selected by the fork's active OpenClaw workflows. Windows arm64 uses upstream's non-LTO lane because LLVM CodeView cannot encode its LTO register tuples. There is no separate x64 baseline WebKit archive.", "baseline": { "commit": "b83b544ef744b6ab0dc1feadb59652261d64291d", "tree": "0cb8c8700ae8ec2a2da75487072ad690a5747f8b",