fix(scripts): gate the Codex manifest interface descriptions too

Review follow-up on #989: shortDescription/longDescription carry their own
counts and were just trued — include them in the gated source text so
standardized-phrasing claims in them are checked (non-matching prose is
simply not read). Verified: planting 997 in shortDescription fails the
gate; restored passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qgc6RYXWJPr5oW9DHU7zR4
This commit is contained in:
Claude 2026-08-25 06:39:32 +00:00
parent a36d91171c
commit c8ed1048b9
No known key found for this signature in database

View file

@ -312,8 +312,14 @@ def run_check(root: Path, derived: dict) -> int:
if codex_manifest.is_file():
try:
data = json.loads(codex_manifest.read_text(encoding="utf-8"))
sources.append((".codex-plugin/plugin.json description",
data.get("description", "")))
# Include the interface descriptions too — they carry their own
# counts; only standardized-phrasing claims in them are gated.
iface = data.get("interface", {})
codex_text = " ".join(str(s) for s in (
data.get("description", ""),
iface.get("shortDescription", ""),
iface.get("longDescription", "")))
sources.append((".codex-plugin/plugin.json descriptions", codex_text))
except (json.JSONDecodeError, OSError) as exc:
print(f"FAIL: cannot parse .codex-plugin/plugin.json: {exc}")
return 1