mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 05:11:49 +01:00
test: retain self-contained process regression fixture
This commit is contained in:
1 parent
f0a3c395c2
commit
1316723269
5 files changed
+41
-8
No files matched your search
@@ -25,3 +25,5 @@ The old selector returned an empty array atcall120 because the live interstitial
|
||||
Resource-specific absolute checkout/evidence/temporary-home paths were replaced with descriptive references. `public-projections.json` records original and public hashes for each projection. Revisions, event identities, times, counts, hashes, cleanup outcomes and limits are unchanged. The launcher retains its already published generic macOS temporary-directory prefix, not a resource-specific private path. The two argument-adapted monitor/checker copies were syntax checked only; original executed hashes remain distinct. Run the future offline verification explicitly with `node --test scripts/native-ingestion/live-browser-streaming-check.mjs`; it is an opt-in Node/Playwright check outside the current default Vitest projects. The original22-file proof bundle remains unchanged.
|
||||
|
||||
The reviewed follow-up also accepts OpenCode ordinary deltas without an artificial `item.started` prerequisite while retaining explicit completion/finalization/terminal rejection. The birth-settlement reproduction helper now requires one successful complete process-list snapshot and propagates command failures. `verification-follow-up.json` records the offline regressions; `independent-successful-process-snapshot.json` separately selects the original successful monitor output for all four captured process identities. These corrected helpers were not executed in a new live journey.
|
||||
|
||||
The faulty pre-fix process checker is archived as `helpers/verify-birth-settlement-before.source.txt` solely for the offline regression. It is source text, not a reproduction command. The regression reads this committed fixture without invoking Git or requiring the original commit, so shallow and squashed checkouts remain reproducible.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import {readFile,writeFile} from 'node:fs/promises';
|
||||
import {execFileSync} from 'node:child_process';
|
||||
import path from 'node:path';
|
||||
const directory=process.argv[2];
|
||||
if (!directory) throw new Error('Pass the owned evidence directory');
|
||||
const browser=JSON.parse(await readFile(path.join(directory,'live-provider-result.json'),'utf8'));
|
||||
const stop=browser.journeys.find(journey=>journey.kind==='stop-live-provider');
|
||||
const gate=stop.preStopProcessProof;
|
||||
assert.equal(stop.status,'passed');assert.ok(gate.verifiedBeforeClickAtMs<=stop.requestedAt);
|
||||
assert.equal(gate.runId,stop.activeRunId);assert.equal(gate.command,'sleep 60');
|
||||
assert.ok(gate.observedProcessAgeMs+gate.verifiedBeforeClickAtMs-gate.observedAtMs<20000);
|
||||
assert.equal(gate.chain[0].pid,gate.sleepPid);assert.equal(gate.chain.at(-1).pid,gate.runnerPid);
|
||||
assert.ok(gate.chain.some(proc=>/verified-executable|opencode/.test(proc.executable)));
|
||||
const checks=gate.chain.map(proc=>{
|
||||
let text='';try{text=execFileSync('ps',['-p',String(proc.pid),'-o','pid=,ppid=,stat=,lstart=,comm='],{encoding:'utf8',stdio:['ignore','pipe','ignore']}).trim();}catch{}
|
||||
assert.equal(text,'','Exact owned birth PID remains present after settlement');
|
||||
return {pid:proc.pid,observedBirthTime:proc.birthTime,observedExecutable:proc.executable,absent:true};
|
||||
});
|
||||
const output={verified:true,checkedAt:new Date().toISOString(),runId:gate.runId,causalOrder:'Owned live sleep60 birth identity gate completed before ordinary UI Stop click',source:'Independent postsettlement ps by exact preStop birth-identity chain',checks};
|
||||
await writeFile(path.join(directory,'independent-birth-settlement-proof.json'),JSON.stringify(output,null,2));console.log(JSON.stringify(output,null,2));
|
||||
@@ -7,8 +7,8 @@
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"bytes": 7357,
|
||||
"sha256": "349c8a64444f41f06942959950afd0f480c724ee539e8a8b76523be5a3481050"
|
||||
"bytes": 7696,
|
||||
"sha256": "67aca55715fd0553e13637b159b79854c85dfdae236fd0308e68dd896093ca1d"
|
||||
},
|
||||
{
|
||||
"path": "after-live-stop.png",
|
||||
@@ -90,6 +90,11 @@
|
||||
"bytes": 4858,
|
||||
"sha256": "bc06e6797f7189a4d56b09ec268de3f59267e7ed7082f37f3aab3f4d784bc1e6"
|
||||
},
|
||||
{
|
||||
"path": "helpers/verify-birth-settlement-before.source.txt",
|
||||
"bytes": 1752,
|
||||
"sha256": "3eca4c0bd960e87225fee9c74a6f9ef0eb785b3d3766bc8435900aaa266d4d46"
|
||||
},
|
||||
{
|
||||
"path": "helpers/verify-birth-settlement.mjs",
|
||||
"bytes": 2308,
|
||||
@@ -167,8 +172,8 @@
|
||||
},
|
||||
{
|
||||
"path": "verification-follow-up.json",
|
||||
"bytes": 1676,
|
||||
"sha256": "1c87e25e957f032ac3462441a8b20a6ca07985bf5e0e396fed8e49c1596f36ff"
|
||||
"bytes": 2077,
|
||||
"sha256": "0a917de1efb6664121eafd899dcd21d0464714098c88b1b18f72ff74cdc16c09"
|
||||
}
|
||||
]
|
||||
}
|
||||
+8
-2
@@ -14,8 +14,14 @@
|
||||
"correction": "Require a successful complete process-list read with verifier PID; all command failures propagate.",
|
||||
"regression": "Five actual-source checks pass: original false-positive reproduced; successful absent snapshot; command failures status1/status2/ENOENT/EACCES/SIGTERM rejected; malformed/empty/incomplete snapshot rejected; live captured PID rejected.",
|
||||
"helperSha256": "6072f66a8fedb085f6a321a11c90fbc98b4ee95dfc9b4c3c42010feaf0ae342e",
|
||||
"testSha256": "3783686a4e3334a8ada07ec157b201c28d07412c7746b73d26a807ba230f9aeb",
|
||||
"independentOriginalEvidence": "independent-successful-process-snapshot.json"
|
||||
"testSha256": "4a7661e68843efb97e353eed3aa9c38c024e78d2a2f5ceb8ef3a4c0912ab0471",
|
||||
"independentOriginalEvidence": "independent-successful-process-snapshot.json",
|
||||
"beforeSourceFixture": {
|
||||
"path": "helpers/verify-birth-settlement-before.source.txt",
|
||||
"sha256": "3eca4c0bd960e87225fee9c74a6f9ef0eb785b3d3766bc8435900aaa266d4d46",
|
||||
"originCommit": "d05f9b0db71eaee823b72136ae54611b12a72f35",
|
||||
"scope": "Exact archived faulty source consumed as text by stubbed regression; no historical Git object needed at test execution"
|
||||
}
|
||||
}
|
||||
],
|
||||
"limits": [
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { test } from 'node:test';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
|
||||
const file = 'doc/benchmarks/native-event-ingestion-2026-11-03/live-ce33-914/helpers/verify-birth-settlement.mjs';
|
||||
const source = await readFile(new URL('../../' + file, import.meta.url), 'utf8');
|
||||
const before = execFileSync('git', ['show', 'd05f9b0db71eaee823b72136ae54611b12a72f35:' + file], { encoding: 'utf8' });
|
||||
const before = await readFile(new URL('../../' + file.replace('.mjs', '-before.source.txt'), import.meta.url), 'utf8');
|
||||
const gate = { chain: [{ pid: 101, birthTime: 'fixture-birth', executable: 'fixture-provider' }] };
|
||||
function check(text, ps) {
|
||||
const start = text.includes('const processList = ') ? text.indexOf('const processList = ') : text.indexOf('const checks=gate.chain.map');
|
||||
|
||||
Reference in new issue
Block a user