GeezerVison is showing github.com — id hosted-worker: thread the §7 CSE choice through the slice-3 blob plane (#2852) by developing-today-fleet[bot] · Pull Request #15072 · developing-today/code
Conversation
Refs #2852 — the last unthreaded surface on the hosted provisioning + SSO→ID binding tracker: the §7 client-side-encryption choice now reaches the slice-3 data plane (pkgs/id/hosted-worker).
What changed
- Front door (
src/worker.ts) consumes x-client-side-encryption from the authenticated internal caller — the binding record (BindingRecord::client_side_encryption, pkgs/id/src/hosted_binding.rs) is its source — strips client-supplied copies under both the caller and internal names, and re-sets it as the internal header x-hosted-client-side-encryption. Same posture as the bound ID key (x-iroh-id).
- Per-user DO (
src/user-do.ts) binds the choice into its persisted identity at first routed request (absent context binds as off — the pre-threading behaviour every existing object already uses) and fails closed with identity_mismatch on a later context that disagrees: per §7 the choice changes only by export/import to a new binding. Malformed context values fail closed (invalid_cse_context).
- Blob keying (
blobObjectKey): plaintext blobs keep the bare-hash R2 key (cross-user dedupe, §5.1); client-encrypted blobs are keyed cse/<binding>/<hash> so they dedupe only per user (§7). Blob PUT, blob GET, and the §6 bridge export all resolve through the key. /v1/state, /v1/usage, /v1/export, and the blob PUT response now report the choice in force.
- Test harness gains a
cse query param alongside iroh.
- README records the §7 dedupe exception.
Verification (remote only)
The fleet-command executor image has no node/npm (known: dezren39/fleet#111), so the run used the documented nix shell nixpkgs#nodejs_22 fallback — node v22.23.5.
Run 45603663028, head 88c54924230f:
- Focused suites (every suite touching the changed files):
test/cse-blobs.test.ts test/blobs.test.ts test/front-door.test.ts test/usage.test.ts test/export.test.ts test/bridge-do.test.ts — 46 tests, 46 pass, 0 fail (TEST_EXIT=0).
- All 8 new tests pass by name, including "client-encrypted blobs dedupe only per user (§5.1/§7 oracle)", "the bound CSE choice is immutable identity", and "front door strips a client-supplied internal CSE header".
npm install exit 0; npm run typecheck exit 0.
Caution recorded for reviewers: two earlier runs (45590202189, 45597620400) reported misleading conclusions because npm/node were absent (exit 127) under set +e; their logs show no test ever executed. Only run 45603663028 is evidence.
Tracker state this completes
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-25T11:53:58Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": "/home/hatch",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/hatch",
"repo": "developing-today/code",
"branch": "main",
"sha": "8826be7a94faf495a143e45eab53db6f11c96eab"
},
"auth_subject": "felix",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…lane (#2852)
The binding's client-side-encryption choice (spec
2026-10-30T22-45-00Z §7) now reaches the hosted data plane:
- The front door consumes x-client-side-encryption from the
authenticated internal caller (the binding record is its
source), strips client-supplied copies under both names, and
re-sets it as the internal x-hosted-client-side-encryption
routing header — the same posture as the bound ID key.
- The per-user DO binds the choice into its persisted identity
at first routed request (absent context binds as off, the
pre-threading behaviour) and fails closed on a later context
that disagrees: per §7 the choice changes only by
export/import to a new binding.
- Blob R2 keys follow blobObjectKey: plaintext stays bare-hash
(cross-user dedupe, §5.1); client-encrypted blobs are scoped
cse/<binding>/<hash> so they dedupe only per user (§7). PUT,
GET and the §6 bridge export all resolve through the key.
- /v1/state, /v1/usage and /v1/export report the choice in
force; the blob PUT response names it too.
- Tests (oracle: §5.1/§7): per-user-only dedupe for encrypted
blobs, plaintext/encrypted separation, identity immutability,
malformed context fail-closed, front-door forwarding and
client-copy stripping. Test harness gains a cse query param.
Slice 3's other remainder (metering, ceilings, read-only +
export-at-cap) already landed via #3811 (PRs #5286/#10129/
#10132) and was verified closed 2026-11-23; slice 4's CSE
threading already landed in hosted_export.rs/hosted_ingest.rs.
This PR is the last unthreaded surface the tracker names.
Refs #2852
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
84af8542-c1f5-4b1a-9927-5ff5dc73984f
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|