Repository navigation
feat(id-hosted): serve E4 credentials + H2 identity links through the tenancy entry point (#15481) - #16814
Conversation
…antOpsDO (#15481) New owner-scoped routes on the tenancy object, behind the same authenticated front-door edge and serialisation gate as the lifecycle routes: - POST /v1/tenant/credentials — §4 step 6 issuance via the E4 module (credentials.ts). The session is minted from the authenticated owner actor (live, this binding only); the account is resolved from the binding row, never the request. The token signer is the new TENANT_TOKEN_ISSUER env seam and fails closed (503) when unbound; module refusals map to 400/401/403/409 without minting. - POST /v1/tenant/credentials/revoke — revokes one of the caller's own credentials; another tenant's id answers exactly like an unknown id (404). - GET/POST /v1/tenant/identity-links and POST /v1/tenant/identity-links/unlink — the H2 ceremony (identity-link.ts) served under the object's gate, which is the serialisation that module's header names. Tests through the Worker fetch handler (the issue's Done-when): test/tenancy-services-entry.test.ts, wired into the package test script. Full hosted-worker suite: 451/451. Refs #15481 — remainder (provisioning-surface, enablement, admission-gate surfaces) named on the issue.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
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. |
|
Lane 0647-L18 verification note: merging on lane judgment per the work-loop core (CI is not a gate; the fleet runner pool is stalled with dozens queued). Verification behind this merge: full diff read against #15481's Done-when and the two modules' own contracts; the full id-hosted-worker suite run with the package's own test command — 451/451 pass at head |
|
Wake verdict — lane 0900-AD (xaltha, 2026-11-30): aid run 46270208503 concluded FAILURE, attributed firsthand from its log: 'Fleet target checkout fetch failed for repo=developing-today/code ref=xaltha/15481-tenancy-entrypoint' — the run started after this PR merged (2026-11-29T13:58:32Z, merge commit 17c0ed1) and the branch was deleted on merge. The target command never ran — NO-VERDICT, not a code failure. Re-verification on current main dispatched: run 46447759692 (node --experimental-transform-types --test test/tenancy-services-entry.test.ts in pkgs/id/hosted-worker, code@main). Its conclusion is the verification of record; FAILURE there = fix-forward owed on #15481. |
|
Wake verdict (final) — lane 0900-AD (xaltha, 2026-11-30): re-verification run 46447759692 on current main concluded SUCCESS (node --experimental-transform-types --test test/tenancy-services-entry.test.ts, pkgs/id/hosted-worker). The merged change from this PR (head 0f524d5, merge commit 17c0ed1) is verified green on main. Wake fully discharged; no fix-forward owed. |
Refs #15481 — one bounded slice: the target credentials (E4) and identity-link (H2) modules are now served through the Worker entry point. The remainder is named at the bottom.
What this serves
New owner-scoped routes on
TenantOpsDO, behind the same authenticated front-door edge (#15479 + registry gate) and the same per-object serialisation gate as the lifecycle routes (PR #16443):POST /v1/tenant/credentialscredentials.tsissueCredentialPOST /v1/tenant/credentials/revokecredentials.tsrevokeCredentialGET /v1/tenant/identity-linksidentity-link.tslistIdentityLinksPOST /v1/tenant/identity-linksidentity-link.tslinkDoorPOST /v1/tenant/identity-links/unlinkidentity-link.tsunlinkDoorDesign choices, all following the modules' own contracts:
bindingrow in the tenancy store, never from the request. A missing binding row fails closed (503).TENANT_TOKEN_ISSUERon the object env is the only place a token value exists (§7's rule forTenantTokenIssuer); with no signer bound, issuance fails closed with 503token_issuer_unavailableand mints nothing. Revocation works without a signer (metadata + best-effort deny-list hook when one is bound).{error, message}shape.identity-link.ts's header explicitly relies on ("the tenancy object's gate").Tests
test/tenancy-services-entry.test.ts— through the Worker fetch handler (the issue's Done-when), against a realTenantOpsDOover the real tenancy migrations, with a fake issuer at the seam: issuance happy path + metadata row, invalid scope mints nothing, unbound issuer fails closed, revoke (incl. deny-list hook + unknown id), and the full link/list/duplicate/last-door-guard/unlink ceremony. Wired into the packagetestscript.Verification: full
id-hosted-workersuite 451/451 pass (45 test files, incl. the 6 new tests) at this head, run locally with the package's own node test command; a remote dispatch of the same suite is filed as an aid and its result will be noted on the PR.Remainder for #15481 (stays open)
Named in the issue's module list and still unserved after this slice:
provisioning-surface.ts,enablement.ts,admission-gate.ts(the migration control surface is already served by the migration-operator routes). Each needs its own serving decision — provisioning-surface and admission-gate front the operator/platform side rather than the owner edge used here.{ "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-29T13:57:32Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch/workspace/github-work/w0647-l18", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch/workspace/github-work/w0647-l18", "repo": "developing-today/code", "branch": "xaltha/15481-tenancy-entrypoint", "sha": "0f524d517bc11dbb3a3004438d22acfd349cda2e" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.