mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
66fbe7ce12
Closes the gap raised by ruflo#3069: ADR-322C required independent statistical recomputation but specified only the bootstrap seed, not the generator it drives. A verifier could not reproduce a receipt's statistics from the document - the only way to recompute correctly was to read flywheel-receipt.ts, which is a copy rather than an independent check. Appends an "Update (2026-08-19)" section per this repo's ADR convention (ADR-380) rather than editing the text above. It makes normative: the LCG and its constants, the seeding rule and exact byte slice, the resampling procedure and draw order, the quantile rule, tie/edge cases, and the scale-12 decimal encoding the statistics must reproduce byte-for-byte. It also records the ledger divergence (flat unsigned commits[] on main vs the content-addressed segments and signed head the ADR describes, with flywheel-ledger-head/v1 unused), the disabled projection path, and that strictness is versioned. Acceptance is demonstrated, not asserted: conformance/recompute_reference.py is written only from the amendment prose, in a different language from the reference implementation, and reproduces the fixture exactly. Adds receipt-bootstrap-reference.example.json because the existing example turned out not to discriminate - its deltas take two distinct values, so a wrong seed slice, wrong byte order, or entirely different LCG constants all yield the same 2.5th percentile. The new fixture has heterogeneous deltas and separates all three. Records one defect found while building it (gap G5): createFlywheelReceipt computes statistics from full-precision means while storing scale-12 strings, so a receipt whose mean needs more than twelve decimals fails its own verifyFlywheelReceipt. Reproduced at mean 0.7687083333333332. Existing fixtures use exactly-representable means, which is why it was not caught. Co-Authored-By: claude-flow <ruv@ruv.net>
262 lines
7.0 KiB
JSON
262 lines
7.0 KiB
JSON
{
|
|
"payload": {
|
|
"schemaVersion": "ruflo.flywheel-receipt/v1",
|
|
"lineageId": "0198f2a0-0000-7000-8000-00000000b1c2",
|
|
"candidateId": "sha256:61c84d2769efc8fa1f5e76d2c3d645763cf013a38fa658edaccaede460a172a2",
|
|
"evaluationRunId": "0198f2a0-0000-7000-8000-00000000d3e4",
|
|
"baselineRef": "sha256:3f786850e387550fdab836ed7e6dc881de23001b0b4b1b0f0a1a2b3c4d5e6f70",
|
|
"expectedLedgerHead": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"candidatePolicy": {
|
|
"hnswEf": 128,
|
|
"hybridWeight": "0.65",
|
|
"rerankDepth": 24
|
|
},
|
|
"gateVersion": "ruflo.flywheel-gate/v1",
|
|
"policySchemaVersion": "ruflo.retrieval-policy/v1",
|
|
"safetyEnvelopeRef": "sha256:9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa",
|
|
"anchorRef": "sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
|
|
"requestedProposer": "auto",
|
|
"effectiveProposer": "local",
|
|
"corpusVersion": "pir-conformance-corpus/2026-08-19",
|
|
"corpusHash": "sha256:fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.7703",
|
|
"heldOutDeltas": [
|
|
"0.021",
|
|
"0.137",
|
|
"0.048",
|
|
"0.092",
|
|
"0.006",
|
|
"0.113",
|
|
"0.034",
|
|
"0.159",
|
|
"0.017",
|
|
"0.071",
|
|
"0.128",
|
|
"0.055",
|
|
"0.083",
|
|
"-0.012",
|
|
"0.101",
|
|
"0.029",
|
|
"0.146",
|
|
"0.064",
|
|
"0.038",
|
|
"0.076"
|
|
],
|
|
"pairedOutcomes": [
|
|
{
|
|
"taskId": "task-01",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.721"
|
|
},
|
|
{
|
|
"taskId": "task-02",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.837"
|
|
},
|
|
{
|
|
"taskId": "task-03",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.748"
|
|
},
|
|
{
|
|
"taskId": "task-04",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.792"
|
|
},
|
|
{
|
|
"taskId": "task-05",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.706"
|
|
},
|
|
{
|
|
"taskId": "task-06",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.813"
|
|
},
|
|
{
|
|
"taskId": "task-07",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.734"
|
|
},
|
|
{
|
|
"taskId": "task-08",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.859"
|
|
},
|
|
{
|
|
"taskId": "task-09",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.717"
|
|
},
|
|
{
|
|
"taskId": "task-10",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.771"
|
|
},
|
|
{
|
|
"taskId": "task-11",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.828"
|
|
},
|
|
{
|
|
"taskId": "task-12",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.755"
|
|
},
|
|
{
|
|
"taskId": "task-13",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.783"
|
|
},
|
|
{
|
|
"taskId": "task-14",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.688"
|
|
},
|
|
{
|
|
"taskId": "task-15",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.801"
|
|
},
|
|
{
|
|
"taskId": "task-16",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.729"
|
|
},
|
|
{
|
|
"taskId": "task-17",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.846"
|
|
},
|
|
{
|
|
"taskId": "task-18",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.764"
|
|
},
|
|
{
|
|
"taskId": "task-19",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.738"
|
|
},
|
|
{
|
|
"taskId": "task-20",
|
|
"baselineScore": "0.7",
|
|
"candidateScore": "0.776"
|
|
}
|
|
],
|
|
"statistics": {
|
|
"ruleVersion": "ruflo.flywheel-gate/v1",
|
|
"relativeLift": "0.100428571429",
|
|
"pairedBootstrapProbability": "1",
|
|
"pairedBootstrapDeltaCILow95": "0.0489",
|
|
"frozenAnchorRegression": "0",
|
|
"iterations": 10000,
|
|
"seedHex": "167c9185d76163dfa69ae57c11af813669a6353abcb49d7af673acf918f3a7c3",
|
|
"significant": true,
|
|
"accepted": true
|
|
},
|
|
"gates": {
|
|
"heldOutImproves": true,
|
|
"frozenAnchorNoRegression": true,
|
|
"driftWithinBound": true,
|
|
"replayDeterministic": true,
|
|
"receiptCoverage": true,
|
|
"canaryNoWorse": true
|
|
},
|
|
"resourceEvidence": {
|
|
"p95LatencyMicros": 412000,
|
|
"costMicrosPerTask": 1850,
|
|
"tokensPerTask": 3120,
|
|
"failureRate": "0",
|
|
"evaluationCostMicros": 29600,
|
|
"currency": "USD"
|
|
},
|
|
"evidence": {
|
|
"corpusRoles": {
|
|
"selectionTaskIds": [
|
|
"sel-01",
|
|
"sel-02",
|
|
"sel-03"
|
|
],
|
|
"promotionHoldoutTaskIds": [
|
|
"task-01",
|
|
"task-02",
|
|
"task-03",
|
|
"task-04",
|
|
"task-05",
|
|
"task-06",
|
|
"task-07",
|
|
"task-08",
|
|
"task-09",
|
|
"task-10",
|
|
"task-11",
|
|
"task-12",
|
|
"task-13",
|
|
"task-14",
|
|
"task-15",
|
|
"task-16",
|
|
"task-17",
|
|
"task-18",
|
|
"task-19",
|
|
"task-20"
|
|
],
|
|
"guardTaskIds": [
|
|
"anchor-01",
|
|
"anchor-02"
|
|
]
|
|
},
|
|
"verification": {
|
|
"replayTranscriptRef": "sha256:1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9"
|
|
},
|
|
"canary": {
|
|
"rollbackRate": "0",
|
|
"sliceRef": "sha256:0263829989b6fd954f72baaf2fc64bc2e2f01d692d4de72986ea808f6e99813f"
|
|
}
|
|
},
|
|
"termVerification": [
|
|
{
|
|
"term": "heldOutImproves",
|
|
"verification": "recomputed",
|
|
"evidenceRef": "inline:pairedOutcomes"
|
|
},
|
|
{
|
|
"term": "frozenAnchorNoRegression",
|
|
"verification": "recomputed",
|
|
"evidenceRef": "inline:statistics.frozenAnchorRegression"
|
|
},
|
|
{
|
|
"term": "driftWithinBound",
|
|
"verification": "recomputed",
|
|
"evidenceRef": "inline:evidence.verification"
|
|
},
|
|
{
|
|
"term": "replayDeterministic",
|
|
"verification": "recomputed",
|
|
"evidenceRef": "sha256:1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9"
|
|
},
|
|
{
|
|
"term": "receiptCoverage",
|
|
"verification": "recomputed",
|
|
"evidenceRef": "inline:evidence.corpusRoles"
|
|
},
|
|
{
|
|
"term": "canaryNoWorse",
|
|
"verification": "signature-verified",
|
|
"evidenceRef": "sha256:0263829989b6fd954f72baaf2fc64bc2e2f01d692d4de72986ea808f6e99813f",
|
|
"attestor": "ruflo-canary-runner/v1"
|
|
}
|
|
],
|
|
"decision": "accepted",
|
|
"issuedAt": "2026-08-19T00:00:00.000Z",
|
|
"expiresAt": "2026-08-20T00:00:00.000Z",
|
|
"receiptId": "sha256:013a3ab18ec9ddec4cb0a2544bdd1bb9189b3859a9f919ce1d7dcbc6b1b7b913"
|
|
},
|
|
"signature": {
|
|
"algorithm": "ed25519",
|
|
"domain": "ruflo/flywheel-receipt/v1",
|
|
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAqNSpk4jp2Y7WJ3jzCgOiXnVFKQKm5R7266xFiPWUU0s=\n-----END PUBLIC KEY-----\n",
|
|
"signatureBase64": "LWwGMjiZtZbt5mEB4MGl4HAWfxGO5j4H/n19gLJ9dswmjCdmkIJaPD0Xnp6tfeAPuvcxMALx16Wx80MKQdMlBw=="
|
|
}
|
|
}
|