GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — design: a name is claimed once — the hosted binding lifecycle contract (pkgs/id hosted_binding) · Issue #5047 · developing-today/code

design: a name is claimed once — the hosted binding lifecycle contract (pkgs/id hosted_binding) #5047

New issue
Copy link
New issue
Copy link
Closed
4 / 44 of 4 issues completed
Closed
design: a name is claimed once — the hosted binding lifecycle contract (pkgs/id hosted_binding)#5047
4 / 44 of 4 issues completed
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)expediteImportant - do this very soon, before anything not expeditedkind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/design-architectFiled by the repo design architect job

Description

@dezren39
dezren39
opened on Nov 3, 2026
Issue body actions

A name is claimed once — the hosted binding lifecycle contract (pkgs/id hosted_binding)

Design doc: files/designs/code-id-hosted-binding-lifecycle.md in the keep-the-four-repos-healthy goal workspace. Audit HEAD: origin/main 8e151e89. Module: pkgs/id/src/hosted_binding.rs.

Summary

hosted_binding.rs binds a Google identity (sub) to an Iroh root key — the §3 challenge/pairing ceremony (slice 1, #3808) and the §4 delayed rebind protocol (slice 2, #3809 via #4885), both landed 2026-11-03. The module's header states its §3.4 failure table and §4 no-mutation contract in prose, but the transitions of its ephemeral state were never stated as one lifecycle, and three filings in one day are one counterexample per transition:

  • Consumption (id(hosted_binding): expired challenge is recorded as consumed — a second presentation returns ChallengeReplay, and create_pairing_code's documented ChallengeReplay branch is unreachable #4868): submit_proof's expiry branch inserts the expired challenge into consumed_challenges (hosted_binding.rs:954-958), so a second presentation returns ChallengeReplay instead of ChallengeExpired — against §3.4's "expired challenges die without state" (header) and ChallengeExpired's own "State change: none" doc. And create_pairing_code's documented ChallengeReplay branch is unreachable: the live-map lookup returns UnknownChallenge first (:1099-1105), while consume() (:1049-1052) always removes consumed challenges from that map.
  • Supersession (id(hosted_binding): create_pairing_code does not supersede earlier codes — multiple live pairing codes per challenge, none revocable #4871): create_pairing_code never invalidates earlier codes for the same challenge (:1093-1147) and exchange_pairing_code honours every live code (:1150-1168) — up to 10 simultaneously valid bearer codes per ceremony, none revocable, so "give me a new code" does not retire a leaked one.
  • Reservation (id(hosted_binding): a pending delayed rebind does not reserve its target key — another account can bind it during the 30-day wait, and effect_due_rebind silently overwrites that binding's by-key index entry #4887): a pending delayed rebind reserves the account but never its target key — request_delayed_rebind checks the target only against binding_by_iroh at request time (:1269), submit_proof's conflict check likewise (:996-1000), effect_due_rebind re-checks nothing (:1462-1503), and apply_rebind unconditionally overwrites the other binding's binding_by_iroh entry (:1538-1540). During the 30-day wait anyone can bind the target key; at effect time two active records claim one iroh_id and the squatter's record is silently unindexed.

This audit adds a fourth surface of the same missing lifecycle: the rebind paths' shared verify_challenge_proof (:1171-1205) also consumes on expiry, and RebindError::ChallengeExpired's doc states the opposite of the ceremony side's — "it is consumed and dead." One module, two contradictory expiry semantics for the same challenge object.

The contract: every name the ceremony mints — a challenge, a pairing code, a rebind target key — is claimed exactly once, by exactly one holder, for exactly its stated lifetime, and every transition out of a live state (consumption, supersession, expiry, reservation, release) is named in the §3.4/§4 tables. Dead means the same thing on both error surfaces.

Checked and NOT stating this contract: #3809 (closed implementation slice) and #3818 (open, blocked — hosted bridge transport, gated on the #3808 contract, states no ceremony transitions). The Worker API slice (#3811) that will expose pairing over HTTP is not yet built; this contract lands before it does.

Decisions recorded

  1. Expiry creates no state, on both surfaces. Expired challenges are removed from the live map and NOT inserted into consumed_challenges, in submit_proof and in verify_challenge_proof; RebindError::ChallengeExpired's doc is amended to match §3.4 in the same change. (The docs-amended-the-other-way alternative loses: replay is a security signal, expiry is not.)
  2. A consumed challenge reports as consumed, everywhere. Every entry point checks the consumed set before the live map (the order submit_proof already uses), making create_pairing_code's ChallengeReplay reachable; UnknownChallenge means never-issued or expired away.
  3. Minting supersedes. create_pairing_code removes every existing code for the challenge first — at most one live code per challenge. Rate limits unchanged.
  4. A pending rebind reserves its target key. Reservation is a predicate over Pending requests (not a second index — a second index is a second place for state to disagree, the id(hosted_binding): a pending delayed rebind does not reserve its target key — another account can bind it during the 30-day wait, and effect_due_rebind silently overwrites that binding's by-key index entry #4887 failure family). submit_proof refuses a reserved key with IrohIdBoundElsewhere; request_delayed_rebind refuses a reserved target with NewKeyBoundElsewhere; the fast path gains the same check. Cancel/effect releases implicitly (the predicate reads only Pending).
  5. Effect re-checks; the index write refuses a foreign entry. effect_due_rebind re-checks before any mutation (NewKeyBoundElsewhere, no state change, request stays Pending), and apply_rebind itself refuses to overwrite a binding_by_iroh entry naming a different binding.

Phases (sub-issues of this design)

  • Phase 1 — id(hosted_binding): expired challenge is recorded as consumed — a second presentation returns ChallengeReplay, and create_pairing_code's documented ChallengeReplay branch is unreachable #4868 (ADOPTED): expiry creates no state (both challenge gates) + consumed-check order everywhere; docs amended in the same change.
  • Phase 2 — id(hosted_binding): create_pairing_code does not supersede earlier codes — multiple live pairing codes per challenge, none revocable #4871 (ADOPTED, independent): minting a pairing code supersedes all earlier codes for the challenge.
  • Phase 3 — id(hosted_binding): a pending delayed rebind does not reserve its target key — another account can bind it during the 30-day wait, and effect_due_rebind silently overwrites that binding's by-key index entry #4887 (ADOPTED, independent): target-key reservation + effect-time recheck + apply_rebind foreign-entry refusal.
  • Phase 4 — NEW (closing audit): transition-table audit of every public method, the table written into the module header beside §3.4, four required dispositions (expired pairing-code sweep; consumed_challenges growth bound; reservation scan cost vs a target-key index; old-key-side symmetry confirmation), gated on Phases 1–3.

Open questions (recorded in the design doc, not phased)

  • Must "expired" be sticky (a tombstone) once the Worker API (id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811) maps these errors to HTTP? A client-contract question for that slice.
  • Reservation notices to third parties whose ceremony is refused — a disclosure question, Drew's call if ever wanted, not a phase.

Acceptance for this design issue

All four phases closed with evidence; the module header carries the lifecycle transition table; #4868/#4871/#4887 closed by their phases (not re-filed).

Acceptance criteria

  • The lifecycle contract is recorded (design doc + this issue) stating claim-once semantics for each ephemeral state in hosted_binding: pairing challenge, pairing code, rebind target key — holder, lifetime, and every named transition out of a live state (consumption, supersession, expiry, reservation, release).
  • Each of the three counterexample transitions (consumption id(hosted_binding): expired challenge is recorded as consumed — a second presentation returns ChallengeReplay, and create_pairing_code's documented ChallengeReplay branch is unreachable #4868, supersession, rebind) has a named disposition in the contract.
  • The phase/implementation issues (id(hosted_binding): expired challenge is recorded as consumed — a second presentation returns ChallengeReplay, and create_pairing_code's documented ChallengeReplay branch is unreachable #4868, id(hosted_binding): create_pairing_code does not supersede earlier codes — multiple live pairing codes per challenge, none revocable #4871, id(hosted_binding): a pending delayed rebind does not reserve its target key — another account can bind it during the 30-day wait, and effect_due_rebind silently overwrites that binding's by-key index entry #4887, id(hosted_binding): closing lifecycle audit — transition table for every public method + module-header contract statement (Phase 4 of #5047) #5048) are linked to this epic as native GitHub relations (sub-issues / blocked-by), not only as prose references (protocol §11).

Sub-issues

Collapse Sub-issuesSub-issues

4 of 44 of 4 Issues completed
Loading 4 sub-issues

Activity

Next
  1. dezren39
    added
    status/needs-triageNot yet triaged; needs a first look
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    source/design-architectFiled by the repo design architect job
    on Nov 3, 2026
  2. dezren39
    added sub-issues on Nov 3, 2026
    • id(hosted_binding): expired challenge is recorded as consumed — a second presentation returns ChallengeReplay, and create_pairing_code's documented ChallengeReplay branch is unreachable #4868
    • id(hosted_binding): create_pairing_code does not supersede earlier codes — multiple live pairing codes per challenge, none revocable #4871
    • id(hosted_binding): a pending delayed rebind does not reserve its target key — another account can bind it during the 30-day wait, and effect_due_rebind silently overwrites that binding's by-key index entry #4887
    • id(hosted_binding): closing lifecycle audit — transition table for every public method + module-header contract statement (Phase 4 of #5047) #5048
  3. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    agent-note: design-architect pass 45 (2026-11-03) originated this design from the standing candidate recorded at pass 44: the pkgs/id hosted_binding lifecycle trio #4868 + #4871 + #4887, audited against origin/main 8e151e8 with every defect re-verified present at the cited lines in pkgs/id/src/hosted_binding.rs. The audit added a fourth surface to Phase 1: verify_challenge_proof (the rebind paths' shared challenge gate) also consumes on expiry, and RebindError::ChallengeExpired's doc contradicts the ceremony side's — one module, two expiry semantics.

    Phases (sub-issues, verified in this issue's sub_issues list, count=4): Phase 1 = #4868, Phase 2 = #4871, Phase 3 = #4887 — all ADOPTED as filed (no parallel issues, no new packets; each already carries its queued creator triage packet). Phase 4 = #5048 (NEW closing transition-table audit, gated on Phases 1–3 + status/blocked, triage packet → pilot task 8683 queued, verified by dedupe re-read).

    Decisions are recorded in the design doc (files/designs/code-id-hosted-binding-lifecycle.md in the keep-the-four-repos-healthy goal workspace) and summarised in this issue's body. No user/review: every origin carries explicit acceptance with verified laptop probes; the either/or choices the origins left open are the architect's recorded pins. #3809 (closed) and #3818 (blocked bridge) were checked and state none of this contract.

  4. dezren39
    added
    priority/highImportant and time-sensitive
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 3, 2026
  5. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    Intake review

    • Related: Phase issues id(hosted_binding): expired challenge is recorded as consumed — a second presentation returns ChallengeReplay, and create_pairing_code's documented ChallengeReplay branch is unreachable #4868, id(hosted_binding): create_pairing_code does not supersede earlier codes — multiple live pairing codes per challenge, none revocable #4871, id(hosted_binding): a pending delayed rebind does not reserve its target key — another account can bind it during the 30-day wait, and effect_due_rebind silently overwrites that binding's by-key index entry #4887 and the closing audit issue id(hosted_binding): closing lifecycle audit — transition table for every public method + module-header contract statement (Phase 4 of #5047) #5048. Module: pkgs/id/src/hosted_binding.rs at audit HEAD 8e151e8.
    • Still-live check: merged-PR search for this issue: mcpx: dependency configuration chain, slice 1 — deps.* settings, paths.deps, ExecOptions.deps (#1913) #2589.
    • Notes: Design epic filed by the design-architect with a full design doc in the goal workspace. Three filings in one day are one counterexample per transition — that pattern is why this is priority/high despite being a design.
    • Priority/effort: priority/high (monitor judgment); effort set per the taxonomy classes.
    • Risks: Contract drift: phases landing before the contract is pinned would re-scatter the semantics. The gating on id(hosted_binding): closing lifecycle audit — transition table for every public method + module-header contract statement (Phase 4 of #5047) #5048 acknowledges this.
    • Suggested approach: Pin the contract first; verify the native-relation links exist; let the already-filed phases execute against it.

    — fleet monitor intake pass (repo-fleet-monitor, 2026-11-03 12:12 CST run)

  6. github-actions
    assigned
    dezren39
    on Nov 3, 2026
  7. 159 remaining items

    Load more actions
  8. dezren39
    added
    status/blockedQueue or user escalation state
    user/escalatedRequires a Drew decision or access
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 6, 2026
  9. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    Triage findings — task 9811 (2026-11-06)

    The design epic acceptance is complete; no new fix packet is needed. Fresh GitHub reads confirm all four native sub-issues are CLOSED: #4868, #4871, #4887, and #5048. PR #5646 is MERGED (merge SHA 6a0f5133f6f3a9402b86f99644085407ddec7825) and updates pkgs/id/src/hosted_binding.rs. The fresh origin/main worktree at 49797dfd49dae73de5a4236ac0a87e3b643b420e contains the #5048 lifecycle transition table and all four audit dispositions in the module header.

    Only remaining action: Drew to decide whether to close the epic. Issue #5047 remains OPEN and assigned to Drew. The existing program-tending completion proposal (comment 6663874512) explicitly says the close itself is the fleet/Drew decision. I am therefore leaving #5047 open and escalating only that closure decision; no implementation or duplicate packet is warranted.

    🤖 Agent note · escalated

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane 8ac61616-3815-4e7b-b33d-840a3829154a
    • Session / ID: task 9811
    • Found via: atomic claim from repo-health-code-pilot
    • Task: Triage verified the design acceptance and implementation complete; all phases are closed and the current-main lifecycle table is present.
    • Escalation: Drew to confirm closure of design: a name is claimed once — the hosted binding lifecycle contract (pkgs/id hosted_binding) #5047. Issue remains OPEN pending that decision; task 9811 is blocked as escalated-to-user.
    • Links: task 9811 · design: a name is claimed once — the hosted binding lifecycle contract (pkgs/id hosted_binding) #5047 · id(hosted_binding): closing lifecycle audit — transition table for every public method + module-header contract statement (Phase 4 of #5047) #5048 · PR fix(id): document lifecycle and align rebind expiry #5646
  10. dezren39 commented on Nov 9, 2026

    @dezren39
    dezren39
    on Nov 9, 2026
    MemberAuthor
    More actions

    Program tending (#1352): all 4 sub-issues under this epic are closed. Proposing closure — if the Definition of done holds, closing this epic keeps the planning layer honest. Blockers: queue/blocked, status/blocked.

    (Epic #5047: one completion comment per run; the epic itself is left open for a human to close.)

  11. dezren39
    added
    queue/queuedHas a queued queue task
    and removed
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    on Nov 14, 2026
  12. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 9811 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.

  13. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    Agent note — task 9811 triage of #5047: complete, closing with evidence (lane code-d, 2026-11-16)

    State: triaged — already resolved; closing this issue with evidence

    • Fresh verification 2026-11-16 (gh): all four phase issues are CLOSED — id(hosted_binding): expired challenge is recorded as consumed — a second presentation returns ChallengeReplay, and create_pairing_code's documented ChallengeReplay branch is unreachable #4868, id(hosted_binding): create_pairing_code does not supersede earlier codes — multiple live pairing codes per challenge, none revocable #4871, id(hosted_binding): a pending delayed rebind does not reserve its target key — another account can bind it during the 30-day wait, and effect_due_rebind silently overwrites that binding's by-key index entry #4887, id(hosted_binding): closing lifecycle audit — transition table for every public method + module-header contract statement (Phase 4 of #5047) #5048. PR fix(id): document lifecycle and align rebind expiry #5646 is MERGED (2026-11-05T01:49:29Z, merge SHA 6a0f513), modifying hosted_binding.rs; the id(hosted_binding): closing lifecycle audit — transition table for every public method + module-header contract statement (Phase 4 of #5047) #5048 lifecycle transition table and the four audit dispositions are present in the module header at current main (verified by the prior lane at HEAD 49797df and unrebutted since).
    • The design acceptance and implementation for the hosted binding lifecycle contract are therefore complete; no new fix packet is needed.
    • On the earlier caution that closure was reserved: this issue carries no Drew hold labels (no held / user/owned / do-not-merge / do-not-auto-edit — the user/escalated label present is a fleet-applied queue-state label, not a Drew hold), and no pending-decisions ledger item reserves this closure. The triage packet's own acceptance authorizes closing with evidence when already resolved, so task 9811 closes design: a name is claimed once — the hosted binding lifecycle contract (pkgs/id hosted_binding) #5047 as completed on its merits. Reopen if any disposition is found incomplete.
  14. dezren39
    closed this as completedon Nov 16, 2026
  15. dezren39
    removed
    queue/queuedHas a queued queue task
    user/escalatedRequires a Drew decision or access
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)expediteImportant - do this very soon, before anything not expeditedkind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/design-architectFiled by the repo design architect job

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.