Skip to content

Commit 8f90579

Browse files
Trecekclaude
andcommitted
fix: update line-number allowlists for tools_kitchen.py additions
The gate_infrastructure_ready implementation added 29 lines to tools_kitchen.py, shifting the atomic_write+json.dumps sites from lines 918/978 to 947/1007. Update the _LEGACY_JSON_WRITES allowlist to match. Bump tools_kitchen.py line-limit exemption from 1200 to 1250 lines and improve the close-then-reopen test to drain each task independently. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 47e8983 commit 8f90579

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

tests/arch/test_subpackage_isolation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,14 +962,16 @@ def test_data_directories_are_not_python_packages() -> None:
962962
"co-located with the execution engine that calls them",
963963
),
964964
"tools_kitchen.py": (
965-
1200,
965+
1250,
966966
"REQ-CNST-010-E7: kitchen tool handlers — open_kitchen and lock_ingredients require "
967967
"inline validation helpers (_check_override_keys, _build_ingredient_key_suggestions) "
968968
"for ingredient key validation; splitting would cross import-layer boundaries; "
969969
"backend capability promotion delegated to _promote_capability_keys in _auto_overrides; "
970970
"fail-closed validity gate on both deferred-recall and normal paths adds structural "
971971
"error propagation from LoadRecipeResult; get_recipe validity guard adds 9 lines; "
972-
"dispatch-feasibility preflight wiring on both paths with gate-close on failure",
972+
"dispatch-feasibility preflight wiring on both paths with gate-close on failure; "
973+
"gate_infrastructure_ready guard restructuring adds 22 lines for handler-skip path, "
974+
"quota_refresh_loop deferred start, and all four gate.disable() rollback resets",
973975
),
974976
"tools_execution.py": (
975977
1130,

tests/infra/test_schema_version_convention.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def _is_yaml_dump(node: ast.expr) -> bool:
122122
("src/autoskillit/server/tools/tools_kitchen.py", 171),
123123
("src/autoskillit/server/tools/tools_kitchen.py", 190),
124124
("src/autoskillit/server/tools/tools_kitchen.py", 224),
125-
("src/autoskillit/server/tools/tools_kitchen.py", 918),
126-
("src/autoskillit/server/tools/tools_kitchen.py", 978),
125+
("src/autoskillit/server/tools/tools_kitchen.py", 947),
126+
("src/autoskillit/server/tools/tools_kitchen.py", 1007),
127127
# tools_pipeline_tracker.py — tracker_data dict
128128
("src/autoskillit/server/tools/tools_pipeline_tracker.py", 166),
129129
# tools_status.py — mcp_data dict

tests/server/test_kitchen_lifecycle.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,19 @@ async def test_back_to_back_open_close_open_resets_infrastructure(monkeypatch, t
110110
result1 = await _open_kitchen_handler()
111111
assert result1 is None
112112
assert ctx.gate_infrastructure_ready is True
113+
first_task = ctx.quota_refresh_task
113114

114115
_close_kitchen_handler()
115116
assert ctx.gate_infrastructure_ready is False
117+
await asyncio.sleep(0)
118+
assert first_task.cancelled() or first_task.done()
116119

117120
result2 = await _open_kitchen_handler()
118121
assert result2 is None
119122
assert ctx.gate_infrastructure_ready is True
123+
second_task = ctx.quota_refresh_task
124+
assert second_task is not first_task
120125

121-
task = ctx.quota_refresh_task
126+
_close_kitchen_handler()
122127
await asyncio.sleep(0)
123-
if task is not None:
124-
assert task.cancelled() or task.done()
128+
assert second_task.cancelled() or second_task.done()

0 commit comments

Comments
 (0)