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): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers · Issue #4071 · developing-today/code

id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers #4071

New issue
Copy link
New issue
Copy link
Closed
#5181
Closed
id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers#4071
#5181
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

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

Summary

RateAuthorisation::validate in the new pkgs/id/src/currency.rs (PR #3888, main c3fda1c4) checks exactly two things — issuer == event author and rate_den != 0 (currency.rs:170-180). Every other internally inconsistent body folds as Live: the fold's only validity gate is this function (currency.rs:313-320), so a signed authorisation that can never legitimately convert — or that misprices every conversion — is indistinguishable from a good one for every consumer of the fold.

Evidence (verified this run, laptop probe)

Probe: ~/git/fleet/probe-2026-11-01-laneB-currency/ on the laptop — verbatim validate from currency.rs (reference copy sha256 8f68982526219dff920586495a076d2c1a33f87fe3b6716a74e561ea821b9493 @ c3fda1c4). All of these return Ok(()):

validate(min>max) -> Ok(())                                   min_amount 10000, max_amount 1
validate(expires_at==not_before (empty window)) -> Ok(())     2000 / 2000
validate(expires_at<not_before) -> Ok(())                     2000 / 3000
validate(fee_bps 99999 (>100%)) -> Ok(())                     fee is 999.99%
validate(empty ledgers) -> Ok(())                             source_ledger "" and dest_ledger ""
validate(source==dest ledger) -> Ok(())                       ABC -> ABC
validate(rate_num 0 (zero rate)) -> Ok(())                    every conversion yields 0
validate(total_cap 0) -> Ok(())                               cap permits nothing
validate(empty allowlist (allows nobody)) -> Ok(())           AuthorisedCallers::Allowlist([])
test validate_accepts_internally_inconsistent_bodies ... ok

(Sanity: the two documented checks do fire — rate_den = 0 returns ZeroRateDenominator.)

Why it matters

validate is the library-level contract the fold, and later the Phase 2 gateway checks (#3801: window, min/max, remaining volume at submission), rely on. A body with min_amount > max_amount, an empty/inverted validity window, or fee_bps > 10000 can never be caught downstream as "invalid" — the gateway's live-state checks would evaluate a nonsense window and nonsense bounds as if they were policy, and different consumers can disagree about shapes like a zero rate or a same-ledger "conversion". The field docs in this same file state the invariants in prose ("Rate denominator; non-zero in a valid authorisation", "Mandatory expiry", "Optional fee in basis points") — rate_den is the only one enforced.

Acceptance criteria

  • validate rejects, with named ValidateError variants: min_amount > max_amount; expires_at <= not_before; fee_bps > Some(10000); empty source_ledger or dest_ledger; source_ledger == dest_ledger.
  • Shapes that are arguably legitimate-but-dead (zero rate_num, zero total_cap, empty allowlist) are either rejected with named variants or explicitly documented as valid in the field docs — one stated rule, tested either way.
  • Tests cover each rejected shape; existing currency tests still pass; the fold ignores the newly invalid bodies (covered by the existing fold-filter test pattern).

Distinct from: #3801 (gateway submission-time checks against accounts/tiers — it assumes a valid folded object), #4069 (duplicate-version fold tie-break, same file, different defect), #4063 (app_manifest parser validation, different module).

Activity

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

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b
    • Session / ID: new-issue-creator-code-b cron run 2026-11-01 17:20 CST
    • Found via: filed this run
    • Task: Filed this issue: RateAuthorisation::validate in the new pkgs/id/src/currency.rs (PR feat(id): currency.rate_authorisation + revoke types and fold (#3800) #3888, main c3fda1c) checks only issuer and rate_den != 0 (currency.rs:170-180), so bodies with min>max, expires_at<=not_before, fee_bps 99999, empty ledgers, source==dest, zero rate, zero cap, or an empty allowlist all fold as Live. Verified on the laptop (probe ~/git/fleet/probe-2026-11-01-laneB-currency/, sha256-matched currency.rs): all nine shapes return Ok(()); the rate_den=0 control is rejected.
    • Expectation: effort s; done when validate rejects the inconsistent shapes with named variants (or documents the arguably-dead ones as valid), each covered by a test.
    • Links: id(currency): fold_authorisation duplicate highest version folds by input order — no deterministic tie-break #4069 id(currency): fold_authorisation duplicate highest version folds by input order — no deterministic tie-break #4069 · id(currency): gateway verification flow + revocation-set check for RateAuthorisation (Phase 2 of #2290) #3801 id(currency): gateway verification flow + revocation-set check for RateAuthorisation (Phase 2 of #2290) #3801 · id: design: RateAuthorisation as a signed ID-graph object — schema, signing, revocation #2290 id: design: RateAuthorisation as a signed ID-graph object — schema, signing, revocation #2290
  3. github-actions
    assigned
    dezren39
    on Nov 2, 2026
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    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 2, 2026
  5. 202 remaining items

    Load more actions
  6. dezren39
    added
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 10, 2026
  7. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    Agent note · handed off — Agent: repo queue worker, lane code-u (repo-worker-code), task 8834.

    Task 8834 (small_fix) for issue #4071 handed off to the opencode claimant per runbook §1b (execution-lane assignment row 1662 = opencode). Handoff reason: scheduled shift is time-bounded; claimant is the persistent execution session. Verified fresh (2026-11-10T06:44Z): issue #4071 OPEN, no hard-stop labels, no status/needs-triage; PR #5181 OPEN with no labels. Checkpointed handed_off and parked task 8834 for 1200s. Resume condition (unchanged): after PR #5181 merges/closes or Drew explicitly releases ownership. Branch: queue/8834-4071-rateauthorisation-validation.

  8. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: repo-worker-code (lane code-e, queue task 8834)
    • State: handed_off to the opencode claimant (execution-lane row 1662)
    • Reason (Rule 4, Queue/lane design rules: no by-id blocking by default, optional platform selector, triage separate from fixes #8097): this scheduled shift is time-bounded; the claimant is the persistent execution session.
    • Revalidated fresh: issue id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers #4071 OPEN, no held/user/owned/do-not-merge/do-not-auto-edit hard stops, no status/needs-triage. Attempts 5/24 at claim time.
    • Next: claimant launches the bound opencode session for task 8834; the task is parked 1200s in the meantime.
  9. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: repo queue worker, lane code-y (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-y run 2026-11-10; task 8834
    • Task: task 8834 (small_fix) for issue id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers #4071 — reject internally inconsistent RateAuthorisation bodies; PR fix(id): reject invalid rate authorisations #5181 OPEN.
    • Fresh check: issue id(currency): RateAuthorisation::validate accepts internally inconsistent bodies — min>max, empty/inverted window, fee_bps>10000, empty/same ledgers #4071 OPEN, no held/user/owned/do-not-merge/do-not-auto-edit labels, no status/needs-triage. PR fix(id): reject invalid rate authorisations #5181 OPEN, no hard-stop labels.
    • Execution lane: opencode (lane row 1662). Handoff reason: scheduled shift is time-bounded; claimant is the persistent execution session.
    • Next: claimant launches the bound opencode session. Checkpointed handed_off; parking task 8834 for 20 minutes for the claimant window.
  10. dezren39
    added
    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 11, 2026
  11. dezren39
    added a commit that references this issue on Nov 11, 2026

    test(id): test_ prefix for new currency tests; flip validate probe to…

    a9ba9d9
  12. dezren39
    closed this as completedin #5181on Nov 11, 2026
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    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

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

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.