refactor: return complete analysis results inline

This commit is contained in:
morluto
2026-09-29 08:07:24 +08:00
parent 07ff8b30ee
commit a2a3243ea8
127 changed files with 402 additions and 1508 deletions
@@ -42,7 +42,6 @@ const duplicateOriginStorage = (origin) => ({
/** Build the source-owned full-capture browser scenario. */
export function browserScenario(browser, origin) {
return browserScenarioSchema.parse({
schema_version: 1,
browser,
start_url: { url: `${origin}/app`, query: [] },
allowed_origins: [origin],
@@ -22,7 +22,6 @@ const completionClaim = ({
parameters: {
scenario_id: scenarioId,
scenario_version: 1,
result_schema_version: 1,
artifact_sha256s: artifactSha256s,
},
result: { status },
@@ -37,7 +36,6 @@ const completionClaim = ({
id: COMPLETION_PROVIDER.id,
version: COMPLETION_PROVIDER.version,
},
result_schema_version: 1,
status,
evidence_ids: [evidence.evidence_id],
};
@@ -151,7 +149,6 @@ const optionalClaims = ({ operatorManifest, ilspyOracle }) => [
/** Project completed managed assertions into the standard verifier report. */
export const createManagedCompletionReport = (input, verifierRun) => ({
schema_version: 1,
verifier: {
id: COMPLETION_PROVIDER.id,
version: COMPLETION_PROVIDER.version,
@@ -1,14 +1,9 @@
export function parseManagedAppManifest(rawManifest) {
const manifest = object(rawManifest, "manifest");
ensure(
manifest.schema_version === 1,
"manifest.schema_version must be exactly 1",
);
const target = object(manifest.target, "manifest.target");
const methods = array(manifest.methods, "manifest.methods");
ensure(manifest.methods.length > 0, "manifest.methods must not be empty");
return {
schema_version: 1,
label: optionalString(manifest.label, "manifest.label"),
target: {
path: string(target.path, "manifest.target.path"),
@@ -43,7 +43,6 @@ async function runManagedAppManifestSelfTest(context) {
assert.ok(method);
const summary = await context.verifyManagedAppManifest(
{
schema_version: 1,
label: "source-owned manifest verifier self-test",
target: {
path: sample.path,
-2
View File
@@ -1,5 +1,4 @@
export interface VerifierRunStart {
readonly schema_version: 1;
readonly run_id: string;
readonly verifier_pid: number;
readonly parent_pid: number;
@@ -14,7 +13,6 @@ export interface VerifierRunDescendant {
export type VerifierProcessLineage =
| {
readonly status: "verified";
readonly schema_version: 1;
readonly observed_at: string;
readonly launcher_pid: number;
readonly launcher_parent_pid: number;
-2
View File
@@ -11,7 +11,6 @@ export const createVerifierRun = () => {
return activeVerifierRun;
}
activeVerifierRun = Object.freeze({
schema_version: 1,
run_id: randomUUID(),
verifier_pid: process.pid,
parent_pid: process.ppid,
@@ -85,7 +84,6 @@ const observeVerifierLineage = async (run, observedAt) => {
}
return {
status: "verified",
schema_version: 1,
observed_at: observedAt,
launcher_pid: run.verifier_pid,
launcher_parent_pid: run.parent_pid,