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
- Document the protocol, trust boundary, failure policy, and exclusions.
- Add a public payload-builder RED covering protocol fields, validation, deduplication, and batching.
- Implement the minimum standard-library builder and deployment step.
- Run affected documentation and workflow checks.
- Pass independent specification and quality reviews, then run the full gate.
Full gate manifest
uv sync --extra devuv pip install markdown-it-py mdit-py-plugins pygments(the same docs dependencies installed by the publication workflow)uv run pytest -q tests/unit/test_docs_publish_indexnow.pyuv run python -m tools.docs_site.builduv run python -m tools.docs_site.check_landinguv run python -m tools.docs_site.checklinksuv run ruff check tools/docs_site/indexnow.py tests/unit/test_docs_publish_indexnow.py- Parse
.github/workflows/docs-pages.ymlwith PyYAML. git diff --checkand clean worktree after the reviewed commit.
Ledger
| Evidence | Result |
|---|---|
| Initial RED | uv run pytest -q tests/unit/test_docs_publish_indexnow.py: 1 failed because the workflow had no notification step. |
| Initial GREEN | 1 passed; later invalidated by specification review because it only asserted workflow strings. |
| Manual endpoint probe | 499 validated live sitemap URLs submitted to the official endpoint; HTTP 200. |
| Specification review | CHANGES_REQUIRED: clarify publication boundary, execute payload behavior in tests, batch over 10,000 URLs, and add required evidence records. |
| Specification repair | PASS: all four findings closed; focused suite 5 passed and diff check passed. |
| Quality review | CHANGES_REQUIRED: continue after a failed batch, remove stale batch files, and require exact sitemap tags. |
| Quality repair | PASS: all three findings closed; focused suite 8 passed, Ruff and diff check passed. |
| Implementation commit | f458791e8c245e642b563a5ffc9074c9758683ab |
| Full gate | First 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. |