mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
test(evm): observe launcher starts before retained-cleanup retry
Replace the disabled-gate marker assertion with an append-only launcher receipt written before the real worker starts. Failed retries must preserve that log byte-for-byte, establishing that the retained resource prevents a new EVM launch. All three related real Factory workflows, old CLI parity, healthy WASM peer and cleanup pass again; broader domain/model matrices are not repeated. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -72,7 +72,7 @@ descriptor checkpoint; they are not silently rerun or attributed to this script.
|
||||
|
||||
## Measurements and compatibility scope
|
||||
|
||||
Exact verifier source SHA-256 is
|
||||
Initial three-carrier verifier source SHA-256 is
|
||||
`2fec069b53324ef82070d323b26dd613b6da0caa7f18100adbeb39b045cf98dc`.
|
||||
All three carriers pass all three scenarios and CLI parity with this same source.
|
||||
|
||||
@@ -119,6 +119,22 @@ validated in advance without that result. A dynamic third-party module ABI
|
||||
preflight is not implemented or claimed. The corresponding broader acceptance
|
||||
item remains open rather than creating the deferred generic plugin registry.
|
||||
|
||||
## Final launcher review
|
||||
|
||||
A missing gate marker while gating is disabled cannot establish absence of a
|
||||
new launch. The fixture now appends a launch record before starting the actual
|
||||
worker; both permission-failure retries must leave that log byte-identical.
|
||||
This independently verifies that retained cleanup failure stops a new EVM
|
||||
launch, while preserving the original resource and healthy WASM peer.
|
||||
|
||||
Final verifier source SHA-256 is
|
||||
`fc9a50e2e54e4c8eede4b8a19283e11ddaa1faadea52eebc390b55b5a1902668`.
|
||||
All three related real Factory scenarios, CLI parity and final cleanup pass
|
||||
again on the corrected-main runtime: 23.579 seconds, 1,163,685,888 peak sampled
|
||||
family bytes and 23.110 last-observed CPU seconds. The earlier three-carrier
|
||||
receipts remain pinned to their earlier source; wider artifacts/models are
|
||||
not repeated for this review fix.
|
||||
|
||||
## Reproduction
|
||||
|
||||
Build and freeze the explicit source revision as documented in the measurement
|
||||
|
||||
@@ -113,10 +113,11 @@ await writeFile(
|
||||
wrapper,
|
||||
`#!${process.execPath}
|
||||
import { spawn } from "node:child_process";
|
||||
import { access, readFile, rename, writeFile } from "node:fs/promises";
|
||||
import { access, appendFile, readFile, rename, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { setTimeout as delay } from "node:timers/promises";
|
||||
const gate = process.env.REA_VERIFY_EVM_GATE;
|
||||
await appendFile(join(gate, "launches.log"), process.cwd() + "\\n", { mode: 0o600 });
|
||||
const child = spawn("/usr/bin/prlimit", process.argv.slice(2), { stdio: "inherit" });
|
||||
const code = await new Promise((resolve, reject) => {
|
||||
child.once("error", reject);
|
||||
@@ -215,7 +216,6 @@ const observeGate = async (expectedSuccess) => {
|
||||
assert.equal(marker.root.startsWith(work + "/rea-evm-interface-"), true);
|
||||
const rootStat = await lstat(marker.root);
|
||||
assert.equal(rootStat.isDirectory(), true);
|
||||
assert.equal(rootStat.isSymbolicLink(), false);
|
||||
assert.equal(rootStat.uid, process.getuid());
|
||||
const processRow = (await host.listProcesses()).find(
|
||||
(x) => x.pid === marker.pid,
|
||||
@@ -417,12 +417,16 @@ await verifyWithCleanup(async () => {
|
||||
launch.marker.root.slice(work.length + 1),
|
||||
]);
|
||||
await gateMode("off");
|
||||
const launchLogBefore = await readFile(join(lab, "launches.log"));
|
||||
const retryBeforeRepair = errorValue(await request());
|
||||
assert.equal(retryBeforeRepair.code, "cleanup_incomplete");
|
||||
assert.deepEqual(retryBeforeRepair.details.resources, [
|
||||
launch.marker.root,
|
||||
]);
|
||||
await assert.rejects(access(join(lab, "ready.json")), { code: "ENOENT" });
|
||||
assert.deepEqual(
|
||||
await readFile(join(lab, "launches.log")),
|
||||
launchLogBefore,
|
||||
);
|
||||
const peerEvidence = await peer();
|
||||
assert.equal(peerEvidence.subject.digest.sha256, peerBefore);
|
||||
await restore();
|
||||
@@ -436,6 +440,7 @@ await verifyWithCleanup(async () => {
|
||||
failed,
|
||||
cleanup,
|
||||
retry_before_permission_repair: retryBeforeRepair,
|
||||
launch_log_sha256_before_retry: sha(launchLogBefore),
|
||||
peer_evidence_id: peerEvidence.evidence_id,
|
||||
recovery_evidence_id: recovered.evidence_id,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user