Skip to content

feat(p0-07): re-vendor canonical snippet + SHA-pin drift CI#5

Merged
mstopa merged 1 commit into
mainfrom
feat/p0-07-snippet-drift-ci
May 24, 2026
Merged

feat(p0-07): re-vendor canonical snippet + SHA-pin drift CI#5
mstopa merged 1 commit into
mainfrom
feat/p0-07-snippet-drift-ci

Conversation

@mstopa
Copy link
Copy Markdown
Contributor

@mstopa mstopa commented May 24, 2026

Summary

Python half of the snippet finalization rolled out in agents-md-snippet#1 and sdk-typescript#6.

  • src/fixyourdocs/snippet.py — re-vendored to the new v0-schema-conformant body. Previous flat-keys example would have been rejected by any v0 Hub.
  • .github/workflows/snippet-drift.yml + .github/scripts/check_snippet_drift.py — fetches README.md from agents-md-snippet's main, extracts the fenced ```markdown block, SHA-256-compares to the vendored body in src/fixyourdocs/snippet.py. Runs on every push to main, every PR, and daily on cron. Tolerates the cross-repo content-lock window: if main does not match but an open upstream PR carries a matching block, the check exits 0 with a warning until the upstream PR merges.
  • AGENTS.md — dogfood the same block in this SDK repo.

Test plan

  • ruff check ., mypy src/fixyourdocs, pytest -q — all green locally (57/57 tests).
  • python3 .github/scripts/check_snippet_drift.py exits 0 locally — currently with the cross-repo content-lock warning until agents-md-snippet#1 merges.
  • CI CI workflow (3.9 → 3.13 matrix) green.
  • CI snippet-drift green (warning in logs is expected until upstream merges).
  • CLA Assistant green.
  • Eyeball: src/fixyourdocs/snippet.py SNIPPET body matches the block in agents-md-snippet PR #1 README and the sister TypeScript SDK PR.

Follow-ups not addressed here

  • v0.2.0 release — gated on the upstream snippet PR landing and the Hub deploying (P0-08 / P0-09). When both are done, tag both SDKs in the same hour.
  • Live Hub end-to-end smoke — blocked on the Hub.

- src/fixyourdocs/snippet.py: re-vendor the canonical block from
  fixyourdocs/agents-md-snippet#1. New body is v0-schema-conformant
  (top-level `protocol_version` / `doc_url` / `agent` / `report` with
  nested `kind` + `summary`); the previous flat-keys body would have
  been rejected by any v0 Hub.
- .github/workflows/snippet-drift.yml + scripts/check_snippet_drift.py:
  daily + per-PR check that fetches README.md from agents-md-snippet
  main, extracts the markdown block, and SHA-256-compares with the
  vendored copy. Tolerates the cross-repo content-lock window — if
  main is out of sync but an open upstream PR matches the vendored
  copy, the check exits 0 with a warning. Closes the verification gap
  left by P0-04 step 6.
- AGENTS.md: dogfood the same block in this repo.

Ruff, mypy, pytest all green locally (57/57 tests).

Signed-off-by: mstopa <m.stopa94@gmail.com>
@mstopa mstopa merged commit 2a096fa into main May 24, 2026
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant