IndexNow implementation ledger

Task brief

Approved design
IndexNow deployment discovery
Base commit
8f888e37590fa4083e8f266c5f26e7cf2ef3a293
Production files
tools/docs_site/indexnow.py, .github/workflows/docs-pages.yml
Test file
tests/unit/test_docs_publish_indexnow.py
Required behavior
Build validated, deduplicated IndexNow batches from exact sitemap elements; submit every batch after the site-repository publish action, including later batches after an earlier failure; never block publication on notification failure.
Public-entry RED
The unit test invokes the payload builder and the workflow test reads the published workflow.
Security and error boundary
Accept only exact sitemap 0.9 URL elements on exact-host HTTPS URLs; expose no credential; bound and retry endpoint requests; attempt all batches; keep notification failure non-blocking.
Compatibility
Use the existing Python 3.12 runner and standard library; preserve current sitemap, verification, and deployment outputs.
Exclusions
No ranking guarantee, no Google indexing API, no downstream Pages-workflow polling, no new dependency.
Clean-worktree requirement
Commit only the five named task files from an isolated clean checkout.

Plan

  1. Document the protocol, trust boundary, failure policy, and exclusions.
  2. Add a public payload-builder RED covering protocol fields, validation, deduplication, and batching.
  3. Implement the minimum standard-library builder and deployment step.
  4. Run affected documentation and workflow checks.
  5. Pass independent specification and quality reviews, then run the full gate.

Full gate manifest

Ledger

EvidenceResult
Initial REDuv run pytest -q tests/unit/test_docs_publish_indexnow.py: 1 failed because the workflow had no notification step.
Initial GREEN1 passed; later invalidated by specification review because it only asserted workflow strings.
Manual endpoint probe499 validated live sitemap URLs submitted to the official endpoint; HTTP 200.
Specification reviewCHANGES_REQUIRED: clarify publication boundary, execute payload behavior in tests, batch over 10,000 URLs, and add required evidence records.
Specification repairPASS: all four findings closed; focused suite 5 passed and diff check passed.
Quality reviewCHANGES_REQUIRED: continue after a failed batch, remove stale batch files, and require exact sitemap tags.
Quality repairPASS: all three findings closed; focused suite 8 passed, Ruff and diff check passed.
Implementation commitf458791e8c245e642b563a5ffc9074c9758683ab
Full gateFirst run stopped after 8 passing tests because the manifest omitted the publication workflow's separately installed mdit-py-plugins. After correcting the manifest, the full rerun passed: 8 tests, 500-page build, landing check, zero broken links, Ruff, workflow YAML parse, and diff check.