← Back to Pull requests

Fail root resource collection when listing returns NotFound #1235

Closed
unknown closed this pull request without merging on Dec 02, 2026 17:48 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 17:12 UTC
Author

Summary

Fail a root resource collection when ListResources returns NotFound. A missing collection endpoint is not evidence that the collection is empty.

Use the same action-scoped warning decision in the ledger transition and parallel worker. Preserve deleted-parent warnings when both parent type and ID are present, object-scoped warning behavior, and successful empty collections. No exported API or checkpoint/artifact format changes. This is nevertheless an intentional default-path behavior break: a root collection whose connector returns NotFound now fails the sync rather than completing it with a warning.

Compatibility and rollout

Connectors that treat a disabled, unlicensed, or missing root list endpoint as NotFound will now fail sync instead of silently accepting an empty collection. Before upgrading connectors to an SDK release containing this fix, connector owners should audit root-list NotFound responses and test optional/unlicensed modules. Return a successful empty page only when the connector has positive evidence that the collection is empty; do not translate an unknown failure into success. Stage affected SDK upgrades, monitor root-list failure rates, fix connector behavior where needed, and retry or re-sync previously incomplete collections. No deployed connector inventory or release sequencing has been verified by this PR; rollout requires an owner decision.

Proof

  • The dedicated regression fails against the original behavior because a failed root listing produces a nil sync error.

  • Final fixtures detect a controlled reinstatement of warn-and-drop: eight scheduler cases and all three real-store fault transports fail.

  • Fixed tests pass across direct/wrapped errors, first/continuation pages, one/four workers, deleted-parent warnings, and successful empty lists.

  • Real-store tests verify the fault fired, the persisted sync remains unfinished, a fresh connector/store can resume the same sync, and final logical content equals an uninterrupted baseline.

  • Both changed warning decisions are exercised. isActionWarning has 100% statement coverage in the scoped run; this is not a whole-package coverage claim.
  • The frozen plan and implementation obligations are in [plan.md](docs/verification/root-list-not-found/plan.md). Criterion-level evidence and exclusions are in [evidence.md](docs/verification/root-list-not-found/evidence.md).

    Checks

  • Scoped regressions and real-store cold-resume matrix: passed.

  • Full make test: passed, 69 packages with tests.

  • make build, including embedded frontend: passed.

  • Built CLI --help smoke: passed.

  • Full make race-check: run, not green. The changed pkg/sync passed under race instrumentation. The Pebble errorfs test panicked while rotating its WAL; the same panic reproduced on pristine main. The SCC test that timed out on an earlier run passed on the latest run. Neither failure is hidden or disabled.

  • Local lint: not green. Workstation golangci-lint 2.15 flags an unchanged predeclared-name use; CI-pinned 2.14 flags an unchanged ignored Close in uhttp/error_messages_test.go:892. The pinned-version diagnostic reproduced on pristine main.

  • Technical CI was green at previous head b13e10f8; the new proof followup must receive its own CI run. This is not approval or proof that the reported local race/lint failures disappeared.

  • Independent final-code source review found no additional critical defect and confirmed the bounded NF-02/NF-03 assertions. The reviewer did not run tests or validate raw gate output. Both shared mutation-validator tests were then explicitly run with matching === RUN/PASS output (see evidence.md). Deleted-parent warning cold-resume, default grant/expansion path, and deployed connector compatibility remain unproved. The PR remains draft pending rollout-owner review.
  • No live provider behavior was tested. No merge approval is claimed.

    Diff: 489 lines (+366 / -123) across 6 files Reviewer: ggreer Review duration: 18755m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 489 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.371
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1235"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.4% (MEDIUM) · Higher = larger blast radius
    47.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%