Authorized scope
- transactions.ts
Validated changed files
- transactions.ts
Read-only evidence · recorded runs and replay
REPAIR HISTORY
Review the evidence Codex received, the change it made, and the checks that followed.
The recorded contract hash matches the bundled catalog.
393639a7598c4d24ad147dc5f8a1dfe1448355721527f125b649ba6e8ed674bbThe Windows sandbox verified the original repository read denial. The separate patch gate checked file scope and protected hashes.
The sender debit and recipient credit are applied in one balance update.
transfer(ledger, transaction) { if (ledger.history.some((entry) => entry.id === transaction.id)) throw new Error("Transaction identifier already used."); validateTransfer(ledger, transaction);- const { recipient, cents } = transaction;+ const { sender, recipient, cents } = transaction; return {- balances: { ...ledger.balances, [recipient]: ledger.balances[recipient] + cents },+ balances: {+ ...ledger.balances,+ [sender]: ledger.balances[sender] - cents,+ [recipient]: ledger.balances[recipient] + cents,+ }, history: [transaction, ...ledger.history], }; },The reconstructed packet matches the original packet SHA-256.
2ca6c799a1a3547a16cbbfbf6793c88304bb598023d2e1952a94028d82fefcd3{
"contractId": "INV-001",
"contractSha256": "393639a7598c4d24ad147dc5f8a1dfe1448355721527f125b649ba6e8ed674bb",
"objectiveSha256": "693753f35149bd7a50f80c3c3a2f2bdb5978d6fc24fc5ad812d1b2a2f6348552",
"businessRule": "A completed transfer preserves the sum of the sender and recipient balances.",
"objective": "Click Reset demo state. Store the displayed Alice balance as 'before_sender'. Store the displayed Bob balance as 'before_recipient'. With Sender Alice and Recipient Bob, enter 100.00 in Amount (USD) and click Send transfer exactly once. Confirm the page displays Transfer completed. Store the displayed Alice balance as 'after_sender'. Store the displayed Bob balance as 'after_recipient'. Finish. Store the displayed currency text exactly.",
"executionId": "b8ceda9f-bd63-45c2-8938-8e0da89e4647",
"observations": {
"before_sender": {
"value": "$1,000.00",
"provenance": {
"source": "kane",
"executionId": "b8ceda9f-bd63-45c2-8938-8e0da89e4647",
"field": "before_sender",
"stdoutSha256": "16b83ccb2205a0b013d194be2d9c14d23d9860b8820d0a88c8677c687e4dd50a"
}
},
"before_recipient": {
"value": "$500.00",
"provenance": {
"source": "kane",
"executionId": "b8ceda9f-bd63-45c2-8938-8e0da89e4647",
"field": "before_recipient",
"stdoutSha256": "16b83ccb2205a0b013d194be2d9c14d23d9860b8820d0a88c8677c687e4dd50a"
}
},
"after_sender": {
"value": "$1,000.00",
"provenance": {
"source": "kane",
"executionId": "b8ceda9f-bd63-45c2-8938-8e0da89e4647",
"field": "after_sender",
"stdoutSha256": "16b83ccb2205a0b013d194be2d9c14d23d9860b8820d0a88c8677c687e4dd50a"
}
},
"after_recipient": {
"value": "$600.00",
"provenance": {
"source": "kane",
"executionId": "b8ceda9f-bd63-45c2-8938-8e0da89e4647",
"field": "after_recipient",
"stdoutSha256": "16b83ccb2205a0b013d194be2d9c14d23d9860b8820d0a88c8677c687e4dd50a"
}
}
},
"expected": {
"relationship": "sum(after balances) = sum(before balances)",
"totalCents": 150000
},
"actual": {
"beforeTotalCents": 150000,
"afterTotalCents": 160000,
"relationship": "Combined balance changed after the transfer.",
"differenceCents": 10000
},
"browserEvidence": {
"stdoutSha256": "16b83ccb2205a0b013d194be2d9c14d23d9860b8820d0a88c8677c687e4dd50a",
"stderrSha256": "b2cb4b1668d501673567b64a701a099d7aa41ddca3038563a92d5689d93090ea",
"sessionId": "daadf386-db01-4a9b-9caf-aedb85c0c03e",
"kaneRunId": "run-0"
},
"allowedPaths": [
"transactions.ts"
]
}POST-REPAIR COVERAGE
The same conservation contract evaluated each of these recorded transfers.
| Amount | Alice | Bob | Expected / observed | Kane | Invariant |
|---|---|---|---|---|---|
| $10.00 | $1,000.00 → $990.00 | $500.00 → $510.00 | $1,500.00 / $1,500.00 | PASSED | SATISFIED |
| $100.00 | $1,000.00 → $900.00 | $500.00 → $600.00 | $1,500.00 / $1,500.00 | PASSED | SATISFIED |
| $250.00 | $1,000.00 → $750.00 | $500.00 → $750.00 | $1,500.00 / $1,500.00 | PASSED | SATISFIED |