{"mode":"live","about":"Known-answer tests for the Clasig receipt algorithm. An implementation is correct when it reproduces every canonical string and hash, accepts the valid record, returns the expected result for every tampered record and reproduces the root.","note":"The examples are registered live records, not executions. Modelled result in R after spread and fee under each scenario's published evaluation version. Not an execution, not a forecast. Bound for an unresolved scenario, if counted as a loss; null when no bound is established, including publication overlap.","algorithm":["A record is {scenario, events}. Each event has exactly the fields scenarioId, seq, type, at, data, prevHash and hash.","canonicalJson(value) is the JSON Canonicalization Scheme, RFC 8785 (JCS), so any JCS library computes it: JSON with no whitespace; object keys sorted by UTF-16 code unit order (keys whose value is undefined are dropped); strings escaped exactly as JavaScript JSON.stringify (ES2019) escapes them; numbers read as IEEE-754 doubles and written as JavaScript writes them: the shortest digits that round-trip, plain decimal when 1e-6 <= |x| < 1e21 (0.00007, 5, never 5.0), otherwise exponent form (1e-7, 1e+21); -0 is written 0. Non-finite numbers are invalid.","sha256hex(text): SHA-256 of the UTF-8 bytes of text, as 64 lowercase hex characters.","Every event: hash = sha256hex(canonicalJson({scenarioId, seq, type, at, data, prevHash})), and scenarioId = scenario.id.","Event 0 has type \"published\", prevHash = 64 zeros and data.scenarioHash = sha256hex(canonicalJson(scenario)), which binds the whole scenario (text, plan, reasons, evaluation and data basis) to the receipt.","Event n > 0 has seq = n and prevHash = the hash of event n-1.","The receipt is the hash of the last event.","Checks run in this order and the first failure is reported with the failing event's own seq field: the first event is not \"published\" (seq 0); then, event by event, scenarioId differs from scenario.id (\"event belongs to another scenario\"), seq differs from its position (\"sequence gap\"), prevHash differs (\"chain broken\"), the recomputed hash differs (\"event altered\"), and for event 0 the scenarioHash differs (\"scenario content altered after publication\").","archiveRoot = sha256hex(canonicalJson([[scenarioId, receipt], ...])) over every record, pairs sorted by scenarioId in UTF-16 code unit order, ids unique. root.json lists the heads as [scenarioId, receipt, eventCount].","Store the receipts, root and heads you read. Later, each stored head [scenarioId, receipt, eventCount] must still be the hash of event eventCount-1 of that scenario: a missing scenario or a different hash means history was rewritten. A chain cut back to an earlier event still verifies on its own, so only a stored receipt or head catches a removed newest event.","Python: use an RFC 8785 library (pip install jcs, then sha256 of jcs.canonicalize(value)). A plain json.dumps(sort_keys=True, separators=(\",\", \":\"), ensure_ascii=False) is wrong for floats: Python writes 7e-05 where JavaScript writes 0.00007 (every EURUSD and GBPUSD scenario has fee 0.00007) and 1e-07 where JavaScript writes 1e-7. Check any implementation against the test vectors.","A valid receipt verifies internal consistency. Comparison with an earlier held receipt or head can detect a later rewrite. This does not establish independent publication time, scenario quality or an executed trade."],"canonicalJson":[{"name":"keys sorted, no whitespace","input":{"b":1,"a":[true,null,"x"],"c":{"z":0,"y":"q"}},"canonical":"{\"a\":[true,null,\"x\"],\"b\":1,\"c\":{\"y\":\"q\",\"z\":0}}","sha256":"de70d971ce7de3640e69da512985a43a03776579bed82b10a3a5eed1e9630e1a"},{"name":"keys sorted by UTF-16 code unit: uppercase before lowercase","input":{"0":4,"a":1,"B":2,"_":3},"canonical":"{\"0\":4,\"B\":2,\"_\":3,\"a\":1}","sha256":"900568b10451a3e2088be929cacd82f5be4385f0f16503b42892b5d45eca42c0"},{"name":"JavaScript number output: a plain Python json.dumps gets fee and small wrong","input":{"fee":0.00007,"small":1e-7,"frac":0.30000000000000004,"big":1e+21,"tiny":5e-324},"canonical":"{\"big\":1e+21,\"fee\":0.00007,\"frac\":0.30000000000000004,\"small\":1e-7,\"tiny\":5e-324}","sha256":"e773ad7d1348407c5209e32abbfba05a0030abee9720ecffa2d2f46c2abe218a"},{"name":"integers and negative decimals as written by JSON.stringify","input":{"at":1785621660000,"r":-1.0270022,"zero":0},"canonical":"{\"at\":1785621660000,\"r\":-1.0270022,\"zero\":0}","sha256":"24440e6d3654af9223a14268fff4800dd9c5539be321dead45cdd16b6fb3a236"},{"name":"strings escaped as JSON.stringify does; non-ASCII kept as UTF-8","input":{"s":"line\nbreak\t\"quoted\" \\ slash / é – 📈"},"canonical":"{\"s\":\"line\\nbreak\\t\\\"quoted\\\" \\\\ slash / é – 📈\"}","sha256":"812bd40be03eb2d2e691b399b13b3bd4fd4e1c756bbc5a212145c54decba924e"}],"validRecord":{"record":{"scenario":{"id":"d4e49bbcf0382614","instrumentId":"GBPUSD","timeframe":"H1","detector":{"id":"range-breakout","version":1,"name":"Range breakout"},"publishedAt":1794589544064,"signalBarClose":1794589200000,"plan":{"direction":"short","trigger":1.32091,"invalidateOnClose":1.32266,"stop":1.32349,"target":1.31761},"summary":"Bearish range breakout scenario on GBPUSD H1: it triggers only if price trades at or below 1.32091 within 4 bars. A close above 1.32266 first invalidates it.","conditions":["Trigger: a trade at or below 1.32091 by 2026-11-13 21:00 UTC (4 bars).","Invalidated before trigger: any bar closing above 1.32266.","After trigger: protective level 1.32349, objective 1.31761, time limit 36 bars.","Evaluation eval.v1: mid prices, assumed spread 0.00015 and fee 0.00007 per round trip; a bar touching both sides is unresolved; a bar that opens beyond the objective assumes no entry and expires the scenario."],"changeTriggers":["A close above 1.32266 before the trigger invalidates the scenario.","No trade through 1.32091 by 2026-11-13 21:00 UTC expires it, as does an opening gap beyond 1.31761.","A close back inside the range beyond 1.32267 would mark the breakout as failed."],"reasons":[{"key":"range.compression","text":"The prior 24-bar range 1.32184 to 1.32514 spans 2.15 ATR (rule: at most 4.0).","values":{"range_low":1.32184,"range_high":1.32514,"width_atr":2.152787594368508}},{"key":"range.decisive_close","text":"The signal bar closed 1.32119, below the range low by at least 0.1 ATR.","values":{"close":1.32119,"edge":1.32184,"atr14":0.0015328962358537245}}],"riskFactors":[{"key":"session.weekly_close","severity":"caution","text":"The weekly market close falls inside the scenario window: reopening gaps can skip levels."},{"key":"data.unlicensed","severity":"caution","text":"Reference data without a confirmed display grant."}],"evaluation":{"id":"eval.v1","spread":0.00015,"fee":0.00007,"ambiguousIntrabar":"unresolved","maxHoldBars":36,"triggerWindowBars":4},"dataBasis":{"sourceId":"market-data-hub-h1","sourceLabel":"Market Data Hub closed hourly bars (Twelve Data; OKX BTC/USDT)","sourceKind":"reference","delaySeconds":300,"rightsProfile":"hub-owner-confirmed-display-api-2026-11-13","barCount":361,"firstBarOpen":1792771200000,"lastBarClose":1794589200000,"inputHash":"b7e50a6d0fbe37986fc1087c258335a156784b6de294b1ddf90cb10c81af124d"}},"events":[{"scenarioId":"d4e49bbcf0382614","seq":0,"type":"published","at":1794589544064,"data":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027"},"prevHash":"0000000000000000000000000000000000000000000000000000000000000000","hash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f"},{"scenarioId":"d4e49bbcf0382614","seq":1,"type":"triggered","at":1794592800000,"data":{"level":1.32091,"fill":1.320835,"gapped":false},"prevHash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f","hash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee"},{"scenarioId":"d4e49bbcf0382614","seq":2,"type":"correction","at":1794625484785,"data":{"status":"unresolved","exit":null,"netR":null,"conservativeR":null,"unresolvedReason":"source_revision","origin":"source_revision","reason":"The price source revised an earlier hourly bar. The original plan and earlier events are retained.","sourceRevision":"{\"policy\":\"source_revision_unresolved.v1\",\"instrumentId\":\"GBPUSD\",\"original\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32075},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"volumeKind\":\"unavailable\",\"requestStartedAt\":1794592800902,\"fetchedAt\":1794592801464},\"observedAt\":1794592844652},\"revised\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32078},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"requestStartedAt\":1794606900288,\"fetchedAt\":1794606900696},\"observedAt\":1794625484617}}"},"prevHash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee","hash":"1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"}]},"expected":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027","eventHashes":["bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f","e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee","1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"],"receipt":"1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"}},"tampered":[{"description":"the objective (plan.target) was moved after publication","record":{"scenario":{"id":"d4e49bbcf0382614","instrumentId":"GBPUSD","timeframe":"H1","detector":{"id":"range-breakout","version":1,"name":"Range breakout"},"publishedAt":1794589544064,"signalBarClose":1794589200000,"plan":{"direction":"short","trigger":1.32091,"invalidateOnClose":1.32266,"stop":1.32349,"target":2.31761},"summary":"Bearish range breakout scenario on GBPUSD H1: it triggers only if price trades at or below 1.32091 within 4 bars. A close above 1.32266 first invalidates it.","conditions":["Trigger: a trade at or below 1.32091 by 2026-11-13 21:00 UTC (4 bars).","Invalidated before trigger: any bar closing above 1.32266.","After trigger: protective level 1.32349, objective 1.31761, time limit 36 bars.","Evaluation eval.v1: mid prices, assumed spread 0.00015 and fee 0.00007 per round trip; a bar touching both sides is unresolved; a bar that opens beyond the objective assumes no entry and expires the scenario."],"changeTriggers":["A close above 1.32266 before the trigger invalidates the scenario.","No trade through 1.32091 by 2026-11-13 21:00 UTC expires it, as does an opening gap beyond 1.31761.","A close back inside the range beyond 1.32267 would mark the breakout as failed."],"reasons":[{"key":"range.compression","text":"The prior 24-bar range 1.32184 to 1.32514 spans 2.15 ATR (rule: at most 4.0).","values":{"range_low":1.32184,"range_high":1.32514,"width_atr":2.152787594368508}},{"key":"range.decisive_close","text":"The signal bar closed 1.32119, below the range low by at least 0.1 ATR.","values":{"close":1.32119,"edge":1.32184,"atr14":0.0015328962358537245}}],"riskFactors":[{"key":"session.weekly_close","severity":"caution","text":"The weekly market close falls inside the scenario window: reopening gaps can skip levels."},{"key":"data.unlicensed","severity":"caution","text":"Reference data without a confirmed display grant."}],"evaluation":{"id":"eval.v1","spread":0.00015,"fee":0.00007,"ambiguousIntrabar":"unresolved","maxHoldBars":36,"triggerWindowBars":4},"dataBasis":{"sourceId":"market-data-hub-h1","sourceLabel":"Market Data Hub closed hourly bars (Twelve Data; OKX BTC/USDT)","sourceKind":"reference","delaySeconds":300,"rightsProfile":"hub-owner-confirmed-display-api-2026-11-13","barCount":361,"firstBarOpen":1792771200000,"lastBarClose":1794589200000,"inputHash":"b7e50a6d0fbe37986fc1087c258335a156784b6de294b1ddf90cb10c81af124d"}},"events":[{"scenarioId":"d4e49bbcf0382614","seq":0,"type":"published","at":1794589544064,"data":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027"},"prevHash":"0000000000000000000000000000000000000000000000000000000000000000","hash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f"},{"scenarioId":"d4e49bbcf0382614","seq":1,"type":"triggered","at":1794592800000,"data":{"level":1.32091,"fill":1.320835,"gapped":false},"prevHash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f","hash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee"},{"scenarioId":"d4e49bbcf0382614","seq":2,"type":"correction","at":1794625484785,"data":{"status":"unresolved","exit":null,"netR":null,"conservativeR":null,"unresolvedReason":"source_revision","origin":"source_revision","reason":"The price source revised an earlier hourly bar. The original plan and earlier events are retained.","sourceRevision":"{\"policy\":\"source_revision_unresolved.v1\",\"instrumentId\":\"GBPUSD\",\"original\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32075},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"volumeKind\":\"unavailable\",\"requestStartedAt\":1794592800902,\"fetchedAt\":1794592801464},\"observedAt\":1794592844652},\"revised\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32078},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"requestStartedAt\":1794606900288,\"fetchedAt\":1794606900696},\"observedAt\":1794625484617}}"},"prevHash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee","hash":"1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"}]},"expected":{"ok":false,"failure":{"seq":0,"problem":"scenario content altered after publication"}}},{"description":"the summary text was edited after publication","record":{"scenario":{"id":"d4e49bbcf0382614","instrumentId":"GBPUSD","timeframe":"H1","detector":{"id":"range-breakout","version":1,"name":"Range breakout"},"publishedAt":1794589544064,"signalBarClose":1794589200000,"plan":{"direction":"short","trigger":1.32091,"invalidateOnClose":1.32266,"stop":1.32349,"target":1.31761},"summary":"Bearish range breakout scenario on GBPUSD H1: it triggers only if price trades at or below 1.32091 within 4 bars. A close above 1.32266 first invalidates it. (edited)","conditions":["Trigger: a trade at or below 1.32091 by 2026-11-13 21:00 UTC (4 bars).","Invalidated before trigger: any bar closing above 1.32266.","After trigger: protective level 1.32349, objective 1.31761, time limit 36 bars.","Evaluation eval.v1: mid prices, assumed spread 0.00015 and fee 0.00007 per round trip; a bar touching both sides is unresolved; a bar that opens beyond the objective assumes no entry and expires the scenario."],"changeTriggers":["A close above 1.32266 before the trigger invalidates the scenario.","No trade through 1.32091 by 2026-11-13 21:00 UTC expires it, as does an opening gap beyond 1.31761.","A close back inside the range beyond 1.32267 would mark the breakout as failed."],"reasons":[{"key":"range.compression","text":"The prior 24-bar range 1.32184 to 1.32514 spans 2.15 ATR (rule: at most 4.0).","values":{"range_low":1.32184,"range_high":1.32514,"width_atr":2.152787594368508}},{"key":"range.decisive_close","text":"The signal bar closed 1.32119, below the range low by at least 0.1 ATR.","values":{"close":1.32119,"edge":1.32184,"atr14":0.0015328962358537245}}],"riskFactors":[{"key":"session.weekly_close","severity":"caution","text":"The weekly market close falls inside the scenario window: reopening gaps can skip levels."},{"key":"data.unlicensed","severity":"caution","text":"Reference data without a confirmed display grant."}],"evaluation":{"id":"eval.v1","spread":0.00015,"fee":0.00007,"ambiguousIntrabar":"unresolved","maxHoldBars":36,"triggerWindowBars":4},"dataBasis":{"sourceId":"market-data-hub-h1","sourceLabel":"Market Data Hub closed hourly bars (Twelve Data; OKX BTC/USDT)","sourceKind":"reference","delaySeconds":300,"rightsProfile":"hub-owner-confirmed-display-api-2026-11-13","barCount":361,"firstBarOpen":1792771200000,"lastBarClose":1794589200000,"inputHash":"b7e50a6d0fbe37986fc1087c258335a156784b6de294b1ddf90cb10c81af124d"}},"events":[{"scenarioId":"d4e49bbcf0382614","seq":0,"type":"published","at":1794589544064,"data":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027"},"prevHash":"0000000000000000000000000000000000000000000000000000000000000000","hash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f"},{"scenarioId":"d4e49bbcf0382614","seq":1,"type":"triggered","at":1794592800000,"data":{"level":1.32091,"fill":1.320835,"gapped":false},"prevHash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f","hash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee"},{"scenarioId":"d4e49bbcf0382614","seq":2,"type":"correction","at":1794625484785,"data":{"status":"unresolved","exit":null,"netR":null,"conservativeR":null,"unresolvedReason":"source_revision","origin":"source_revision","reason":"The price source revised an earlier hourly bar. The original plan and earlier events are retained.","sourceRevision":"{\"policy\":\"source_revision_unresolved.v1\",\"instrumentId\":\"GBPUSD\",\"original\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32075},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"volumeKind\":\"unavailable\",\"requestStartedAt\":1794592800902,\"fetchedAt\":1794592801464},\"observedAt\":1794592844652},\"revised\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32078},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"requestStartedAt\":1794606900288,\"fetchedAt\":1794606900696},\"observedAt\":1794625484617}}"},"prevHash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee","hash":"1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"}]},"expected":{"ok":false,"failure":{"seq":0,"problem":"scenario content altered after publication"}}},{"description":"an event result was edited in place","record":{"scenario":{"id":"d4e49bbcf0382614","instrumentId":"GBPUSD","timeframe":"H1","detector":{"id":"range-breakout","version":1,"name":"Range breakout"},"publishedAt":1794589544064,"signalBarClose":1794589200000,"plan":{"direction":"short","trigger":1.32091,"invalidateOnClose":1.32266,"stop":1.32349,"target":1.31761},"summary":"Bearish range breakout scenario on GBPUSD H1: it triggers only if price trades at or below 1.32091 within 4 bars. A close above 1.32266 first invalidates it.","conditions":["Trigger: a trade at or below 1.32091 by 2026-11-13 21:00 UTC (4 bars).","Invalidated before trigger: any bar closing above 1.32266.","After trigger: protective level 1.32349, objective 1.31761, time limit 36 bars.","Evaluation eval.v1: mid prices, assumed spread 0.00015 and fee 0.00007 per round trip; a bar touching both sides is unresolved; a bar that opens beyond the objective assumes no entry and expires the scenario."],"changeTriggers":["A close above 1.32266 before the trigger invalidates the scenario.","No trade through 1.32091 by 2026-11-13 21:00 UTC expires it, as does an opening gap beyond 1.31761.","A close back inside the range beyond 1.32267 would mark the breakout as failed."],"reasons":[{"key":"range.compression","text":"The prior 24-bar range 1.32184 to 1.32514 spans 2.15 ATR (rule: at most 4.0).","values":{"range_low":1.32184,"range_high":1.32514,"width_atr":2.152787594368508}},{"key":"range.decisive_close","text":"The signal bar closed 1.32119, below the range low by at least 0.1 ATR.","values":{"close":1.32119,"edge":1.32184,"atr14":0.0015328962358537245}}],"riskFactors":[{"key":"session.weekly_close","severity":"caution","text":"The weekly market close falls inside the scenario window: reopening gaps can skip levels."},{"key":"data.unlicensed","severity":"caution","text":"Reference data without a confirmed display grant."}],"evaluation":{"id":"eval.v1","spread":0.00015,"fee":0.00007,"ambiguousIntrabar":"unresolved","maxHoldBars":36,"triggerWindowBars":4},"dataBasis":{"sourceId":"market-data-hub-h1","sourceLabel":"Market Data Hub closed hourly bars (Twelve Data; OKX BTC/USDT)","sourceKind":"reference","delaySeconds":300,"rightsProfile":"hub-owner-confirmed-display-api-2026-11-13","barCount":361,"firstBarOpen":1792771200000,"lastBarClose":1794589200000,"inputHash":"b7e50a6d0fbe37986fc1087c258335a156784b6de294b1ddf90cb10c81af124d"}},"events":[{"scenarioId":"d4e49bbcf0382614","seq":0,"type":"published","at":1794589544064,"data":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027"},"prevHash":"0000000000000000000000000000000000000000000000000000000000000000","hash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f"},{"scenarioId":"d4e49bbcf0382614","seq":1,"type":"triggered","at":1794592800000,"data":{"level":1.32091,"fill":2.3208349999999998,"gapped":false},"prevHash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f","hash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee"},{"scenarioId":"d4e49bbcf0382614","seq":2,"type":"correction","at":1794625484785,"data":{"status":"unresolved","exit":null,"netR":null,"conservativeR":null,"unresolvedReason":"source_revision","origin":"source_revision","reason":"The price source revised an earlier hourly bar. The original plan and earlier events are retained.","sourceRevision":"{\"policy\":\"source_revision_unresolved.v1\",\"instrumentId\":\"GBPUSD\",\"original\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32075},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"volumeKind\":\"unavailable\",\"requestStartedAt\":1794592800902,\"fetchedAt\":1794592801464},\"observedAt\":1794592844652},\"revised\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32078},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"requestStartedAt\":1794606900288,\"fetchedAt\":1794606900696},\"observedAt\":1794625484617}}"},"prevHash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee","hash":"1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"}]},"expected":{"ok":false,"failure":{"seq":1,"problem":"event altered"}}},{"description":"an event was edited and its own hash recomputed","record":{"scenario":{"id":"d4e49bbcf0382614","instrumentId":"GBPUSD","timeframe":"H1","detector":{"id":"range-breakout","version":1,"name":"Range breakout"},"publishedAt":1794589544064,"signalBarClose":1794589200000,"plan":{"direction":"short","trigger":1.32091,"invalidateOnClose":1.32266,"stop":1.32349,"target":1.31761},"summary":"Bearish range breakout scenario on GBPUSD H1: it triggers only if price trades at or below 1.32091 within 4 bars. A close above 1.32266 first invalidates it.","conditions":["Trigger: a trade at or below 1.32091 by 2026-11-13 21:00 UTC (4 bars).","Invalidated before trigger: any bar closing above 1.32266.","After trigger: protective level 1.32349, objective 1.31761, time limit 36 bars.","Evaluation eval.v1: mid prices, assumed spread 0.00015 and fee 0.00007 per round trip; a bar touching both sides is unresolved; a bar that opens beyond the objective assumes no entry and expires the scenario."],"changeTriggers":["A close above 1.32266 before the trigger invalidates the scenario.","No trade through 1.32091 by 2026-11-13 21:00 UTC expires it, as does an opening gap beyond 1.31761.","A close back inside the range beyond 1.32267 would mark the breakout as failed."],"reasons":[{"key":"range.compression","text":"The prior 24-bar range 1.32184 to 1.32514 spans 2.15 ATR (rule: at most 4.0).","values":{"range_low":1.32184,"range_high":1.32514,"width_atr":2.152787594368508}},{"key":"range.decisive_close","text":"The signal bar closed 1.32119, below the range low by at least 0.1 ATR.","values":{"close":1.32119,"edge":1.32184,"atr14":0.0015328962358537245}}],"riskFactors":[{"key":"session.weekly_close","severity":"caution","text":"The weekly market close falls inside the scenario window: reopening gaps can skip levels."},{"key":"data.unlicensed","severity":"caution","text":"Reference data without a confirmed display grant."}],"evaluation":{"id":"eval.v1","spread":0.00015,"fee":0.00007,"ambiguousIntrabar":"unresolved","maxHoldBars":36,"triggerWindowBars":4},"dataBasis":{"sourceId":"market-data-hub-h1","sourceLabel":"Market Data Hub closed hourly bars (Twelve Data; OKX BTC/USDT)","sourceKind":"reference","delaySeconds":300,"rightsProfile":"hub-owner-confirmed-display-api-2026-11-13","barCount":361,"firstBarOpen":1792771200000,"lastBarClose":1794589200000,"inputHash":"b7e50a6d0fbe37986fc1087c258335a156784b6de294b1ddf90cb10c81af124d"}},"events":[{"scenarioId":"d4e49bbcf0382614","seq":0,"type":"published","at":1794589544064,"data":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027"},"prevHash":"0000000000000000000000000000000000000000000000000000000000000000","hash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f"},{"scenarioId":"d4e49bbcf0382614","seq":1,"type":"triggered","at":1794592800000,"data":{"level":1.32091,"fill":2.3208349999999998,"gapped":false},"prevHash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f","hash":"d6ee5637254b1e0464ec0e8c8cf0dfb858245b0d33023dd6873e7644bec02cb3"},{"scenarioId":"d4e49bbcf0382614","seq":2,"type":"correction","at":1794625484785,"data":{"status":"unresolved","exit":null,"netR":null,"conservativeR":null,"unresolvedReason":"source_revision","origin":"source_revision","reason":"The price source revised an earlier hourly bar. The original plan and earlier events are retained.","sourceRevision":"{\"policy\":\"source_revision_unresolved.v1\",\"instrumentId\":\"GBPUSD\",\"original\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32075},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"volumeKind\":\"unavailable\",\"requestStartedAt\":1794592800902,\"fetchedAt\":1794592801464},\"observedAt\":1794592844652},\"revised\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32078},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"requestStartedAt\":1794606900288,\"fetchedAt\":1794606900696},\"observedAt\":1794625484617}}"},"prevHash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee","hash":"1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"}]},"expected":{"ok":false,"failure":{"seq":2,"problem":"chain broken"}}},{"description":"an event was removed from the middle of the chain","record":{"scenario":{"id":"d4e49bbcf0382614","instrumentId":"GBPUSD","timeframe":"H1","detector":{"id":"range-breakout","version":1,"name":"Range breakout"},"publishedAt":1794589544064,"signalBarClose":1794589200000,"plan":{"direction":"short","trigger":1.32091,"invalidateOnClose":1.32266,"stop":1.32349,"target":1.31761},"summary":"Bearish range breakout scenario on GBPUSD H1: it triggers only if price trades at or below 1.32091 within 4 bars. A close above 1.32266 first invalidates it.","conditions":["Trigger: a trade at or below 1.32091 by 2026-11-13 21:00 UTC (4 bars).","Invalidated before trigger: any bar closing above 1.32266.","After trigger: protective level 1.32349, objective 1.31761, time limit 36 bars.","Evaluation eval.v1: mid prices, assumed spread 0.00015 and fee 0.00007 per round trip; a bar touching both sides is unresolved; a bar that opens beyond the objective assumes no entry and expires the scenario."],"changeTriggers":["A close above 1.32266 before the trigger invalidates the scenario.","No trade through 1.32091 by 2026-11-13 21:00 UTC expires it, as does an opening gap beyond 1.31761.","A close back inside the range beyond 1.32267 would mark the breakout as failed."],"reasons":[{"key":"range.compression","text":"The prior 24-bar range 1.32184 to 1.32514 spans 2.15 ATR (rule: at most 4.0).","values":{"range_low":1.32184,"range_high":1.32514,"width_atr":2.152787594368508}},{"key":"range.decisive_close","text":"The signal bar closed 1.32119, below the range low by at least 0.1 ATR.","values":{"close":1.32119,"edge":1.32184,"atr14":0.0015328962358537245}}],"riskFactors":[{"key":"session.weekly_close","severity":"caution","text":"The weekly market close falls inside the scenario window: reopening gaps can skip levels."},{"key":"data.unlicensed","severity":"caution","text":"Reference data without a confirmed display grant."}],"evaluation":{"id":"eval.v1","spread":0.00015,"fee":0.00007,"ambiguousIntrabar":"unresolved","maxHoldBars":36,"triggerWindowBars":4},"dataBasis":{"sourceId":"market-data-hub-h1","sourceLabel":"Market Data Hub closed hourly bars (Twelve Data; OKX BTC/USDT)","sourceKind":"reference","delaySeconds":300,"rightsProfile":"hub-owner-confirmed-display-api-2026-11-13","barCount":361,"firstBarOpen":1792771200000,"lastBarClose":1794589200000,"inputHash":"b7e50a6d0fbe37986fc1087c258335a156784b6de294b1ddf90cb10c81af124d"}},"events":[{"scenarioId":"d4e49bbcf0382614","seq":0,"type":"published","at":1794589544064,"data":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027"},"prevHash":"0000000000000000000000000000000000000000000000000000000000000000","hash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f"},{"scenarioId":"d4e49bbcf0382614","seq":2,"type":"correction","at":1794625484785,"data":{"status":"unresolved","exit":null,"netR":null,"conservativeR":null,"unresolvedReason":"source_revision","origin":"source_revision","reason":"The price source revised an earlier hourly bar. The original plan and earlier events are retained.","sourceRevision":"{\"policy\":\"source_revision_unresolved.v1\",\"instrumentId\":\"GBPUSD\",\"original\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32075},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"volumeKind\":\"unavailable\",\"requestStartedAt\":1794592800902,\"fetchedAt\":1794592801464},\"observedAt\":1794592844652},\"revised\":{\"bar\":{\"openTime\":1794589200000,\"closeTime\":1794592800000,\"open\":1.32109,\"high\":1.32157,\"low\":1.32057,\"close\":1.32078},\"provenance\":{\"provider\":\"twelvedata\",\"sourceSymbol\":\"GBP/USD\",\"quoteCurrency\":\"USD\",\"instrumentType\":\"provider-instrument\",\"timeBasis\":\"UTC\",\"requestStartedAt\":1794606900288,\"fetchedAt\":1794606900696},\"observedAt\":1794625484617}}"},"prevHash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee","hash":"1ca327d767419056bdb6060516ec9d54da71f66fa2fd1f4a60d62b5ab47143b8"}]},"expected":{"ok":false,"failure":{"seq":2,"problem":"sequence gap"}}},{"description":"the newest event was removed: the chain still verifies, so only a receipt or root you stored earlier catches this","record":{"scenario":{"id":"d4e49bbcf0382614","instrumentId":"GBPUSD","timeframe":"H1","detector":{"id":"range-breakout","version":1,"name":"Range breakout"},"publishedAt":1794589544064,"signalBarClose":1794589200000,"plan":{"direction":"short","trigger":1.32091,"invalidateOnClose":1.32266,"stop":1.32349,"target":1.31761},"summary":"Bearish range breakout scenario on GBPUSD H1: it triggers only if price trades at or below 1.32091 within 4 bars. A close above 1.32266 first invalidates it.","conditions":["Trigger: a trade at or below 1.32091 by 2026-11-13 21:00 UTC (4 bars).","Invalidated before trigger: any bar closing above 1.32266.","After trigger: protective level 1.32349, objective 1.31761, time limit 36 bars.","Evaluation eval.v1: mid prices, assumed spread 0.00015 and fee 0.00007 per round trip; a bar touching both sides is unresolved; a bar that opens beyond the objective assumes no entry and expires the scenario."],"changeTriggers":["A close above 1.32266 before the trigger invalidates the scenario.","No trade through 1.32091 by 2026-11-13 21:00 UTC expires it, as does an opening gap beyond 1.31761.","A close back inside the range beyond 1.32267 would mark the breakout as failed."],"reasons":[{"key":"range.compression","text":"The prior 24-bar range 1.32184 to 1.32514 spans 2.15 ATR (rule: at most 4.0).","values":{"range_low":1.32184,"range_high":1.32514,"width_atr":2.152787594368508}},{"key":"range.decisive_close","text":"The signal bar closed 1.32119, below the range low by at least 0.1 ATR.","values":{"close":1.32119,"edge":1.32184,"atr14":0.0015328962358537245}}],"riskFactors":[{"key":"session.weekly_close","severity":"caution","text":"The weekly market close falls inside the scenario window: reopening gaps can skip levels."},{"key":"data.unlicensed","severity":"caution","text":"Reference data without a confirmed display grant."}],"evaluation":{"id":"eval.v1","spread":0.00015,"fee":0.00007,"ambiguousIntrabar":"unresolved","maxHoldBars":36,"triggerWindowBars":4},"dataBasis":{"sourceId":"market-data-hub-h1","sourceLabel":"Market Data Hub closed hourly bars (Twelve Data; OKX BTC/USDT)","sourceKind":"reference","delaySeconds":300,"rightsProfile":"hub-owner-confirmed-display-api-2026-11-13","barCount":361,"firstBarOpen":1792771200000,"lastBarClose":1794589200000,"inputHash":"b7e50a6d0fbe37986fc1087c258335a156784b6de294b1ddf90cb10c81af124d"}},"events":[{"scenarioId":"d4e49bbcf0382614","seq":0,"type":"published","at":1794589544064,"data":{"scenarioHash":"968f168fcf89a91a00d0988fccae71bdd1424cc03a176acfdc4e98143fcbd027"},"prevHash":"0000000000000000000000000000000000000000000000000000000000000000","hash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f"},{"scenarioId":"d4e49bbcf0382614","seq":1,"type":"triggered","at":1794592800000,"data":{"level":1.32091,"fill":1.320835,"gapped":false},"prevHash":"bb260b6c759c77c1fc332e1186bd5e4e85d9b0f1e3202ef810faaedbe48be92f","hash":"e1c5959247468b10c8411c3b4deef172af55e16fd90914a8f48249bf952d02ee"}]},"expected":{"ok":true,"failure":null}}],"archiveRoot":{"heads":[["e5bf02d3f74d1ad9","d489062793fbe1edbaee3842e975d653d6702548ec5e90a3dd1f049832eb9108"],["5f3aac4c295e7e5a","f3a4a1d9eea3472de4aade6b62541745942f7ab765586515a4dc343c25de4619"],["c8c0fda174cb9899","3a9dbe7e06d0ad7d5e826458f8290fffae7f4a8b82b04822a23adb95344263bc"]],"root":"bd9c9afc7cdf12c4e568dc5eaa27ebfc28371148f5d2d18c4565a978172f731a"}}