fix(STATE-WP-0064): parse consistency sweep stdout with skip prefixes

Extract the JSON payload from mixed script output and document Railiance01
kubectl sync steps. Mark T02 done after cluster bridge and resolver canaries.
This commit is contained in:
2026-06-21 20:56:35 +02:00
parent acc5bea15b
commit 821b5d6c89
4 changed files with 62 additions and 14 deletions

View File

@@ -97,6 +97,18 @@ def test_parse_stderr_extracts_skip_lists():
}
def test_extract_json_payload_skips_human_readable_prefix_lines():
stdout = (
" CLEAN (skipped): quiet-repo\n"
" BUDGET EXHAUSTED after 30s (skipped): other-repo\n"
'{\n "repo_slug": "state-hub",\n "repo_path": "/home/worsch/state-hub",\n'
' "result": "pass",\n "summary": {"fail": 0, "warn": 0, "info": 0},\n'
' "fixes_applied": []\n}\n'
)
payload = sweep_service._extract_json_payload(stdout)
assert payload["repo_slug"] == "state-hub"
def test_parse_stdout_handles_single_and_batch_payloads():
single = json.dumps(
{