{"abstract":"Partial demand blocks compete with complete tariff blocks.","category":"Power metering accounting","checks":6,"contract":"Integer samples are equal-duration energy slots grouped into anchored blocks of width k. Return largest complete block energy sum. Ignore trailing partial block; return None if none complete. This models fixed blocks, not rolling windows.","contract_signature":"samples, k","evaluation_group":"model-fa9fcc68fad8c607","failed_approach":"A rolling-window maximum restores width but violates the tariff block anchors.","family":"z-power_metering-demand-block-completeness","id":"FA-12271","implementations":{"attempt":{"sha256":"679221cbe278351630cf2be1793dfb67666d44c1aaa08e02dc0062c63393e190","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples, k):\n    return max((sum(samples[i:i+k]) for i in range(len(samples)-k+1)),default=None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('trailing spike excluded', solve([N,N,10*N],2),2*N)\ncheck('rolling peak is not block peak', solve([0,5*N,5*N,0],2),5*N)\ncheck('exact block', solve([N,2*N],2),3*N)\ncheck('no complete block', solve([N],2),None)\ncheck('empty', solve([],2),None)\ncheck('unit blocks', solve([N,3*N,2*N],1),3*N)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"abf91d72570d927683664b6ac8c8e69aabe499dc72f2bdb0b59246a89d25512f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples, k):\n    return max((sum(samples[i:i+k]) for i in range(0,len(samples),k)),default=None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('trailing spike excluded', solve([N,N,10*N],2),2*N)\ncheck('rolling peak is not block peak', solve([0,5*N,5*N,0],2),5*N)\ncheck('exact block', solve([N,2*N],2),3*N)\ncheck('no complete block', solve([N],2),None)\ncheck('empty', solve([],2),None)\ncheck('unit blocks', solve([N,3*N,2*N],1),3*N)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Simplified integer-energy accounting model; no hardware protocol, legal tariff, measurement uncertainty, or live grid behavior is represented. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"z-power_metering-demand-block-completeness","generated_at":"2026-09-29T14:38:55.425275+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Meter settlement depends on explicit register and tariff policies; this controlled model makes that policy observable.","root_cause":"A trailing partial block is treated as a complete demand observation.","sha256":"e2d162e3d7cd0cebd23889458dc56a952ef8e38d6c216ea01144a49b1e22287a","title":"Partial demand blocks compete with complete tariff blocks · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.231,"exit_code":1,"observations":[{"actual":11,"check":"trailing spike excluded","expected":2,"passed":false},{"actual":10,"check":"rolling peak is not block peak","expected":5,"passed":false},{"actual":3,"check":"exact block","expected":3,"passed":true},{"actual":null,"check":"no complete block","expected":null,"passed":true},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":3,"check":"unit blocks","expected":3,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"trailing spike excluded\", \"actual\": 11, \"expected\": 2, \"passed\": false}, {\"check\": \"rolling peak is not block peak\", \"actual\": 10, \"expected\": 5, \"passed\": false}, {\"check\": \"exact block\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"no complete block\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unit blocks\", \"actual\": 3, \"expected\": 3, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.758,"exit_code":1,"observations":[{"actual":10,"check":"trailing spike excluded","expected":2,"passed":false},{"actual":5,"check":"rolling peak is not block peak","expected":5,"passed":true},{"actual":3,"check":"exact block","expected":3,"passed":true},{"actual":1,"check":"no complete block","expected":null,"passed":false},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":3,"check":"unit blocks","expected":3,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"trailing spike excluded\", \"actual\": 10, \"expected\": 2, \"passed\": false}, {\"check\": \"rolling peak is not block peak\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"exact block\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"no complete block\", \"actual\": 1, \"expected\": null, \"passed\": false}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unit blocks\", \"actual\": 3, \"expected\": 3, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}