fix(claude): accept async rewake metadata

This commit is contained in:
ZacharyZhang-NY committed 2026-07-20 09:02:38 -04:00
1 parent 653e644e4f
commit ae04b0cbb4
4 files changed
+44 -3

No files matched your search

+20
View File
@@ -75,6 +75,13 @@ def test_install_preserves_settings_and_writes_one_exact_triple(
"timeout": 5,
}],
}],
"Stop": [{"hooks": [{
"type": "command",
"command": "background-check",
"asyncRewake": True,
"rewakeMessage": "Background validation failed",
"rewakeSummary": "Validation feedback",
}]}],
},
}
fixture = prepare_fixture(
@@ -88,6 +95,7 @@ def test_install_preserves_settings_and_writes_one_exact_triple(
assert installed["model"] == "sonnet"
assert installed["hooks"]["Notification"] == existing["hooks"]["Notification"]
assert installed["hooks"]["PreToolUse"][0] == existing["hooks"]["PreToolUse"][0]
assert installed["hooks"]["Stop"] == existing["hooks"]["Stop"]
assert_managed_triple(installed, fixture)
first_source = fixture.config_path.read_text(encoding="utf-8")
@@ -240,6 +248,18 @@ INVALID_SETTINGS = [
}]}]}}),
"positive finite number",
),
(
json.dumps({"hooks": {"Stop": [{"hooks": [{
"type": "command", "command": "x", "rewakeMessage": "",
}]}]}}),
"rewakeMessage.*non-empty string",
),
(
json.dumps({"hooks": {"Stop": [{"hooks": [{
"type": "command", "command": "x", "rewakeSummary": "",
}]}]}}),
"rewakeSummary.*non-empty string",
),
(
json.dumps({"hooks": {"PreToolUse": [{"hooks": [{
"type": "http", "url": "https://example.test", "headers": {"A": 1},