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(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently · Issue #6422 · developing-today/code

id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422

New issue
Copy link
New issue
Copy link
Closed
#8677
#6497
Closed
id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently#6422
#8677
#6497
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/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testswork/assignedQueue worker lifecycle state

Description

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

id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently

Summary

pkgs/id/src/currency.rs has exactly one validity contract for a RateAuthorisation body — RateAuthorisation::validate (issuer must equal the event author; rate_den must be non-zero) — and the fold enforces it (fold_authorisation filters on body.validate(author).is_ok(), currency.rs:299 at origin/main a2b4345e80). But the signing entry point, sign_authorisation (currency.rs:328), never calls it: it serializes the body and hands it straight to chain::sign. A signer can therefore produce a properly signed, chain-valid event whose body is invalid by the module's own two hard rules, and nothing anywhere will ever fold it as Live:

  • Issuer mismatch: body names issuer B, signed by A. fold_authorisation(.., expected_issuer = B) ignores the event (its author is A, not B); fold_authorisation(.., expected_issuer = A) drops the body at the validate filter (body names B). The signed object is unreachable in every fold.
  • rate_den = 0: validate rejects it as ZeroRateDenominator, so the fold drops it — yet it sits on the issuer's chain as a signed version, and (per the fold's version-selection order: filter first, then max-by-version) it does not shadow a good lower version, but it does permanently occupy its sequence slot and reads as a real signed authorisation to any consumer that decodes without folding.

This is the sign-side half of the contract the artifact module already closed in #5623 ("validate known-kind bodies in SignedArtifact::sign / sign_after"): a signed object should be validated as strictly at creation as it is at consumption, so the mistake surfaces at sign time — where the caller can fix it — instead of as a silent no-op in every later fold.

Evidence (verified this run, origin/main a2b4345e80)

  • git grep -n "validate" pkgs/id/src/currency.rs returns exactly three sites: the definition (currency.rs:153), the fold filter (currency.rs:299), and one test (currency.rs:513). sign_authorisation and sign_revoke contain no validation call.
  • Probe (laptop, worktree of origin/main at a2b4345e80, integration test pkgs/id/tests/probe_currency_sign.rs in worktree ~/git/fleet/probe-currency-sign-wt, run with cargo test --test probe_currency_sign -- --nocapture): sign(issuer-mismatch body) -> Ok, sign(rate_den=0 body) -> Ok, sign(valid body) -> Ok (control), and the mismatched body folds to None for both the signing issuer and the named issuer — dead on arrival, exactly as the code reading predicts. (The probe test asserts the desired refusal, so it fails on current main at the issuer-mismatch assertion; the printed lines above are the observed behavior.)
  • Existing test coverage signs only a valid body (signed_events_round_trip_through_the_fold), so the gap produces no red signal today.

Why it matters

sign_authorisation is the only sanctioned way to create these objects (Phase 1 of #2290; the conversion engine #5536 builds on it). An LP tool that mis-sets issuer_id (e.g. copies a counterparty's body as a template) or a rate with a zero denominator gets a successful signature, a chain event, and a reference hash to hand out — and the authorisation simply never exists for any consumer. That is the worst failure shape for a signed-object system: creation reports success, consumption silently ignores. Failing at sign time with the existing ValidateError vocabulary costs one call; the artifact precedent (#5623) shows the fleet's chosen shape for exactly this fix.

Acceptance criteria

  • sign_authorisation refuses a body that validate would reject for the signing key's issuer (issuer mismatch, rate_den = 0), surfacing the refusal through SignError (a new variant wrapping ValidateError is fine); no event is produced for an invalid body.
  • Tests: signing an issuer-mismatched body and a rate_den = 0 body both error; the existing valid-body round-trip test still passes unchanged.
  • The fold's behavior is unchanged (invalid bodies from other/legacy signers are still ignored, not folded).
  • Out of scope: extending validate's rule set — that is id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers #4071, open separately. This issue only enforces the two rules that already exist, at sign time.

Notes

  • Related: id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers #4071 (validate accepts internally inconsistent bodies — the rule-set extension; complementary, not duplicate: it never mentions the sign path, and its fix would not make sign_authorisation call validate), id(artifact): validate known-kind bodies in generic signing helpers #5623 (the artifact-module precedent for sign-side validation), id: design: RateAuthorisation as a signed ID-graph object — schema, signing, revocation #2290 / id: implement RateAuthorisation as a signed ID-graph object (design #2290) #5521 (the RateAuthorisation design/implementation this module serves).
  • Found by Lane B (new-issue-creator-code-b), weighting away from Lane A's recent fleet-config filings and Lane B's own recent dead-test filings.

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-1923

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    queue/queuedHas a queued queue task
    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 job (new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b run 2026-11-05 20:20 CST (2026-11-06T02:36Z)
    • Found via: filed this run
    • Task: Filed issue id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422 — sign_authorisation (pkgs/id/src/currency.rs:328) never calls RateAuthorisation::validate, so issuer-mismatched and rate_den=0 bodies sign successfully yet can never fold Live; verified with a laptop probe on origin/main a2b4345 (both invalid bodies sign Ok, mismatched body folds None for both issuers, valid control signs Ok and folds Live).
    • Expectation: effort s — enforce the existing validate() at sign time via SignError, with refusal tests; fold unchanged. Enqueued as a small-fix packet on repo-health-code-pilot.
    • Links: issue id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422; related issue id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers #4071 (validate rule-set extension, separate), issue id(artifact): validate known-kind bodies in generic signing helpers #5623 (artifact sign-side precedent)
  4. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    Agent note — task 10861 handed off (lane code-n)

    • Task: task 10861 (small_fix, developing-today/code), attempts 1/4.
    • Execution lane: opencode per fleet queue lane — handing off to the laptop opencode claimant; this lane does not work the task directly.
    • Fresh check (2026-11-06T02:40Z): issue id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422 is OPEN, no hard-stop labels (held, user/owned, do-not-merge, do-not-auto-edit).
    • Next: claimant launches the bound opencode session; task parked pending that launch.
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  6. 79 remaining items

  7. dezren39
    added
    status/in-progressQueue worker lifecycle state
    on Nov 11, 2026
  8. developing-today
    added
    status:in-review
    and removed
    status:to-do
    on Nov 11, 2026
  9. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    Agent note — parked (CI wait on PR #8677)

    • Agent: queue worker (repo-worker-code), lane any-b; task 10861 for issue id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422.
    • Done this shift: PR fix(id): enforce validate() in sign_authorisation (#6422) #8677 (commit 809585b, branch queue/10861-6422-sign-validate). sign_authorisation now validates the authorisation against the signing key's issuer before signing; failures surface as the new SignError::Validate(ValidateError) variant (From + Display covered). sign_revoke unchanged (no validate exists for revokes).
    • Tests: 2 new refusal tests (issuer mismatch, zero rate denominator); cargo test -p id --lib currency — 85 passed, 0 failed; no other sign_authorisation callers exist in the repo.
    • Resume: when PR fix(id): enforce validate() in sign_authorisation (#6422) #8677 checks complete and any Codex findings are dispositioned, merge — the PR closes issue id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422.
  10. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 11, 2026
  11. dezren39
    added a commit that references this issue on Nov 11, 2026

    Merge pull request #8677 from developing-today/queue/10861-6422-sign-…

    a222c69
  12. dezren39
    closed this as completedin #8677on Nov 11, 2026
  13. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 11, 2026
  14. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    Agent note — task 10861 done (fixed_merged, PR #8677 shepherded)

    • Lane: any-d (repo-worker-code), queue repo-health-code-pilot
    • Transition: claimed -> done
    • PR fix(id): enforce validate() in sign_authorisation (#6422) #8677 shepherded: merged current main into its branch (clean; diff vs main is only pkgs/id/src/currency.rs, +54/-2), re-ran the suite — cargo test -p id --lib currency::: 30 passed, 0 failed, including the two new refusals (sign_authorisation_refuses_an_authorisation_for_another_issuer, sign_authorisation_refuses_a_zero_rate_denominator). No Codex inline findings on the PR.
  15. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 11, 2026
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/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testswork/assignedQueue worker lifecycle state

    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.