test(podcaster-handoff): smoke fixture honors 150-char + sha256 contract (#587) (#590)

The cross-repo handoff smoke test (test_smoke_payload_matches_real_weekly_handoff_shape) built a 91-char stub article with a mismatched candidate.summary_sha256, so when a sibling SquadScope-Podcaster checkout is present the tightened podcaster contract (article_content >= 150 chars + article_sha256 must match the exact UTF-8 bytes) rejected the payload. That 91-char press-less baseline is exactly the W30 defect the #583/#584/#587 chain hardened against, so the fixture now uses a realistic full-length article and records its real sha256 in the manifest. Behavior-only test fix; no production/eligibility logic changed. In SquadScope CI (podcaster not checked out) the test still skips, but it now passes honestly in a dual-repo dev/contract environment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Juan Manuel Servera committed Jul 20, 2026 at 16:49 UTC 7a37c0fc32a708bc9c7d326b1e574bb8d2b76241
1 file changed +20 -3
tests/test_podcaster_handoff.py
+20 -3
@@ -1,3 +1,4 @@
1 +import hashlib
2 import io
3 import json
4 import sys
@@ -238,10 +239,26 @@ class PodcasterHandoffTests(unittest.TestCase):
239 manifest = self._write_manifest(Path(tmpdir))
240 article_dir = Path(tmpdir) / "content" / "weekly" / "2026"
241 article_dir.mkdir(parents=True)
241 - (article_dir / "W23.md").write_text(
242 - "---\ntitle: Week 23 Report\nsummary: Week 23 summary.\n---\n# Week 23 Report\nBody content here.\n",
243 - encoding="utf-8",
242 + # The Podcaster contract rejects article_content shorter than 150 chars
243 + # (the W30 press-less "91-char baseline" defect) and requires
244 + # article_sha256 to match the exact UTF-8 article_content bytes, so this
245 + # smoke fixture must be a realistic full-length article whose sha256 the
246 + # manifest records — mirroring a real weekly handoff.
247 + article_text = (
248 + "---\ntitle: Week 23 Report\nsummary: Week 23 summary.\n---\n"
249 + "# Week 23 Report\n"
250 + "This week the agent-skills ecosystem kept compounding: new packaging "
251 + "conventions, tighter trust boundaries, and a steady stream of GitHub "
252 + "signal worth reading in full.\n"
253 )
254 + (article_dir / "W23.md").write_text(article_text, encoding="utf-8")
255 + # Point candidate.summary_sha256 at the real article bytes so the emitted
256 + # payload.article_sha256 matches what the Podcaster recomputes and checks.
257 + manifest_data = json.loads(manifest.read_text(encoding="utf-8"))
258 + manifest_data["candidate"]["summary_sha256"] = hashlib.sha256(
259 + article_text.encode("utf-8")
260 + ).hexdigest()
261 + manifest.write_text(json.dumps(manifest_data), encoding="utf-8")
262
263 payload = podcaster_handoff.build_payload(
264 week="2026-W23",