feat(selfhost): use conditional REST validators for backfill segments#1901
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-30 23:44:08 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
…dence (#1942) (#1976) #1901 added ETag/If-Modified-Since validators for backfill segments, but fetchPagedSegment loaded the prior segment (and so built the conditional request) only when mode===resume. The scheduled cadence runs light/full, so the 304 fast-path never fired on the path that actually runs — every 30-min light crawl re-listed labels/open-issues/open-PRs at full cost. Load the prior segment for every mode so a light/full crawl sends If-None-Match and an unchanged single-page list returns a 0-body 304. Resume pagination stays gated on canResumePreviousScan; open-scan reconciliation segments still force allowEtag:false, so close-detection is unchanged.
Summary
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:cipassed after rebasing on upstreammain; the scopedtest/unit/backfill.test.tssuite also passed.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable; backend-only queue/backfill behavior change.
Notes