Repository navigation
add the salesforce eol plugin - #137
Conversation
Signed-off-by: AbdullahT01 <[email protected]>
|
Claude finished @AbdullahT01's task in 1m 36s —— View job
Thanks for this, @AbdullahT01. The write-up of why no existing format fits, and of why the season names aren't turned into dates, made this easy to review. 🙏 Rules
Bugs
No other correctness problems found. I checked these:
On the Subject design you asked about: using VerifiedRun on this branch (
Non-blocking (optional)
|
| // one GET and no snapshot. | ||
| func (p Plugin) Run(ctx context.Context, env plugin.Env) (plugin.Result, error) { | ||
| pg := p.Page | ||
| live, err := env.Get(ctx, pg.URL) |
There was a problem hiding this comment.
Blocking (please confirm): providers/salesforce.md says "The live page 403s a plain fetch (bot-protected), so it's read through a Wayback Machine snapshot". But Run reads the live page first, and only calls Wayback afterwards to cite it. Wayback isn't a fallback here. If env.Get gets a 403 from patch-it's hosted ingestion service, this returns an error on every run and the plugin never emits anything.
Could you check one of these?
env.Get(thefetchlayer) really does get a 200 from this URL, and the body it gets holds the<tbody>/<tr>/<td>table thatParseexpects.developer.salesforce.com/docs/...pages may load their content client-side, and the saved fixture is a trimmed copy, so the golden test can't tell us this. Then fix the provider page's sentence.- Or, if the live page really does 403, the plugin needs a source it can actually fetch, and the provider page should say which one.
The same question applies to kit.Wayback's id_ snapshot: Cite re-parses the raw archived HTML and compares it to want. The fixture README says the Wayback rewrite prefixes were removed by hand, so please check the raw id_ body parses the same way.
|
|
||
| ## Why this source | ||
|
|
||
| - **Source:** [API End-of-Life Policy](https://developer.salesforce.com/docs/platform/api-rest/guide/api-rest-eol.html), Salesforce's own table of REST API version ranges and their support status. The live page 403s a plain fetch (bot-protected), so it's read through a Wayback Machine snapshot, same as `retirements` and `feed`. Checked 2026-11-20 (page crawled 2026-10-31). |
There was a problem hiding this comment.
This doesn't match the code: retirements, feed and eol all env.Get the live page first, and they snapshot it on Wayback only to cite it. They never read through Wayback in place of the live page. If the live page 403s, Run fails before Wayback is called (see the comment on plugins/eol/eol.go:171). Please reword this once the fetch question there is settled.
Signed-off-by: AbdullahT01 <[email protected]>
|
Good catch — this wasn't just a wording mismatch, the fetch itself was broken: |
|
Claude finished @AbdullahT01's task in 1m 9s —— View job
Thanks for the quick and careful follow-up, @AbdullahT01. You were right that the problem was the fetch itself, not just the wording, and the fix is narrow: it only falls back on a 4xx, never on a 5xx or a timeout. 🙏
Rules
Blocking
Non-blocking (optional)
Verified
|
…review nits Signed-off-by: AbdullahT01 <[email protected]>
|
Both answered. Does a real id_ snapshot parse? Yes — just tested it live, not with the committed fixture:
Does Also addressed everything non-blocking from both reviews:
@claude review |
|
Claude finished @AbdullahT01's task in 35s —— View job ✅ Ready to merge. Both blocking questions from my last review are answered, and every optional suggestion was taken. I found one small inaccuracy in a doc comment; it's optional and listed below. Thank you, @AbdullahT01. Testing a fresh Save Page Now capture end to end, instead of trusting the trimmed fixture, settles the question that mattered most. Tracing the error path through
Rules
BlockingNone.
Non-blocking (optional)
Verified
|
What this changes
Adds Salesforce as a new plugin, on a new format plugin,
plugins/eol. Closes #101.Salesforce's REST API has no stable spec, no changelog feed, and no official Python or JS SDK (researched and ruled out below). The one real, authoritative, dated source is Salesforce's own API End-of-Life Policy page: a table of whole numbered API version ranges (
/services/data/vNN.N/), each marked supported, already retired, or scheduled to be. No existing format plugin fits it:openapiretirementsfeed/apichangelog/changelog/catalog/removedmembers/migrationguideeolreuses the same shape asretirements/feed(read the live page now, cite a Wayback Machine snapshot, no diffing between two states needed since the page itself already lists every past and scheduled retirement with dates) but with its own HTML-table parser andSubject.Type = api_operationinstead ofmodel, since this isn't about a named model.The Subject/Operation choice, flagged for review: a whole version's retirement doesn't name one specific operation. I didn't invent a wildcard
operationstring (no contract change, no new Subject type): each event citesGET /services/data/vNN.N/, Salesforce's own real, documented "List Available REST Resources" call, which is the one honest, literal resource that exists at every version and nothing else. The description and provider pageKnown gapsare upfront that in practice every resource under that version is gone, not just this one.Dates: Salesforce gives seasons ("Summer '27"), not calendar days, and its own production rollout is staggered by instance with no single verifiable date per season (checked against four independent sources, which disagree on the exact weekend). Rather than guess a date, the event's
versionis the API version number and the season is quoted verbatim in the description and excerpt.Golden test doubles as the historical replay, same as
retirements: the single real, saved snapshot already contains two genuine past retirements (versions 7.0–20.0 retired Summer '22, versions 21.0–30.0 retired Summer '25) plus one real scheduled one (versions 31.0–40.0, deprecated from Summer '27), 34 events total; the still-"Supported." 41.0–67.0 band is the pinned drop test.Checklist
docs/plugins.md(new row) andmake plugins-jsonrun (also addedeoltodocs/plugins.schema.json's format enum, and todocs/writing-a-plugin.md's format-plugin table — not yet wired intocmd/new-plugin --format, noted there)git commit -s, DCO)testdata/golden/salesforce.json)testdata/README.mdlists the file: URL, date fetched, license, quoteproviders/salesforce.mdwritten fromproviders/_template.md, including Why this sourceenv.Get(viakit.Cite/kit.Wayback, same asretirementsandfeed)make checkpasses locallyNotes for the reviewer
plugins/eol), not a new provider on an existing one — please look at the Subject/Operation design choice above in particular.cmd/new-plugin --formatdoesn't scaffoldeolyet (only the original 8 formats); a future provider on this format has to be hand-written, same as this one. Left out of scope here.