{"abstract":"Nested menu provider receives the full root row budget.","category":"Menu interactions","checks":7,"contract":"Nested menu providers consume shared row and depth budgets and charge visible descendants exactly once; cached rows still occupy presentation budget.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-nested-provider-budgets","failed_approach":"The attempted repair `max(0,p['budget']-p['local_rows'])` still violates the remaining-rows oracle.","family":"s3-menu-interactions-nested-provider-budgets-remaining-rows","id":"FA-33721","implementations":{"attempt":{"sha256":"1c83ae083a0674de354334c9dab5cf53a170e2f7b46fafd3b3fd6457119e74e1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'remaining-rows':\n        return max(0,p['budget']-p['local_rows'])\n    if action == 'remaining-depth':\n        return max(0,p['maximum']-p['depth'])\n    if action == 'charge-cache':\n        return len(p['fresh'])+len(p['cached'])\n    if action == 'truncate-signal':\n        return {'rows':p['rows'][:p['limit']],'truncated':len(p['rows'])>p['limit']}\n    if action == 'reservation':\n        return max(0,p['available']-sum(p['reservations'].values()))\n    if action == 'release-reservation':\n        return {k:v for k,v in p['reservations'].items() if k!=p['provider']}\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('remaining-rows contract', solve('remaining-rows', {'budget':N+10,'ancestor_rows':4,'local_rows':1}), N+6)\ncheck('remaining-depth contract', solve('remaining-depth', {'maximum':N+6,'depth':2}), N+4)\ncheck('charge-cache contract', solve('charge-cache', {'fresh':[N],'cached':[N+1,N+2]}), 3)\ncheck('truncate-signal contract', solve('truncate-signal', {'rows':list(range(N+3)),'limit':2}), {'rows':[0,1],'truncated':True})\ncheck('reservation contract', solve('reservation', {'available':N+10,'reservations':{'a':2,'b':3}}), N+5)\ncheck('release-reservation contract', solve('release-reservation', {'reservations':{'a':N,'b':N+1},'provider':'a','used':1}), {'b':N+1})\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\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":"f547c4266eb26bdf5e4fd38e9c117cfdd267ca1ef92e5c6b0369bdf2cf3914f4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'remaining-rows':\n        return p['budget']\n    if action == 'remaining-depth':\n        return max(0,p['maximum']-p['depth'])\n    if action == 'charge-cache':\n        return len(p['fresh'])+len(p['cached'])\n    if action == 'truncate-signal':\n        return {'rows':p['rows'][:p['limit']],'truncated':len(p['rows'])>p['limit']}\n    if action == 'reservation':\n        return max(0,p['available']-sum(p['reservations'].values()))\n    if action == 'release-reservation':\n        return {k:v for k,v in p['reservations'].items() if k!=p['provider']}\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('remaining-rows contract', solve('remaining-rows', {'budget':N+10,'ancestor_rows':4,'local_rows':1}), N+6)\ncheck('remaining-depth contract', solve('remaining-depth', {'maximum':N+6,'depth':2}), N+4)\ncheck('charge-cache contract', solve('charge-cache', {'fresh':[N],'cached':[N+1,N+2]}), 3)\ncheck('truncate-signal contract', solve('truncate-signal', {'rows':list(range(N+3)),'limit':2}), {'rows':[0,1],'truncated':True})\ncheck('reservation contract', solve('reservation', {'available':N+10,'reservations':{'a':2,'b':3}}), N+5)\ncheck('release-reservation contract', solve('release-reservation', {'reservations':{'a':N,'b':N+1},'provider':'a','used':1}), {'b':N+1})\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\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":"Offline supplied-valid-payload model; excludes DOM, keyboard, focus, selection, announcements and browser conformance. 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":"s3-menu-interactions-nested-provider-budgets-remaining-rows","generated_at":"2026-09-29T14:42:25.286736+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Cascading and context menus require coherent command and session state as content changes.","root_cause":"The nested-provider-budgets model applies `p['budget']` at its remaining-rows operation instead of the stipulated transformation.","sha256":"013d846c2299922ef3f3661033f69d39acba40230b0a4df13803b05925bb7f91","title":"Nested menu provider receives the full root row budget · 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":39.963,"exit_code":1,"observations":[{"actual":10,"check":"remaining-rows contract","expected":7,"passed":false},{"actual":5,"check":"remaining-depth contract","expected":5,"passed":true},{"actual":3,"check":"charge-cache contract","expected":3,"passed":true},{"actual":{"rows":[0,1],"truncated":true},"check":"truncate-signal contract","expected":{"rows":[0,1],"truncated":true},"passed":true},{"actual":6,"check":"reservation contract","expected":6,"passed":true},{"actual":{"b":2},"check":"release-reservation contract","expected":{"b":2},"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"remaining-rows contract\", \"actual\": 10, \"expected\": 7, \"passed\": false}, {\"check\": \"remaining-depth contract\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"charge-cache contract\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"truncate-signal contract\", \"actual\": {\"rows\": [0, 1], \"truncated\": true}, \"expected\": {\"rows\": [0, 1], \"truncated\": true}, \"passed\": true}, {\"check\": \"reservation contract\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"release-reservation contract\", \"actual\": {\"b\": 2}, \"expected\": {\"b\": 2}, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.77,"exit_code":1,"observations":[{"actual":11,"check":"remaining-rows contract","expected":7,"passed":false},{"actual":5,"check":"remaining-depth contract","expected":5,"passed":true},{"actual":3,"check":"charge-cache contract","expected":3,"passed":true},{"actual":{"rows":[0,1],"truncated":true},"check":"truncate-signal contract","expected":{"rows":[0,1],"truncated":true},"passed":true},{"actual":6,"check":"reservation contract","expected":6,"passed":true},{"actual":{"b":2},"check":"release-reservation contract","expected":{"b":2},"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"remaining-rows contract\", \"actual\": 11, \"expected\": 7, \"passed\": false}, {\"check\": \"remaining-depth contract\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"charge-cache contract\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"truncate-signal contract\", \"actual\": {\"rows\": [0, 1], \"truncated\": true}, \"expected\": {\"rows\": [0, 1], \"truncated\": true}, \"passed\": true}, {\"check\": \"reservation contract\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"release-reservation contract\", \"actual\": {\"b\": 2}, \"expected\": {\"b\": 2}, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"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."}}