assertledger 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +31 -0
- package/LICENSE +21 -0
- package/README.fr.md +236 -0
- package/README.md +224 -0
- package/SECURITY.md +51 -0
- package/benchmarks/agentic-profile/README.md +15 -0
- package/benchmarks/agentic-profile/public/README.md +5 -0
- package/benchmarks/self-hosted-core/README.md +113 -0
- package/benchmarks/self-hosted-core/adapter.mjs +293 -0
- package/benchmarks/self-hosted-core/builder.ts +193 -0
- package/benchmarks/self-hosted-core/campaign.ts +233 -0
- package/benchmarks/self-hosted-core/existing-tests-builder.ts +217 -0
- package/benchmarks/self-hosted-core/existing-tests.ts +146 -0
- package/benchmarks/self-hosted-core/liveness.test.mjs +8 -0
- package/conformance/v1/bundle.json +104 -0
- package/conformance/v1/expected/canonical-order-a.json +4 -0
- package/conformance/v1/expected/canonical-order-b.json +4 -0
- package/conformance/v1/expected/create-benchmark-v1-measured.json +575 -0
- package/conformance/v1/expected/create-profile-v1-qualified.json +280 -0
- package/conformance/v1/expected/decide-collection-failure-non-kill.json +192 -0
- package/conformance/v1/expected/decide-compile-failure-non-kill.json +192 -0
- package/conformance/v1/expected/decide-infra-error-non-kill.json +192 -0
- package/conformance/v1/expected/decide-no-test-discovered-non-kill.json +192 -0
- package/conformance/v1/expected/decide-process-crash-non-kill.json +192 -0
- package/conformance/v1/expected/decide-timeout-non-kill.json +192 -0
- package/conformance/v1/expected/decide-verified.json +192 -0
- package/conformance/v1/expected/replay-benchmark-v1-resealed-summary-forgery.json +12 -0
- package/conformance/v1/expected/replay-evidence-raw-tamper.json +6 -0
- package/conformance/v1/expected/replay-evidence-resealed-semantic-forgery.json +6 -0
- package/conformance/v1/inputs/canonical-order-a.json +8 -0
- package/conformance/v1/inputs/canonical-order-b.json +8 -0
- package/conformance/v1/inputs/create-benchmark-v1-measured.json +459 -0
- package/conformance/v1/inputs/create-profile-v1-qualified.json +228 -0
- package/conformance/v1/inputs/decide-collection-failure-non-kill.json +143 -0
- package/conformance/v1/inputs/decide-compile-failure-non-kill.json +143 -0
- package/conformance/v1/inputs/decide-infra-error-non-kill.json +143 -0
- package/conformance/v1/inputs/decide-no-test-discovered-non-kill.json +143 -0
- package/conformance/v1/inputs/decide-process-crash-non-kill.json +143 -0
- package/conformance/v1/inputs/decide-timeout-non-kill.json +143 -0
- package/conformance/v1/inputs/decide-verified.json +143 -0
- package/conformance/v1/inputs/replay-benchmark-v1-resealed-summary-forgery.json +575 -0
- package/conformance/v1/inputs/replay-evidence-raw-tamper.json +201 -0
- package/conformance/v1/inputs/replay-evidence-resealed-semantic-forgery.json +192 -0
- package/conformance/v1/schemas/expected-digests.json +175 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +951 -0
- package/dist/cli.js.map +1 -0
- package/dist/contracts/diagnostics.d.ts +18 -0
- package/dist/contracts/diagnostics.d.ts.map +1 -0
- package/dist/contracts/diagnostics.js +13 -0
- package/dist/contracts/diagnostics.js.map +1 -0
- package/dist/contracts/index.d.ts +3908 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +2569 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/runtime-doctor.d.ts +107 -0
- package/dist/contracts/runtime-doctor.d.ts.map +1 -0
- package/dist/contracts/runtime-doctor.js +91 -0
- package/dist/contracts/runtime-doctor.js.map +1 -0
- package/dist/core/index.d.ts +200 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +2587 -0
- package/dist/core/index.js.map +1 -0
- package/dist/diagnostics.d.ts +7 -0
- package/dist/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics.js +252 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/engine/adapters/node-test-profile.d.ts +14 -0
- package/dist/engine/adapters/node-test-profile.d.ts.map +1 -0
- package/dist/engine/adapters/node-test-profile.js +14 -0
- package/dist/engine/adapters/node-test-profile.js.map +1 -0
- package/dist/engine/adapters/node-test-runtime.d.ts +39 -0
- package/dist/engine/adapters/node-test-runtime.d.ts.map +1 -0
- package/dist/engine/adapters/node-test-runtime.js +173 -0
- package/dist/engine/adapters/node-test-runtime.js.map +1 -0
- package/dist/engine/adapters/runtime-facts.d.ts +26 -0
- package/dist/engine/adapters/runtime-facts.d.ts.map +1 -0
- package/dist/engine/adapters/runtime-facts.js +73 -0
- package/dist/engine/adapters/runtime-facts.js.map +1 -0
- package/dist/engine/connection.d.ts +22 -0
- package/dist/engine/connection.d.ts.map +1 -0
- package/dist/engine/connection.js +343 -0
- package/dist/engine/connection.js.map +1 -0
- package/dist/engine/git-regression.d.ts +25 -0
- package/dist/engine/git-regression.d.ts.map +1 -0
- package/dist/engine/git-regression.js +803 -0
- package/dist/engine/git-regression.js.map +1 -0
- package/dist/engine/index.d.ts +55 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +2782 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/node-test-reporter.d.ts +2 -0
- package/dist/engine/node-test-reporter.d.ts.map +1 -0
- package/dist/engine/node-test-reporter.js +70 -0
- package/dist/engine/node-test-reporter.js.map +1 -0
- package/dist/engine/runtime-doctor.d.ts +16 -0
- package/dist/engine/runtime-doctor.d.ts.map +1 -0
- package/dist/engine/runtime-doctor.js +100 -0
- package/dist/engine/runtime-doctor.js.map +1 -0
- package/dist/evaluation/agentic-corpus.d.ts +161 -0
- package/dist/evaluation/agentic-corpus.d.ts.map +1 -0
- package/dist/evaluation/agentic-corpus.js +710 -0
- package/dist/evaluation/agentic-corpus.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +13 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +391 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/stdio.d.ts +3 -0
- package/dist/mcp/stdio.d.ts.map +1 -0
- package/dist/mcp/stdio.js +13 -0
- package/dist/mcp/stdio.js.map +1 -0
- package/dist/sdk/index.d.ts +52 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +224 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +10 -0
- package/dist/version.js.map +1 -0
- package/docs/adapter-protocol.md +196 -0
- package/docs/agentic-benchmark.md +118 -0
- package/docs/agentic-corpus-experiment-h3.md +89 -0
- package/docs/agentic-corpus-plan.md +105 -0
- package/docs/agentic-corpus-provenance.md +59 -0
- package/docs/agentic-test-profile-pilot.md +57 -0
- package/docs/agentic-test-profile-v2.md +116 -0
- package/docs/agentic-test-profile.md +274 -0
- package/docs/architecture.md +157 -0
- package/docs/ci.md +37 -0
- package/docs/client-connections.md +61 -0
- package/docs/conformance-v1.md +72 -0
- package/docs/decisions/0001-typescript-runtime.md +24 -0
- package/docs/developer-experience.md +55 -0
- package/docs/diagnostics.md +35 -0
- package/docs/distribution.md +40 -0
- package/docs/git-regression.md +39 -0
- package/docs/migration-repository-validation-order.md +35 -0
- package/docs/migration-testforge-to-assertledger.md +64 -0
- package/docs/project-intent.md +173 -0
- package/docs/proof-model.md +116 -0
- package/docs/reference.md +336 -0
- package/docs/release-1.0.md +63 -0
- package/docs/repository-audit.md +52 -0
- package/docs/repository-init.md +60 -0
- package/docs/research-basis.md +27 -0
- package/docs/roadmap.md +74 -0
- package/docs/runtime-doctor.md +65 -0
- package/docs/testexplora-calibration.md +71 -0
- package/examples/agentic-benchmark/benchmark-request.mjs +19 -0
- package/examples/agentic-benchmark/structured-phase-adapter-fixture.mjs +35 -0
- package/examples/agentic-profile/profile-benchmark.mjs +34 -0
- package/examples/agentic-profile/profile-manifest.mjs +28 -0
- package/examples/git-history/README.md +44 -0
- package/examples/git-history/create-demo.mjs +128 -0
- package/examples/git-history/escape-string-regexp/LICENSE +9 -0
- package/examples/git-history/escape-string-regexp/before.cjs.txt +11 -0
- package/examples/git-history/escape-string-regexp/fixed.cjs.txt +13 -0
- package/examples/git-history/escape-string-regexp/provenance.json +28 -0
- package/examples/node-test/repository/package.json +5 -0
- package/examples/node-test/repository/src/is-even.js +3 -0
- package/examples/node-test/repository/tests/base.test.js +6 -0
- package/examples/node-test/request.json +93 -0
- package/integrations/skill/SKILL.md +51 -0
- package/package.json +88 -0
- package/schemas/agentic-benchmark-acquisition-replay-result.v1.json +70 -0
- package/schemas/agentic-benchmark-acquisition-request.v1.json +564 -0
- package/schemas/agentic-benchmark-acquisition-result.v1.json +1409 -0
- package/schemas/agentic-benchmark-artifact.v1.json +1251 -0
- package/schemas/agentic-benchmark-replay-result.v1.json +84 -0
- package/schemas/agentic-benchmark-request.v1.json +1034 -0
- package/schemas/agentic-corpus-allocation-commitment-replay-result.v1.json +58 -0
- package/schemas/agentic-corpus-allocation-commitment.v1.json +141 -0
- package/schemas/agentic-corpus-allocation-replay-result.v1.json +34 -0
- package/schemas/agentic-corpus-allocation-request.v1.json +65 -0
- package/schemas/agentic-corpus-allocation-reveal.v1.json +66 -0
- package/schemas/agentic-corpus-allocation.v1.json +167 -0
- package/schemas/agentic-corpus-experiment-artifact.v1.json +329 -0
- package/schemas/agentic-corpus-experiment-plan-replay-result.v1.json +50 -0
- package/schemas/agentic-corpus-experiment-plan.v1.json +424 -0
- package/schemas/agentic-corpus-experiment-replay-request.v1.json +336 -0
- package/schemas/agentic-corpus-experiment-replay-result.v1.json +106 -0
- package/schemas/agentic-corpus-experiment-request.v1.json +204 -0
- package/schemas/agentic-corpus-provenance.v1.json +143 -0
- package/schemas/agentic-corpus-trust-policy.v1.json +133 -0
- package/schemas/agentic-profile-replay-result.v1.json +56 -0
- package/schemas/agentic-profile-replay-result.v2.json +63 -0
- package/schemas/agentic-profile-report.v1.json +961 -0
- package/schemas/agentic-profile-report.v2.json +1674 -0
- package/schemas/agentic-profile-request.v1.json +671 -0
- package/schemas/agentic-profile-request.v2.json +1338 -0
- package/schemas/evidence-manifest.v1.json +636 -0
- package/schemas/replay-result.v1.json +49 -0
- package/schemas/repository-analysis.v1.json +119 -0
- package/schemas/repository-audit.v1.json +811 -0
- package/schemas/repository-init-config.v1.json +183 -0
- package/schemas/repository-init-lock.v1.json +162 -0
- package/schemas/repository-init-result.v1.json +212 -0
- package/schemas/verification-request.v1.json +389 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { agenticBenchmarkAcquisitionReplayResultJsonSchema, agenticBenchmarkAcquisitionRequestJsonSchema, agenticBenchmarkAcquisitionResultJsonSchema, agenticBenchmarkArtifactJsonSchema, agenticBenchmarkReplayResultJsonSchema, agenticBenchmarkRequestJsonSchema, agenticCorpusAllocationCommitmentJsonSchema, agenticCorpusAllocationCommitmentReplayResultJsonSchema, agenticCorpusAllocationJsonSchema, agenticCorpusAllocationReplayResultJsonSchema, agenticCorpusAllocationRequestJsonSchema, agenticCorpusAllocationRevealJsonSchema, agenticCorpusExperimentArtifactJsonSchema, agenticCorpusExperimentPlanJsonSchema, agenticCorpusExperimentPlanReplayResultJsonSchema, agenticCorpusExperimentReplayRequestJsonSchema, agenticCorpusExperimentReplayResultJsonSchema, agenticCorpusExperimentRequestJsonSchema, agenticProfileReplayResultJsonSchema, agenticProfileReplayResultV2JsonSchema, agenticProfileReportJsonSchema, agenticProfileReportV2JsonSchema, agenticProfileRequestJsonSchema, agenticProfileRequestV2JsonSchema, evidenceManifestJsonSchema, parseAgenticBenchmarkAcquisitionReplayResult, parseAgenticBenchmarkAcquisitionRequest, parseAgenticBenchmarkAcquisitionResult, parseAgenticBenchmarkArtifact, parseAgenticBenchmarkReplayResult, parseAgenticBenchmarkRequest, parseAgenticCorpusAllocation, parseAgenticCorpusAllocationCommitmentReplayResult, parseAgenticCorpusAllocationReplayResult, parseAgenticCorpusAllocationRequest, parseAgenticCorpusExperimentArtifact, parseAgenticCorpusExperimentPlan, parseAgenticCorpusExperimentReplayResult, parseAgenticCorpusExperimentRequest, parseAgenticProfileReplayResult, parseAgenticProfileReplayResultV2, parseAgenticProfileReport, parseAgenticProfileReportV2, parseAgenticProfileRequest, parseAgenticProfileRequestV2, parseEvidenceManifest, parseReplayResult, parseRepositoryAnalysis, parseRepositoryAudit, parseRepositoryInitResult, parseVerificationRequest, replayResultJsonSchema, repositoryAnalysisJsonSchema, repositoryAuditJsonSchema, repositoryInitConfigJsonSchema, repositoryInitLockJsonSchema, repositoryInitResultJsonSchema, verificationRequestJsonSchema, } from "../contracts/index.js";
|
|
2
|
+
import { parseRuntimeDoctorResult } from "../contracts/runtime-doctor.js";
|
|
3
|
+
import { createAgenticBenchmark, createAgenticCorpusAllocation, createAgenticCorpusExperimentArtifact, createAgenticProfile, createAgenticProfileV2, replayAgenticBenchmark, replayAgenticBenchmarkAcquisition, replayAgenticCorpusAllocation, replayAgenticCorpusAllocationCommitment, replayAgenticCorpusExperimentArtifact, replayAgenticProfile, replayAgenticProfileV2, replayEvidenceManifest, } from "../core/index.js";
|
|
4
|
+
import { explainReasonCodes } from "../diagnostics.js";
|
|
5
|
+
import { qualifyGitRegression } from "../engine/git-regression.js";
|
|
6
|
+
import { acquireAgenticBenchmark, analyzeRepository, auditRepository, doctorRepositoryRuntime, initializeRepository, verifyCampaign, } from "../engine/index.js";
|
|
7
|
+
import { replayAgenticCorpusProvenance, verifyAgenticCorpusAllocationCommitmentSignatures, } from "../evaluation/agentic-corpus.js";
|
|
8
|
+
/** Provider-neutral programmatic facade over AssertLedger's deterministic components. */
|
|
9
|
+
export class AssertLedger {
|
|
10
|
+
explain(codes) {
|
|
11
|
+
return explainReasonCodes(codes);
|
|
12
|
+
}
|
|
13
|
+
async analyze(root) {
|
|
14
|
+
return parseRepositoryAnalysis(await analyzeRepository(root));
|
|
15
|
+
}
|
|
16
|
+
async audit(root, options = {}) {
|
|
17
|
+
return parseRepositoryAudit(await auditRepository(root, options));
|
|
18
|
+
}
|
|
19
|
+
async init(root, options = {}) {
|
|
20
|
+
return parseRepositoryInitResult(await initializeRepository(root, options));
|
|
21
|
+
}
|
|
22
|
+
async doctor(root) {
|
|
23
|
+
return this.init(root, { dryRun: true });
|
|
24
|
+
}
|
|
25
|
+
async doctorRuntime(root, options) {
|
|
26
|
+
return parseRuntimeDoctorResult(await doctorRepositoryRuntime(root, options));
|
|
27
|
+
}
|
|
28
|
+
async verify(request) {
|
|
29
|
+
return parseEvidenceManifest(await verifyCampaign(parseVerificationRequest(request)));
|
|
30
|
+
}
|
|
31
|
+
async checkGitRegression(options) {
|
|
32
|
+
return qualifyGitRegression(options);
|
|
33
|
+
}
|
|
34
|
+
replay(manifest) {
|
|
35
|
+
let parsedManifest;
|
|
36
|
+
try {
|
|
37
|
+
parsedManifest = parseEvidenceManifest(manifest);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return parseReplayResult({
|
|
41
|
+
valid: false,
|
|
42
|
+
schemaValid: false,
|
|
43
|
+
decisionDigestValid: false,
|
|
44
|
+
artifactDigestValid: false,
|
|
45
|
+
decisionSemanticsValid: false,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return parseReplayResult({ ...replayEvidenceManifest(parsedManifest), schemaValid: true });
|
|
49
|
+
}
|
|
50
|
+
profile(request) {
|
|
51
|
+
return parseAgenticProfileReport(createAgenticProfile(parseAgenticProfileRequest(request)));
|
|
52
|
+
}
|
|
53
|
+
replayProfile(report) {
|
|
54
|
+
try {
|
|
55
|
+
return parseAgenticProfileReplayResult(replayAgenticProfile(parseAgenticProfileReport(report)));
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return parseAgenticProfileReplayResult({
|
|
59
|
+
valid: false,
|
|
60
|
+
schemaValid: false,
|
|
61
|
+
sourceManifestValid: false,
|
|
62
|
+
policyDigestValid: false,
|
|
63
|
+
reportDigestValid: false,
|
|
64
|
+
semanticsValid: false,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
benchmark(request) {
|
|
69
|
+
return parseAgenticBenchmarkArtifact(createAgenticBenchmark(parseAgenticBenchmarkRequest(request)));
|
|
70
|
+
}
|
|
71
|
+
replayBenchmark(artifact) {
|
|
72
|
+
try {
|
|
73
|
+
return parseAgenticBenchmarkReplayResult(replayAgenticBenchmark(parseAgenticBenchmarkArtifact(artifact)));
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return parseAgenticBenchmarkReplayResult({
|
|
77
|
+
valid: false,
|
|
78
|
+
schemaValid: false,
|
|
79
|
+
sourceManifestValid: false,
|
|
80
|
+
sourceBindingValid: false,
|
|
81
|
+
policyDigestValid: false,
|
|
82
|
+
protocolDigestValid: false,
|
|
83
|
+
fingerprintDigestValid: false,
|
|
84
|
+
comparisonScopeDigestValid: false,
|
|
85
|
+
artifactDigestValid: false,
|
|
86
|
+
summarySemanticsValid: false,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async acquireBenchmark(request) {
|
|
91
|
+
return parseAgenticBenchmarkAcquisitionResult(await acquireAgenticBenchmark(parseAgenticBenchmarkAcquisitionRequest(request)));
|
|
92
|
+
}
|
|
93
|
+
replayBenchmarkAcquisition(result) {
|
|
94
|
+
return parseAgenticBenchmarkAcquisitionReplayResult(replayAgenticBenchmarkAcquisition(result));
|
|
95
|
+
}
|
|
96
|
+
profileV2(request) {
|
|
97
|
+
return parseAgenticProfileReportV2(createAgenticProfileV2(parseAgenticProfileRequestV2(request)));
|
|
98
|
+
}
|
|
99
|
+
replayProfileV2(report) {
|
|
100
|
+
try {
|
|
101
|
+
return parseAgenticProfileReplayResultV2(replayAgenticProfileV2(parseAgenticProfileReportV2(report)));
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return parseAgenticProfileReplayResultV2({
|
|
105
|
+
valid: false,
|
|
106
|
+
schemaValid: false,
|
|
107
|
+
sourceBenchmarkValid: false,
|
|
108
|
+
sourceBindingValid: false,
|
|
109
|
+
policyDigestValid: false,
|
|
110
|
+
reportDigestValid: false,
|
|
111
|
+
semanticsValid: false,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
allocateCorpus(request) {
|
|
116
|
+
return parseAgenticCorpusAllocation(createAgenticCorpusAllocation(parseAgenticCorpusAllocationRequest(request)));
|
|
117
|
+
}
|
|
118
|
+
replayCorpusAllocation(allocation) {
|
|
119
|
+
try {
|
|
120
|
+
return parseAgenticCorpusAllocationReplayResult(replayAgenticCorpusAllocation(parseAgenticCorpusAllocation(allocation)));
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return parseAgenticCorpusAllocationReplayResult({
|
|
124
|
+
valid: false,
|
|
125
|
+
schemaValid: false,
|
|
126
|
+
allocationDigestValid: false,
|
|
127
|
+
sourceCaseIdsValid: false,
|
|
128
|
+
assignmentScoresValid: false,
|
|
129
|
+
partitionSemanticsValid: false,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
corpusExperiment(request, plan) {
|
|
134
|
+
return parseAgenticCorpusExperimentArtifact(createAgenticCorpusExperimentArtifact(parseAgenticCorpusExperimentRequest(request), parseAgenticCorpusExperimentPlan(plan)));
|
|
135
|
+
}
|
|
136
|
+
replayCorpusExperiment(artifact, options) {
|
|
137
|
+
return parseAgenticCorpusExperimentReplayResult(replayAgenticCorpusExperimentArtifact({ artifact }, {
|
|
138
|
+
...options,
|
|
139
|
+
replayProvenance: replayAgenticCorpusProvenance,
|
|
140
|
+
verifyCommitmentSignatures: verifyAgenticCorpusAllocationCommitmentSignatures,
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
replayCorpusAllocationCommitment(input) {
|
|
144
|
+
return parseAgenticCorpusAllocationCommitmentReplayResult(replayAgenticCorpusAllocationCommitment(input, {
|
|
145
|
+
verifySignatures: verifyAgenticCorpusAllocationCommitmentSignatures,
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
schema(name) {
|
|
149
|
+
switch (name) {
|
|
150
|
+
case "agentic-corpus-allocation-request":
|
|
151
|
+
return agenticCorpusAllocationRequestJsonSchema();
|
|
152
|
+
case "agentic-corpus-allocation":
|
|
153
|
+
return agenticCorpusAllocationJsonSchema();
|
|
154
|
+
case "agentic-corpus-allocation-replay-result":
|
|
155
|
+
return agenticCorpusAllocationReplayResultJsonSchema();
|
|
156
|
+
case "agentic-corpus-allocation-commitment":
|
|
157
|
+
return agenticCorpusAllocationCommitmentJsonSchema();
|
|
158
|
+
case "agentic-corpus-allocation-reveal":
|
|
159
|
+
return agenticCorpusAllocationRevealJsonSchema();
|
|
160
|
+
case "agentic-corpus-allocation-commitment-replay-result":
|
|
161
|
+
return agenticCorpusAllocationCommitmentReplayResultJsonSchema();
|
|
162
|
+
case "agentic-corpus-experiment-plan":
|
|
163
|
+
return agenticCorpusExperimentPlanJsonSchema();
|
|
164
|
+
case "agentic-corpus-experiment-plan-replay-result":
|
|
165
|
+
return agenticCorpusExperimentPlanReplayResultJsonSchema();
|
|
166
|
+
case "agentic-corpus-experiment-request":
|
|
167
|
+
return agenticCorpusExperimentRequestJsonSchema();
|
|
168
|
+
case "agentic-corpus-experiment-artifact":
|
|
169
|
+
return agenticCorpusExperimentArtifactJsonSchema();
|
|
170
|
+
case "agentic-corpus-experiment-replay-request":
|
|
171
|
+
return agenticCorpusExperimentReplayRequestJsonSchema();
|
|
172
|
+
case "agentic-corpus-experiment-replay-result":
|
|
173
|
+
return agenticCorpusExperimentReplayResultJsonSchema();
|
|
174
|
+
case "agentic-benchmark-request":
|
|
175
|
+
return agenticBenchmarkRequestJsonSchema();
|
|
176
|
+
case "agentic-benchmark-artifact":
|
|
177
|
+
return agenticBenchmarkArtifactJsonSchema();
|
|
178
|
+
case "agentic-benchmark-replay-result":
|
|
179
|
+
return agenticBenchmarkReplayResultJsonSchema();
|
|
180
|
+
case "agentic-benchmark-acquisition-request":
|
|
181
|
+
return agenticBenchmarkAcquisitionRequestJsonSchema();
|
|
182
|
+
case "agentic-benchmark-acquisition-result":
|
|
183
|
+
return agenticBenchmarkAcquisitionResultJsonSchema();
|
|
184
|
+
case "agentic-benchmark-acquisition-replay-result":
|
|
185
|
+
return agenticBenchmarkAcquisitionReplayResultJsonSchema();
|
|
186
|
+
case "agentic-profile-request":
|
|
187
|
+
return agenticProfileRequestJsonSchema();
|
|
188
|
+
case "agentic-profile-report":
|
|
189
|
+
return agenticProfileReportJsonSchema();
|
|
190
|
+
case "agentic-profile-replay-result":
|
|
191
|
+
return agenticProfileReplayResultJsonSchema();
|
|
192
|
+
case "agentic-profile-request-v2":
|
|
193
|
+
return agenticProfileRequestV2JsonSchema();
|
|
194
|
+
case "agentic-profile-report-v2":
|
|
195
|
+
return agenticProfileReportV2JsonSchema();
|
|
196
|
+
case "agentic-profile-replay-result-v2":
|
|
197
|
+
return agenticProfileReplayResultV2JsonSchema();
|
|
198
|
+
case "verification-request":
|
|
199
|
+
return verificationRequestJsonSchema();
|
|
200
|
+
case "repository-analysis":
|
|
201
|
+
return repositoryAnalysisJsonSchema();
|
|
202
|
+
case "repository-audit":
|
|
203
|
+
return repositoryAuditJsonSchema();
|
|
204
|
+
case "repository-init-config":
|
|
205
|
+
return repositoryInitConfigJsonSchema();
|
|
206
|
+
case "repository-init-lock":
|
|
207
|
+
return repositoryInitLockJsonSchema();
|
|
208
|
+
case "repository-init-result":
|
|
209
|
+
return repositoryInitResultJsonSchema();
|
|
210
|
+
case "evidence-manifest":
|
|
211
|
+
return evidenceManifestJsonSchema();
|
|
212
|
+
case "replay-result":
|
|
213
|
+
return replayResultJsonSchema();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/** @deprecated Use `AssertLedger`. Alias retained for v1 compatibility. */
|
|
218
|
+
export class TestForge extends AssertLedger {
|
|
219
|
+
}
|
|
220
|
+
export { parseVerificationRequest, verificationRequestJsonSchema } from "../contracts/index.js";
|
|
221
|
+
export { createAgenticBenchmark, createAgenticCorpusAllocation, createAgenticCorpusExperimentArtifact, createAgenticProfile, createAgenticProfileV2, replayAgenticBenchmark, replayAgenticBenchmarkAcquisition, replayAgenticCorpusAllocation, replayAgenticCorpusExperimentArtifact, replayAgenticProfile, replayAgenticProfileV2, replayEvidenceManifest, verifyDecisionDigest, verifyManifestIntegrity, } from "../core/index.js";
|
|
222
|
+
export { qualifyGitRegression } from "../engine/git-regression.js";
|
|
223
|
+
export { acquireAgenticBenchmark, analyzeRepository, auditRepository, doctorRepositoryRuntime, initializeRepository, verifyCampaign, } from "../engine/index.js";
|
|
224
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAcL,iDAAiD,EACjD,4CAA4C,EAC5C,2CAA2C,EAC3C,kCAAkC,EAClC,sCAAsC,EACtC,iCAAiC,EACjC,2CAA2C,EAC3C,uDAAuD,EACvD,iCAAiC,EACjC,6CAA6C,EAC7C,wCAAwC,EACxC,uCAAuC,EACvC,yCAAyC,EACzC,qCAAqC,EACrC,iDAAiD,EACjD,8CAA8C,EAC9C,6CAA6C,EAC7C,wCAAwC,EACxC,oCAAoC,EACpC,sCAAsC,EACtC,8BAA8B,EAC9B,gCAAgC,EAChC,+BAA+B,EAC/B,iCAAiC,EAEjC,0BAA0B,EAC1B,4CAA4C,EAC5C,uCAAuC,EACvC,sCAAsC,EACtC,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,4BAA4B,EAC5B,kDAAkD,EAClD,wCAAwC,EACxC,mCAAmC,EACnC,oCAAoC,EACpC,gCAAgC,EAChC,wCAAwC,EACxC,mCAAmC,EACnC,+BAA+B,EAC/B,iCAAiC,EACjC,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB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AAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,GACf,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,oBAAoB,QAAuB,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
function readPackageVersion() {
|
|
3
|
+
const document = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
4
|
+
if (typeof document.version !== "string" || document.version.length === 0) {
|
|
5
|
+
throw new Error("PACKAGE_VERSION_INVALID");
|
|
6
|
+
}
|
|
7
|
+
return document.version;
|
|
8
|
+
}
|
|
9
|
+
export const ASSERTLEDGER_VERSION = readPackageVersion();
|
|
10
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,SAAS,kBAAkB;IACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CACzB,YAAY,CAAC,IAAI,GAAG,CAAC,iBAAiB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CACzC,CAAC;IAC3B,IAAI,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC1B,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Test adapters
|
|
2
|
+
|
|
3
|
+
Adapters translate a test runner's behavior into AssertLedger's normalized observation taxonomy. They
|
|
4
|
+
do not decide candidate eligibility, target credit, campaign status, or selection.
|
|
5
|
+
|
|
6
|
+
## Built-in `node:test` adapter
|
|
7
|
+
|
|
8
|
+
Configure the built-in adapter in a verification request:
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"kind": "node-test",
|
|
13
|
+
"executable": "node",
|
|
14
|
+
"baseTestFiles": ["tests/base.test.js"]
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For each execution, AssertLedger invokes the executable with an argument array equivalent to:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
--test
|
|
22
|
+
--test-reporter=<AssertLedger reporter URL>
|
|
23
|
+
--test-reporter-destination=<bounded result file>
|
|
24
|
+
--
|
|
25
|
+
<baseTestFiles...>
|
|
26
|
+
<candidateFiles...>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The engine adds an AssertLedger-owned `node:test` reporter and destination to the command and uses
|
|
30
|
+
`shell: false`. The reporter consumes runtime events, counts dequeued tests, normalizes each event's
|
|
31
|
+
file path, and compares it with the resolved candidate file set. It also separates candidate from
|
|
32
|
+
non-candidate failures. Assertion attribution is intentionally shallow: only an immediate
|
|
33
|
+
`data.details.error.cause.code === "ERR_ASSERTION"` under Node's structured
|
|
34
|
+
`failureType === "testCodeFailure"` wrapper is accepted. Nested causes are never traversed.
|
|
35
|
+
|
|
36
|
+
The child receives the configured environment allowlist plus
|
|
37
|
+
`TESTFORGE_NODE_CANDIDATE_FILES`, a JSON array of resolved candidate paths used by the reporter.
|
|
38
|
+
Allowlist entries cannot be `NODE_OPTIONS` or begin with `TESTFORGE_` or `NODE_TEST_`, compared
|
|
39
|
+
case-insensitively.
|
|
40
|
+
|
|
41
|
+
The engine admits `ASSERTION_FAILURE` only when every candidate failure has that immediate Node.js
|
|
42
|
+
assertion cause, no non-candidate test failed, and at least one candidate test was discovered.
|
|
43
|
+
Assertion libraries that do not expose this code are not admitted as assertion evidence. A generic
|
|
44
|
+
error whose nested cause is an `AssertionError` is deliberately rejected. On supported Node 22
|
|
45
|
+
runtimes, structured reporter events do not preserve a faithful `SyntaxError` identity for parse,
|
|
46
|
+
import, or load failures. Those failures therefore remain non-attributed `PROCESS_CRASH`, as do all
|
|
47
|
+
other non-assertion failures. The official profile declares both `detectsCompileFailure: false` and
|
|
48
|
+
`detectsCollectionFailure: false`; it never infers either outcome from stderr, messages, or stacks. A
|
|
49
|
+
missing or malformed report, or a report larger than 64 KiB, becomes `INFRA_ERROR`.
|
|
50
|
+
|
|
51
|
+
To preserve reporter custody and a complete execution plan, `extraArguments` must be absent or an
|
|
52
|
+
empty array. AssertLedger inserts `--` before all base-test and candidate paths so path tokens cannot be
|
|
53
|
+
parsed as Node.js options.
|
|
54
|
+
|
|
55
|
+
Before execution, AssertLedger probes the requested executable, resolves the reported `process.execPath`
|
|
56
|
+
to a file real path, then probes that resolved file again. Both probes must report the same supported
|
|
57
|
+
Node.js version (22.15 or newer). The manifest records the requested executable, resolved path,
|
|
58
|
+
version, and executable SHA-256 digest.
|
|
59
|
+
|
|
60
|
+
Executable and runtime qualification probes cap captured stdout and stderr at the smaller of
|
|
61
|
+
`maximumOutputBytes` and 64 KiB. A truncated executable identity report fails closed with
|
|
62
|
+
`NODE_TEST_EXECUTABLE_PROBE_FAILED`; increase the explicit capture budget if a long runtime path
|
|
63
|
+
cannot fit. Controlled reporter files retain their separate 64 KiB limit.
|
|
64
|
+
|
|
65
|
+
Before creating a campaign workspace, AssertLedger also runs an uncached runtime preflight against
|
|
66
|
+
that resolved executable and the exact bundled reporter. It uses the engine's central bounded
|
|
67
|
+
process runner, including its process-tree termination and `shell: false` guarantees. Each probe
|
|
68
|
+
respects `timeoutMsPerExecution`, capped at 5 seconds, and includes one passing
|
|
69
|
+
non-candidate control plus one candidate test. The report must contain exactly two discovered tests,
|
|
70
|
+
one candidate discovery, one candidate failure, zero non-candidate failures, zero syntax claims, and
|
|
71
|
+
a non-zero exit. The direct Node assertion must classify as attributed `ASSERTION_FAILURE`; a generic
|
|
72
|
+
error carrying a nested assertion cause must remain non-attributed `PROCESS_CRASH`. A missing,
|
|
73
|
+
malformed, contradictory, or timed-out probe fails closed with
|
|
74
|
+
`NODE_TEST_PROFILE_PREFLIGHT_FAILED`; no candidate execution starts. Successful evidence records
|
|
75
|
+
these deterministic facts without a timestamp under
|
|
76
|
+
`evidenceContext.adapter.configuration.runtimePreflight`.
|
|
77
|
+
|
|
78
|
+
File-based runtime attribution is stronger than source scanning, but it is not authenticated. The
|
|
79
|
+
Node.js runner, reporter events, candidate code, dependencies, and host remain trusted inputs.
|
|
80
|
+
|
|
81
|
+
## Structured command adapter protocol v1
|
|
82
|
+
|
|
83
|
+
The legacy wire identifier `testforge-command` lets any framework participate without moving gate logic into the
|
|
84
|
+
integration.
|
|
85
|
+
|
|
86
|
+
Configure an executable and an argument array:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"kind": "testforge-command",
|
|
91
|
+
"executable": "node",
|
|
92
|
+
"arguments": ["tools/assertledger-reporter.mjs"],
|
|
93
|
+
"protocolVersion": "1.0.0"
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Invocation
|
|
98
|
+
|
|
99
|
+
AssertLedger spawns the command with `shell: false` in a fresh execution workspace. The child receives
|
|
100
|
+
only environment variables named in `isolation.environmentAllowlist`, plus two reserved variables
|
|
101
|
+
injected by AssertLedger:
|
|
102
|
+
|
|
103
|
+
- `TESTFORGE_RESULT_FILE`: absolute path where the adapter must write one UTF-8 JSON result;
|
|
104
|
+
- `TESTFORGE_CANDIDATE_FILES`: JSON array of candidate file paths, empty for a control run.
|
|
105
|
+
|
|
106
|
+
AssertLedger does not expose the world ID or expected outcome through reserved variables. The adapter
|
|
107
|
+
can still inspect the workspace and infer changes. This omission discourages accidental gaming; it
|
|
108
|
+
does not defend against hostile code.
|
|
109
|
+
|
|
110
|
+
### Result contract
|
|
111
|
+
|
|
112
|
+
The adapter must write this strict JSON shape to `TESTFORGE_RESULT_FILE`:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"protocolVersion": "1.0.0",
|
|
117
|
+
"outcome": "ASSERTION_FAILURE",
|
|
118
|
+
"testsDiscovered": 12,
|
|
119
|
+
"candidateTestsDiscovered": 1,
|
|
120
|
+
"attributed": true
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Rules:
|
|
125
|
+
|
|
126
|
+
- `protocolVersion` must equal `1.0.0`;
|
|
127
|
+
- `outcome` must be one of the documented normalized outcomes;
|
|
128
|
+
- both counts must be non-negative integers;
|
|
129
|
+
- `candidateTestsDiscovered` must not exceed `testsDiscovered`;
|
|
130
|
+
- a control must report `candidateTestsDiscovered: 0` and `attributed: false` to pass control gates;
|
|
131
|
+
- `attributed: true` is only valid when `outcome` is `PASS` or `ASSERTION_FAILURE` and
|
|
132
|
+
`candidateTestsDiscovered` is at least `1`; every other `outcome`/`attributed: true` combination,
|
|
133
|
+
including a zero candidate-discovery count, is rejected;
|
|
134
|
+
- `PASS` requires process exit code `0`;
|
|
135
|
+
- every non-`PASS` report requires a non-zero process exit code;
|
|
136
|
+
- `TIMEOUT` is engine-authoritative: an adapter process that finishes and writes `TIMEOUT` produces
|
|
137
|
+
`INFRA_ERROR`; only expiry of the configured engine deadline produces a timeout observation;
|
|
138
|
+
- the report file must not exceed the fixed 64 KiB structured-report limit;
|
|
139
|
+
- a missing, malformed, oversized, attribution-contradictory, or process-contradictory report becomes
|
|
140
|
+
`INFRA_ERROR`;
|
|
141
|
+
- only attributed `ASSERTION_FAILURE` can kill a target in policy v1.
|
|
142
|
+
|
|
143
|
+
### Protocol v1 compatibility note
|
|
144
|
+
|
|
145
|
+
This validation is a fail-closed correction within protocol `1.0.0`, not a new wire shape. Conforming
|
|
146
|
+
v1 adapters require no migration. Adapters that previously emitted `attributed: true` without a
|
|
147
|
+
discovered candidate test, attributed an operational outcome, or self-declared `TIMEOUT` must stop
|
|
148
|
+
doing so; those contradictory reports now become `INFRA_ERROR`.
|
|
149
|
+
|
|
150
|
+
New node:test manifests also record an official profile version, capabilities, the SHA-256 digest of
|
|
151
|
+
the bundled reporter, and deterministic `runtimePreflight` evidence. The shallow assertion rule and
|
|
152
|
+
the corrected `detectsCompileFailure: false` capability change the reporter/profile metadata, so new
|
|
153
|
+
campaign decision and artifact digests change because the evidence context is decision-bound. Legacy
|
|
154
|
+
v1 manifests without this optional metadata remain schema-valid and replayable; they are not silently
|
|
155
|
+
resealed.
|
|
156
|
+
|
|
157
|
+
The 64 KiB report limit is independent of `maximumOutputBytes`, which caps each execution's captured
|
|
158
|
+
stdout and stderr. A small log budget therefore does not truncate controlled report evidence.
|
|
159
|
+
|
|
160
|
+
The adapter is trusted to report discovery, attribution, and outcome accurately. AssertLedger binds the
|
|
161
|
+
configured executable and arguments, protocol version, and normalized observations into manifest
|
|
162
|
+
integrity data. Reproducible deployments should pin the adapter and its resolved dependencies and
|
|
163
|
+
record verifiable provenance outside the free-form provenance label when authenticity matters.
|
|
164
|
+
|
|
165
|
+
### H3 structured-result consistency
|
|
166
|
+
|
|
167
|
+
The separate `TESTFORGE_H3_STRUCTURED_RESULT_V1` replay path binds each canonical result to its run
|
|
168
|
+
receipt. `PASS` requires a zero exit code without timeout; `PROCESS_CRASH` requires a null exit code
|
|
169
|
+
without timeout; `TIMEOUT` requires the timeout flag; and `ASSERTION_FAILURE`, `COMPILE_FAILURE`,
|
|
170
|
+
`COLLECTION_FAILURE`, `INFRA_ERROR`, and `NO_TEST_DISCOVERED` require a nonzero, non-null exit code
|
|
171
|
+
without timeout. A mismatch is invalid structured evidence and cannot become an H3 detection or a
|
|
172
|
+
merely insufficient run.
|
|
173
|
+
|
|
174
|
+
## Strict phase-aware benchmark mode
|
|
175
|
+
|
|
176
|
+
`benchmark-acquire` reuses the same executable and argument array with `shell: false`, but injects
|
|
177
|
+
a distinct contract: `TESTFORGE_BENCHMARK_RESULT_FILE`, `TESTFORGE_CANDIDATE_FILES`,
|
|
178
|
+
`TESTFORGE_BENCHMARK_CACHE_DIR`, `TESTFORGE_BENCHMARK_REGIME`,
|
|
179
|
+
`TESTFORGE_BENCHMARK_ROLE`, and `TESTFORGE_BENCHMARK_ORDINAL`.
|
|
180
|
+
|
|
181
|
+
Successful reports use protocol `1.0.0`, outcome `PASS`, positive candidate discovery with
|
|
182
|
+
attribution, nullable non-negative CPU microseconds, and exactly ordered `STARTUP`,
|
|
183
|
+
`COMPILE_OR_COLLECTION`, and `EXECUTION` safe-integer microseconds. AssertLedger measures
|
|
184
|
+
`PREPARATION` around the fresh repository copy plus REFERENCE and candidate overlays.
|
|
185
|
+
`STARTUP` is adapter-observed initialization, not operating-system spawn latency.
|
|
186
|
+
|
|
187
|
+
Missing, malformed, contradictory, timed-out, non-PASS, or overflowing reports become
|
|
188
|
+
`INCOMPLETE` runs with null timings. They never count as target kills and cannot alter the source
|
|
189
|
+
decision. The phase adapter belongs to the trusted computing base and may ignore the supplied cache
|
|
190
|
+
directory.
|
|
191
|
+
|
|
192
|
+
The runnable
|
|
193
|
+
[`structured-phase-adapter-fixture.mjs`](../examples/agentic-benchmark/structured-phase-adapter-fixture.mjs)
|
|
194
|
+
demonstrates both wire modes with illustrative fixed durations. Real adapters must measure their
|
|
195
|
+
own boundaries. `node-test` is deliberately unsupported because Node 22 and 24 expose no faithful
|
|
196
|
+
public compilation/collection timing boundary.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Agentic Benchmark Artifact v1
|
|
2
|
+
|
|
3
|
+
The Agentic Benchmark Artifact is a deterministic, self-contained cost-evidence document for
|
|
4
|
+
agentic test loops. It records cold and warm measurements separately and publishes phase-level
|
|
5
|
+
wall time plus optional CPU time. It is deliberately separate from the evidence manifest and the
|
|
6
|
+
Agentic Test Profile.
|
|
7
|
+
|
|
8
|
+
## Safety boundary
|
|
9
|
+
|
|
10
|
+
A benchmark can neither create nor remove a `VERIFIED` decision. Creation requires a replay-valid
|
|
11
|
+
source manifest whose decision is already `VERIFIED`, a required reference world, and selected
|
|
12
|
+
`ELIGIBLE` candidates. Failed or incomplete benchmark runs remain visible and never enter
|
|
13
|
+
quantiles.
|
|
14
|
+
|
|
15
|
+
The artifact proves deterministic aggregation and binding of declared measurements. It does not
|
|
16
|
+
authenticate the machine, tools, cache reset, phase reporter, or raw timings. Those remain producer
|
|
17
|
+
and attestation responsibilities.
|
|
18
|
+
|
|
19
|
+
## Acquisition from a fresh campaign
|
|
20
|
+
|
|
21
|
+
`assertledger benchmark-acquire request.json --allow-unsafe-execution --json` embeds a Verification
|
|
22
|
+
Request v1, the fixed Benchmark v1 policy and protocol, a required REFERENCE world, resource
|
|
23
|
+
declarations, and phase-adapter/dependency identity paths.
|
|
24
|
+
|
|
25
|
+
AssertLedger creates one immutable acquisition snapshot. A normal isolated verification campaign runs
|
|
26
|
+
from it. Benchmark processes start only when the fresh manifest is replay-valid and `VERIFIED`, and
|
|
27
|
+
only for source-selected `ELIGIBLE` candidates. Every timing run uses a fresh workspace and process.
|
|
28
|
+
Each COLD run receives a unique empty cache directory; each candidate receives a private, initially
|
|
29
|
+
empty WARM directory retained across its warmups and measurements.
|
|
30
|
+
|
|
31
|
+
The result embeds the untouched source manifest, a nullable Benchmark Artifact v1, snapshot,
|
|
32
|
+
executable, argument, adapter-identity and dependency digests, the cache policy, and canonical
|
|
33
|
+
request/result digests. Timing failures cannot rewrite the embedded decision or its source digests.
|
|
34
|
+
|
|
35
|
+
`benchmark-acquire-replay` recomputes the result digest and independently checks schema validity,
|
|
36
|
+
source-manifest replay, exact source/artifact binding, artifact replay, context/fingerprint binding,
|
|
37
|
+
and exact status precedence and reason codes. Re-digesting a modified status, context, source, or
|
|
38
|
+
artifact does not make the acquisition result valid.
|
|
39
|
+
|
|
40
|
+
The phase-adapter fingerprint binds the declared identity-file path together with the adapter
|
|
41
|
+
arguments and identity digest. Changing only `identityFilePath` and recomputing `resultDigest`
|
|
42
|
+
therefore fails context replay.
|
|
43
|
+
|
|
44
|
+
`SOURCE_NOT_VERIFIED` results intentionally have no Benchmark Artifact or fingerprint. Their source
|
|
45
|
+
manifest, status semantics, and result digest can replay independently, but adapter/dependency
|
|
46
|
+
identity digests have no independent anchor. `contextBindingValid` and aggregate `valid` are
|
|
47
|
+
therefore false. This does not change or invalidate the embedded source campaign decision; it avoids
|
|
48
|
+
claiming identity authentication that the null-artifact result cannot provide.
|
|
49
|
+
|
|
50
|
+
The acquisition schemas are additive. Existing hand-authored Benchmark Request/Artifact v1 flows
|
|
51
|
+
remain compatible. There is no automatic migration because acquisition requires unsafe-execution
|
|
52
|
+
authority and explicit identity paths.
|
|
53
|
+
|
|
54
|
+
## Fixed protocol
|
|
55
|
+
|
|
56
|
+
Version 1 uses:
|
|
57
|
+
|
|
58
|
+
- a monotonic clock;
|
|
59
|
+
- safe-integer microseconds;
|
|
60
|
+
- nearest-rank quantiles without interpolation;
|
|
61
|
+
- four ordered phases: `PREPARATION`, `STARTUP`, `COMPILE_OR_COLLECTION`, and `EXECUTION`;
|
|
62
|
+
- cold runs in a fresh workspace and process after resetting declared caches; and
|
|
63
|
+
- warm runs in a fresh workspace and process while retaining declared caches, after at least one
|
|
64
|
+
recorded warmup.
|
|
65
|
+
|
|
66
|
+
"Declared caches" excludes implicit operating-system caches. AssertLedger never claims to purge or
|
|
67
|
+
control them.
|
|
68
|
+
|
|
69
|
+
## Fingerprint and comparison scope
|
|
70
|
+
|
|
71
|
+
The request declares an opaque portable `environmentId`, OS and CPU descriptors, optional resource
|
|
72
|
+
limits, tool digests, dependency graph digest, and phase-reporter digest. Hostnames, serial numbers,
|
|
73
|
+
absolute paths, and environment values are outside the contract.
|
|
74
|
+
|
|
75
|
+
The artifact binds a `comparisonScopeDigest` over the environment fingerprint, protocol, source
|
|
76
|
+
decision, and required reference world. Two artifacts are comparable only when this digest is
|
|
77
|
+
identical. Matching labels or apparently similar machines are not enough.
|
|
78
|
+
|
|
79
|
+
## Run plan
|
|
80
|
+
|
|
81
|
+
The policy declares exact counts for cold measurements, warmups, and warm measurements. Ordinals
|
|
82
|
+
are contiguous per candidate, regime, and role. A complete run must pass and its total must equal
|
|
83
|
+
the exact sum of all four phases. An incomplete run preserves its non-pass outcome with null timing.
|
|
84
|
+
|
|
85
|
+
For each candidate and regime, the artifact reports:
|
|
86
|
+
|
|
87
|
+
- `MEASURED`, `INSUFFICIENT_SAMPLES`, or `OBSERVED_RUN_FAILURE`;
|
|
88
|
+
- planned, recorded, accepted, failed, and warmup counts;
|
|
89
|
+
- min, p50, p95, and max for total wall time and every phase; and
|
|
90
|
+
- CPU availability as `UNAVAILABLE`, `PARTIAL`, or `COMPLETE`.
|
|
91
|
+
|
|
92
|
+
CPU quantiles exist only when every accepted measurement has CPU time. Missing CPU evidence is not
|
|
93
|
+
converted to zero.
|
|
94
|
+
|
|
95
|
+
## Interfaces
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
assertledger benchmark benchmark-request.json --json
|
|
99
|
+
assertledger benchmark-replay benchmark-artifact.json --json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The SDK exposes `AssertLedger.benchmark()` and `AssertLedger.replayBenchmark()`. The read-only MCP server
|
|
103
|
+
exposes the preferred `assertledger_benchmark` and `assertledger_benchmark_replay` tools alongside the
|
|
104
|
+
legacy `testforge_benchmark` and `testforge_benchmark_replay` aliases.
|
|
105
|
+
|
|
106
|
+
Exit code `0` means every regime is `MEASURED`; `2` means at least one observed run failure; `3`
|
|
107
|
+
means timing evidence is insufficient; `4` means invalid input or replay.
|
|
108
|
+
|
|
109
|
+
The built-in `node:test` reporter does not currently emit trustworthy phase markers. AssertLedger can
|
|
110
|
+
therefore consume a correctly attributed request from an external phase reporter, but it does not
|
|
111
|
+
yet acquire this artifact automatically from `node:test`. Unsupported acquisition must fail closed;
|
|
112
|
+
it must never synthesize phases from the existing process wall time.
|
|
113
|
+
|
|
114
|
+
## Replay rails
|
|
115
|
+
|
|
116
|
+
Replay independently checks schema validity, source replay, source binding, policy, protocol and
|
|
117
|
+
fingerprint digests, comparison scope, artifact digest, and recomputed summary semantics. A replay-
|
|
118
|
+
valid artifact may still contain insufficient samples or observed failures.
|