Repository navigation
add the cloudflare plugin - #108
Conversation
Reads Cloudflare's API deprecations page as RSS and emits one api_operation event per operation an item lists under "Deprecated APIs:". Breaking, dated by the end of life, only when the item gives a full end-of-life date and says the endpoints stop; otherwise a deprecation. Items with no operation list, items telling direct API callers no action is required, and list items that aren't one operation are dropped and logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: brandonphelps1212 <bphelps1212@gmail.com>
|
Claude finished @brandonphelps1212's task in 1m 57s —— View job
Thanks for this, @brandonphelps1212. The PR is well researched: the comparison with the OpenAPI spec, the strict test for Rules
Bugs
Verified
Non-blocking (optional)
|
| eolLine = l | ||
| case depLine == "" && cfDeprecated.MatchString(l): | ||
| depLine = l | ||
| case stopLine == "" && cfStops.MatchString(l): |
There was a problem hiding this comment.
Precision: cfStops is checked against every line of the item, not just the sentence about the deprecated endpoints. Lines returns list items too, so a line under "Affected APIs:" (or "Deprecated behavior:") that says a parameter "will be removed" is enough to make every operation in the item breaking.
This can already happen with one item in the saved feed. "Cloudflare Mirage" has End of life date: January 2026, and its Affected APIs list says "GET /zones/{zone_id}/pagerules/settings - Mirage will be removed from available settings." Today it stays a deprecation only because Date can't read a date that has only a month. If Cloudflare changes the date to, say, "January 31, 2026", both /settings/mirage operations become breaking. The stopLine quoted as evidence would then be about a Pagerules setting, not those endpoints. (I found this by reading the code with that input. I didn't run it.)
A possible fix: look for the stop sentence only in <p> paragraphs outside the item's lists, e.g. run Lines on the HTML with every <ul>…</ul> removed. Or require the line to mention the endpoints/APIs ("endpoints", "APIs") the way the Registrar and Zone Settings items do. A unit case in TestCloudflareDates with a full EOL date plus an Affected APIs list item saying "parameter will be removed" would pin it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: brandonphelps1212 <bphelps1212@gmail.com>
|
@claude review |
|
Claude finished @brandonphelps1212's task in 42s —— View job ✅ Ready to merge. c2f8b11 fixes the one blocking bug from the last review. Every rule in AGENTS.md is met. Thanks for the quick fix, @brandonphelps1212. You did what the review asked and added test cases for both versions of the problem. Rules
Blocking bugsNone. Checking the fix against the saved feed (by reading the code):
Non-blocking suggestions (optional)
TestsI can only read the code here, so I didn't build or run the tests. CI_go runs |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: brandonphelps1212 <bphelps1212@gmail.com>
|
@claude review |
|
Claude finished @brandonphelps1212's task in 44s —— View job ✅ Ready to merge. be86d69 makes the non-blocking change suggested last time: a stop sentence now counts only when the endpoints, API or operations are what stops. The output for the saved feed doesn't change, and every rule in AGENTS.md is still met. Thanks, @brandonphelps1212. Turning the Service Key sentence into a test case was a good way to pin it. Rules
Blocking bugsNone. I checked the new regexp against the saved feed by reading it, without running it:
Non-blocking suggestions (optional)
TestsI can only read code here, so I didn't build or run anything. CI_go runs |
What this changes
Adds the
cloudflareplugin, a new reader (CloudflareAPI) in thefeedformat plugin. Part of #67 (I10.4 · Watch Cloudflare), under #13.kit.Cite), like the other feeds.api_operationevent per operation an item lists under "Deprecated APIs:".breaking, dated by the end of life, only when the item gives a full "End of life date:" and says the endpoints stop ("will no longer be available").deprecationotherwise, dated by the deprecation date, else the item's publication date.METHOD /path/{param}; the oldest items writeGET zones/:zone_identifier/....Checklist
docs/plugins.md: newcloudflarerow with statuspaused, likevercel(see notes). I compared the registered plugins with the table.git commit -s, DCO)plugins/feed/testdata/golden/cloudflare.json), the whole feed as saved on 2026-11-19testdata/README.mdlists the file: URL, date fetched, license (CC BY 4.0), quoteproviders/cloudflare.mdwritten fromproviders/_template.md, including Why this sourceenv.Get/kit/go build ./... && go vet ./... && gofmt -l . && go test -race ./...pass locally, and so doesscripts/leak_guard.py --all.Notes for the reviewer
Why the deprecations page and not Cloudflare's OpenAPI spec (cloudflare/api-schemas). I measured the spec over 39 snapshots, 2024-11 to 2026-11:
The spec's deprecation flags do agree with the page: 56 of the 58 page operations still in the spec are flagged. Spec-based deprecations (321 flagged) could be a follow-up plugin, once we decide how to avoid reporting the same operation twice from two sources.
Breaking is deliberately strict. Of the 11 items with an end-of-life date, only 2 say the endpoints stop. So AMP/SXG and Zero Trust Devices are deprecations even though they may well be shutdowns. An independent review caught the first version treating every end-of-life date as breaking, including 4 Radar endpoints whose item says API callers need no action.
Historical change: the Legacy Registrar Domain Management API, deprecated 2026-04-10 with end of life 2026-09-27. It's in the golden file and pinned by
TestCloudflareRegistrarEndOfLife. Its operations left Cloudflare's spec in October 2026.paused: likevercel, the plugin runs in the hosted ingestion service once it's in a tagged release, and the row moves tolivethen.Client side: these events are
api_operation, versioned by date (2026-09-27), because Cloudflare's API has no versions. The patch-it client reads anapi_operationevent's version as a package version, so it can't place them yet. It needs a rule for date-versioned API events, like the one model retirements have. That change belongs in patch-it, not here.🤖 Generated with Claude Code