Skip to content

notices: an unreadable living page fails the run; salesforce on 503 - #235

Open
adssib wants to merge 1 commit into
pl5-redisfrom
pl5-salesforce
Open

adssib wants to merge 1 commit into
pl5-redisfrom
pl5-salesforce

Conversation

@adssib

@adssib adssib commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #234

Closes #223

What this changes

  • What the fetch layer gets (checked):

    • 2026-11-20: 403;
    • 2026-11-21: 503 from Salesforce's CDN (server: AkamaiNetStorage), after the fetch layer's own retries.

    The source only fell back to a fresh Wayback snapshot on 401/403, so on 2026-11-21 every run failed. A page's reader now names the statuses its provider blocks plain fetches with (ArchiveWhenBlocked() []int). Salesforce's are 401, 403 and 503. Any other status (404, 429, 500…) still fails the read.

  • A living page that can't be read is a failed run, never "nothing changed" and never a skip. The notices kind passed a reader's ErrNothingToRead through, so a block page saved in place of the table (or a page that changed shape) read as a skipped version. Read now returns it as a plain error (errors.Is(err, plugin.ErrNothingToRead) is false), and so is a snapshot the archive can't take. Tested with a failing archive and with an archived "Access Denied" page.

  • A readable official source? Salesforce's docs site has a JSON content API that answers a plain GET: get_document_content/api_rest/api_rest_eol.htm/en-us/<doc version>, whose newest version is named by get_document/atlas.en-us.api_rest.meta. But it lags the live page. Its newest version (262.0, Summer '26) lists 31.0–66.0 as supported and has no row for the 31.0–40.0 deprecation the live page announces, so it would miss exactly what this source is for. Not used; written down as an alternative in providers/salesforce.md. The Wayback Machine's own capture of 2026-11-20 holds the current table.

#223's checklist

  • What the fetch layer receives: status 403, then 503 from AkamaiNetStorage (in the PR and providers/salesforce.md)
  • A readable official source: the docs JSON API, checked and rejected (stale); Wayback stays the source of the content
  • A 403 on a living page is an error in the run record, never "nothing changed": a blocked fetch the archive can't cover fails Read, and an empty read is an error, not ErrNothingToRead
  • Why this source updated

Checklist

  • Signed off
  • Golden unchanged (salesforce.json)
  • Tests: 401/403/503 fall back; 404/429/500/502 don't; a failing archive and a block page both fail the read
  • make check passes

Calls I made (please check)

  • 503 counts as "blocked" for Salesforce only, because its CDN answers it every time. A real Salesforce outage would also fail the archive's save, so it still ends as a failed run.

Related PRs

🤖 Generated with Claude Code

…alls back on 503 too

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adssib <[email protected]>
@adssib adssib mentioned this pull request Nov 21, 2026
2 tasks done
@claude

claude Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Claude finished @adssib's task in 58s —— View job


✅ Ready to merge. The fix does what #223 asks: Salesforce's 503 now falls back to the archive, and an unreadable living page is now a failed run instead of a skip. Tests cover both, and every check passes.

Rules

Rule Status Evidence
Metadata in the registration (Rule 1) ✅ The registration doesn't change. The source still reads the same URL. No hand-kept list has come back.
Provider page ✅ providers/salesforce.md Why this source now has the 503 (with its date), what makes a run fail, and the docs JSON API as an alternative that was checked and not used, with the reason (it lags the live page).
Golden test + quote ✅ salesforce.json is unchanged, and the golden test passes.
Drop test ✅ TestDropsAStillSupportedBand is unchanged.
Fetch only via env / kit ✅ Pages are still read only through env.Get and kit.Archiver. There is no new net/http and no file access.
Precision over recall ✅ This makes the plugin stricter: a block page or a page with no table is now an error, not zero events and not a skip.
Nothing private (Rule 2) ✅ The leak guard is clean. I found nothing private in the code, docs or PR body.

Bugs

None found. Things I checked:

  • Fallback statuses. fetch (notices.go:205) now falls back only on the statuses the reader lists, using slices.Contains. Readers that don't implement archivedWhenBlocked still return the error as before.
  • The new ErrNothingToRead branch (notices.go:153). It uses %v on purpose, so the error no longer matches ErrNothingToRead. It runs before the shape check and the citation step, so the "Access Denied" page in the test can't produce a snapshot.
  • Extract. It only runs on snapshots that Read already accepted, so its %w path can't hand a skip back to the host.
  • A real Salesforce outage. If Wayback saves Salesforce's own error page, that page has no table, so the run still fails. This backs up the call you asked us to check about 503.

Verified

  • go build ./...: OK
  • go vet ./...: OK
  • gofmt -l .: printed nothing
  • go test -race ./...: all packages pass, including plugins/notices
  • python3 scripts/leak_guard.py --all: "no banned terms (8 hashed terms checked)"

Non-blocking

  • Other notices providers. Turning ErrNothingToRead into an error affects every notices reader (retire, feed), not just Salesforce. I think that's correct for living pages. You could say it in one line of the PR description so reviewers of those providers know.
  • Related PRs. The section still has placeholders ("plugins#…", "developer-handbook#…"). Fill them in or delete them before merging, and make sure no link points to a private repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant