Skip to content

feat(blob): add service URI policy and External cache hooks - #10989

Merged
Xuanwo merged 2 commits into
mainfrom
xuanwo/blob-external-policy-cache
Nov 12, 2026
Merged

Xuanwo merged 2 commits into
mainfrom
xuanwo/blob-external-policy-cache

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Controlled services need to reject stored External Blob references outside registered storage bases before URI resolution or size probing, while immutable payload caches must not return stale External data.

Add an opt-in Session policy for unregistered External reads and logical reference writes. Embedded sessions retain the existing Allow default. Provider filtering removes selected schemes and clears cached bindings; it does not revoke previously issued handles. Policy-aware writes report that remote tables require registered storage bases. Explicit Ingest and low-level file APIs retain their existing contracts.

Add an External-store wrapper hook that derives a view from the resolved store, preserving credentials, endpoints, connection pools and provider state. Immutable cache wrappers can bypass their cache for External reads while retaining ordinary Managed behavior. A weak cache reuses live External views without a reference cycle, and source/scheduler identity prevents stores or wrapper views with matching prefixes from being combined.

Behavioral validation covers rejection before source access, filtered local providers, registered-base matching, repeated locator batches sharing one executor, fresh External reads after overwrite, and zero origin reads for warm Managed payloads. The final reviewed delta passed 483 IO and 227 Blob tests; earlier 189 Dataset IO cases and two doctests remain applicable. The integrated tree adds only the upstream SAFETY-comment fix from #10980; full root Clippy passed on the integrated PR head (cargo clippy --all --tests --benches --profile ci -j 4 -- -D warnings, exit 0). Hosted CI and formal maintainer approval passed before merge.

Service adoption must propagate the policy when rebuilding Sessions and implement the External hook in its immutable cache wrapper. Production RAM/NVMe, cloud credentials and REST/SQL integration are separate downstream work. This PR does not establish that those service boundaries are already enforced. It overlaps the internal read keys in #10171; a separately reviewed integration candidate with that PR retained Arc-instance-plus-path scheduler identity and row-independent entries and passed 605 Blob tests (0 failures). This does not claim downstream Sophon adoption or a merged prerequisite.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added A-encoding Encoding, IO, file reader/writer A-docs Documentation enhancement New feature or request labels Nov 12, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

No merge-blocking issues found. The opt-in policy and External cache view cover the intended library boundary. Service adoption still requires preserving the policy when rebuilding Sessions and implementing wrap_external_blob in immutable cache wrappers.

@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. and removed K-approved Latest Gatekeeper recommendation permits acceptance. labels Nov 12, 2026
@Xuanwo
Xuanwo merged commit 8e17d85 into main Nov 12, 2026
47 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/blob-external-policy-cache branch November 12, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docs Documentation A-encoding Encoding, IO, file reader/writer enhancement New feature or request K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants