fix(ordinal): mark the 20 docs-sourced samples as docs-sourced (source block, no invented headers) - #59
Merged
Conversation
providers/ordinal/* are generated from Ordinal's docs by scripts/ordinal/docs.ts
(the README says so), but every file carried no `source` block plus invented
`accept: */*` and `user-agent: Ordinal-Webhooks` headers. That is exactly the
shape of a capture: nothing in a file distinguished it from a real delivery,
and a transport-header check classifies all 20 as likely captures. Ordinal
documents no User-Agent or any other vendor-set delivery header.
docs.ts now:
- writes `content-type: application/json` only ("The request body is JSON")
- adds `source: {type: "vendor-documentation", url, retrieved}` per file
- records provenance.latest {sourced_via: docs, sourced_on: oldest retrieved}
in index.json
- discovers event pages whether llms.txt lists them with or without `.md`
(it now lists them without, so the old regex found 0 pages and the
generator could not run) and fetches `<page>.md`
Regenerated: all 20 bodies and topics are unchanged. Only headers, the new
source block and index.json provenance differ. A second run is a no-op.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is separate from #58 and adds no new samples. It corrects how the 20 existing
providers/ordinal/files are marked.The defect
providers/ordinal/README.mdsays every file inlatest/is "docs-sourced and generated by a script" (scripts/ordinal/docs.ts). The files themselves didn't say so. All 20 had:sourceblock, which is the marking this repo's README gives doc-sourced samples ("marked with asourcekey that a captured sample never has"), andaccept: */*anduser-agent: Ordinal-Webhooks, taken fromREPRESENTATIVE_HEADERS.So each file looked like a capture. hookdeck/webhook-registry's
paths.sample_provenance()found the two transport headers and nosourceblock, and classified all 20 aslikely-capture. Any consumer that trusts that classification treats doc examples as observed deliveries. The registry's ordinal row already records this as amisclassified-upstreamgap.Ordinal documents no User-Agent. The webhooks introduction page documents no vendor-set delivery header at all: no event-type header, no delivery id, no signature. The only headers a delivery is documented to carry are the static ones a subscriber configures in the webhook's
headersfield. Souser-agent: Ordinal-Webhookswas invented, and so wasaccept.The fix, in the generator
The output files weren't hand-edited.
scripts/ordinal/AGENTS.mdsays to change them by re-running the generator, and that's what this PR does.docs.tsnow:content-type: application/jsononly, backed by the introduction page's "The request body is JSON". No other header is written.source: {type: "vendor-documentation", url: <event page>, retrieved: <run date>}to every file.provenance.latest: {sourced_via: "docs", sourced_on: <oldest retrieved>}inindex.json. The oldest date is used so that a partial re-run can never overstate freshness. It was absent before, so the version published asunknown.llms.txtlists them with.md. It now lists them without.md, so the old regex found 0 pages and the generator exited with "no webhook event pages discovered". It couldn't be run until this was fixed. The script now fetches<page>.mdfor the markdown and cites the page URL itself insource.url.providers/ordinal/README.md,scripts/ordinal/README.mdandscripts/ordinal/AGENTS.mdnow say "content-type only, plus asourceblock" instead of "representative headers".Results
yarn generate:ordinalmainsourceblock andindex.jsonprovenance, and nothing else.source.urlpaths.sample_provenance()(registry)doc-example(was 20/20likely-capture)yarn compileprovenance.latest = {docs, 2026-09-28}yarn testAfter this merges, the registry side has follow-up to do: the ordinal row's
samples.upstream_provenancegap, and itsdelivery_headersnote quoting these headers, will both be stale.🤖 Generated with Claude Code