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 — id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it · Issue #6451 · developing-today/code

id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451

New issue
Copy link
New issue
Copy link
Closed
#6500
Closed
id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it#6451
#6500
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it

Summary

crate::issuer_rotation::sign_rotation (pkgs/id/src/issuer_rotation.rs:711) signs any routine rotation whose successor is the signing key itself. That rotation is dead on arrival in every chain state, by the fold's own rules (fold_rotation_chain, issuer_rotation.rs:579):

  • a routine transition counts only when its author is the current generation key (:608, RotationMode::Routine => *author == current_key);
  • a transition whose successor is the key it replaces never counts (:614, rotation.successor_key != current_key) — "it would change the generation without changing the key".

When successor_key == issuer_id(signing key), both filters fire together wherever the signer is current, and the author filter fires everywhere else. The rotation can never advance any generation chain, yet:

  • sign_rotation produces it Ok — it has the signing key, so the author is known at sign time, but it never compares rotation.successor_key to issuer_id(key);
  • IssuerRotation::validate (:354) passes it — its stateless rules (shape, predecessor, asserted-compromise, successor proof, recovery author) contain no successor-vs-author rule; the only place the rule exists is the fold's filter at :614, which discards silently;
  • the chain boundary check check_rotation (:102, the id(chain): ChainExt::validate never checks the issuer-rotation body — every other payload kind gets its check_*, rotation gets (true, Some(_)) => {} #5706 fix) cannot catch it either — it deliberately has no author context (its own doc comment says so).

So the one layer that knows both the author and the body — sign_rotation — is the one layer that doesn't check. This is the same dead-on-arrival pattern as #6422 / #6424 / #6434 / #6441 / #6443 / #6447 in sibling sign_* entry points, narrowed to the one author-local rule those layers missed: the recovery-mode analogue (successor == the compromised key being replaced) is not claimed here, because sign_rotation's caller-visible inputs do not name the replaced key.

Evidence (main @ 9e20032, laptop probe with the real id crate)

Probe: laptop worktree ~/git/fleet/probe-rotation-self at origin/main 9e20032, integration test pkgs/id/tests/probe_rotation_self.rs (cargo test --test probe_rotation_self, 1 passed):

  • Control: routine rotation gen0 → gen1 (unsigned + prove_successor(gen1)) signs Ok; fold_rotation_chain over the signed event advances: keys=2, transitions=1.
  • Case: routine rotation gen0 → gen0 — successor is the signer's own key — countersigned by gen0 via prove_successor: validate(&issuer, None) is Ok, sign_rotation returns Ok, but the fold over the signed event never advances: keys=1, transitions=0, active_generation=0.

Code reads (origin/main 9e20032):

  • pkgs/id/src/issuer_rotation.rs:711-733 — sign_rotation forwards the rotation to chain::sign with no successor/author comparison.
  • pkgs/id/src/issuer_rotation.rs:606-614 — the fold's candidate filters: validate(...).is_ok(), routine author == current_key, and successor_key != current_key.
  • pkgs/id/src/issuer_rotation.rs:354-385 — validate has no successor-vs-author rule.
  • pkgs/id/src/issuer_rotation.rs:96-116 — check_rotation doc + body: body-only subset, author context explicitly out of scope.

Why it matters

A self-rotation is the most likely fat-finger in the rotation API: a caller that builds the successor from the wrong key variable (or re-uses the current key while wiring a ceremony) gets a fully signed, signature-valid, proof-valid event that every observer's fold silently discards. The failure surfaces only as "the rotation never took effect", detached from the signing call that caused it — and in a compromise-recovery drill or a real rotation, a silently void transition reads as a chain that refused to move for unknown reasons. Refusing at sign time costs one comparison the signer already has both sides of.

Acceptance criteria

  • sign_rotation refuses a RotationMode::Routine rotation whose successor_key equals the signing key's issuer id (crate::currency::issuer_id(key)), with an error naming the rule (a new RotationError variant or the existing SignError surface, triage's choice); no event is produced.
  • Pinning tests cover: routine self-rotation refused at sign time; the gen0 → gen1 control still signs and folds to generation 1; a CompromiseRecovery rotation whose successor is the recovery (signing) key is unaffected (that form is not fold-dead — only the routine self-replacement is claimed here).
  • Triage decides whether validate should also gain the author-side rule (it receives author, so the same comparison is available there) — sign-side refusal is the minimum fix.
  • cargo test -p id issuer_rotation (or the module's test filter) passes on the laptop / in CI.

Related: #2804 (rotation design), #5526 (implementation), #5706 (chain-boundary body check). Sibling sign-domain issues: #6422, #6424, #6434, #6441, #6443, #6447.

Activity

Next
  1. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-1940

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    queue/queuedHas a queued queue task
    status/needs-triageNot yet triaged; needs a first look
    on Nov 6, 2026
  3. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b (Lane B, developing-today/code)
    • Session / ID: cron new-issue-creator-code-b run 2026-11-06T05:50Z
    • Found via: filed this run
    • Task: Filed after verification on the laptop: probe ~/git/fleet/probe-rotation-self (real id crate, origin/main 9e20032) — a routine rotation to the signing key itself passes validate and signs Ok, yet fold_rotation_chain never advances (keys=1, transitions=0); the gen0 → gen1 control folds to generation 1.
    • Expectation: effort/s — one author-local comparison in sign_rotation (plus pinning tests); packet enqueued for triage on queue repo-health-code-pilot.
    • Links: packet packet-6451-triage.json (goal hidden_files)
  4. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  5. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-i
    • Session / ID: task 10925
    • Found via: queue claim
    • Task: Task 10925 for issue id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451 assigned to the opencode execution lane; handing off to the opencode claimant.
    • Expectation: the bound opencode session drives task 10925 to its terminal state; if the claim lease expires first, task 10925 returns to the queue
    • Links: task 10925
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    on Nov 6, 2026
  7. 25 remaining items

  8. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 6, 2026
  9. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up / merging

    • Agent: queue worker (repo-worker-code), lane code-w
    • Session / ID: task 10983
    • Found via: queue claim (direct execution lane; resume from awaiting_ci)
    • Task: Resumed task 10983 for issue id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451 on PR id(issuer_rotation): refuse routine self-rotation at sign time and in validate (#6451) #6500. Fresh verification: issue id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451 OPEN, no hard-stop labels; PR id(issuer_rotation): refuse routine self-rotation at sign time and in validate (#6451) #6500 head 21d07db matches prior checkpoint; diff reviewed — sign-time + validate refusal of routine self-rotation, new RotationError::RoutineSuccessorIsAuthor, 4 new tests incl. control and recovery-scope cases; prior holder's laptop run: cargo test -p id issuer_rotation — 28 passed incl. 4 new; Codex review completed on this head with no findings. Basic PR checks remain QUEUED (fleet-wide Actions backlog); per Drew's merge authority (CI runs on main; PRs do not wait for CI when the work is verified), merging now and will watch the main run.
    • Expectation: PR id(issuer_rotation): refuse routine self-rotation at sign time and in validate (#6451) #6500 merged; task 10983 completed
    • Links: issue id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451, PR id(issuer_rotation): refuse routine self-rotation at sign time and in validate (#6451) #6500
  10. dezren39
    added a commit that references this issue on Nov 6, 2026

    Merge pull request #6500 from developing-today/queue/10983-6451-routi…

    85c435e
  11. dezren39
    closed this as completedin #6500on Nov 6, 2026
  12. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 6, 2026
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 6, 2026
  14. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-w
    • Session / ID: task 10983
    • Task: PR id(issuer_rotation): refuse routine self-rotation at sign time and in validate (#6451) #6500 merged (merge commit 85c435e); issue id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451 auto-closed by the merge. Verified fresh post-merge: PR state MERGED, issue state CLOSED. Task 10983 completed with outcome fixed_merged. Basic PR checks were still QUEUED at merge time (fleet-wide Actions backlog); the main-branch run is the CI of record per Drew's merge authority.
    • Links: issue id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451, PR id(issuer_rotation): refuse routine self-rotation at sign time and in validate (#6451) #6500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    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.