From c33b04f053753cab130aaf4c44651cb54a036be9 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Sep 2026 19:00:41 +0000 Subject: [PATCH] test(metadata): update stale success-stub for _docs_index_exists probe #1628 changed _repository_file_exists (the shared backing for _docs_index_exists/_workflow_pages_definition_exists) to require the success branch to parse a real gh api JSON payload (payload.get("type") == "file"), replacing the old bare `return True` on exit 0. test_pages_and_docs_probes was left asserting against the old contract: it still stubbed the success response with an empty stdout, which now fails json.loads() with a JSONDecodeError instead of exercising the True branch at all. Give the success-case stub a minimal realistic gh api contents payload so the test proves what it claims to (docs/index.md present -> True) instead of erroring before the assertion. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4 --- tests/test_repository_metadata_reconciliation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_repository_metadata_reconciliation.py b/tests/test_repository_metadata_reconciliation.py index f6ad0369d2..2122c5d070 100644 --- a/tests/test_repository_metadata_reconciliation.py +++ b/tests/test_repository_metadata_reconciliation.py @@ -226,7 +226,11 @@ def test_pages_and_docs_probes(monkeypatch) -> None: RECONCILER._pages_exists("Repo") responses = iter( - [completed(), completed(code=1, out="Not Found"), completed(code=1, err="boom")] + [ + completed(out='{"type": "file"}'), + completed(code=1, out="Not Found"), + completed(code=1, err="boom"), + ] ) monkeypatch.setattr( RECONCILER.subprocess, "run", lambda *args, **kwargs: next(responses)