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 — [pkgs/id] B16 ScopedLedger reserve() never reclaims expired open reservations: OverCap deadlock (B20/B21 prune-on-full) · Issue #14207 · developing-today/code

[pkgs/id] B16 ScopedLedger reserve() never reclaims expired open reservations: OverCap deadlock (B20/B21 prune-on-full) #14207

New issue
Copy link
New issue
Copy link
Done
#14389
Done
[pkgs/id] B16 ScopedLedger reserve() never reclaims expired open reservations: OverCap deadlock (B20/B21 prune-on-full)#14207
#14389
Copy link
Labels
status:done

Description

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

Summary

ScopedLedger::reserve() counts expired-but-still-open reservations against every scope cap and never reclaims them inline, so a ledger whose caps are pinned by expired open entries refuses all new work with BudgetError::OverCap until some out-of-band caller remembers to drive close_expired() + prune(). B20 (DedupLedger::observe) and B21 (RequestCoordinator::observe) both prune expired entries when full and only then return LedgerFull; B16 has no equivalent recovery path.

Where

  • pkgs/id/crates/id-sync/src/federation/slices/b16_fanout_budget.rs
    • ScopedLedger::reserve() (168-231): cap check at 205-215 uses held + spent with no expiry filtering, and the function body contains no close_expired/prune call (verified by grep: those symbols appear only at 293/308 definitions).
    • close_expired() (293-304) and prune() (308-314, only drops closed tombstones) are separate manual steps.
  • Contrast:
    • b20_request_identity.rs:295-299: observe() prunes when full, then returns LedgerFull only if still full.
    • b21_result_dedup.rs:324-330: same prune-on-full pattern.

Reproduction (code-level)

  1. Ledger with cap 10 on one scope/dimension.
  2. reserve(id1, {Work:10}, scopes, expires_at=10, now=0) -> Ok (pins 10 held).
  3. Advance to now=20 without calling close_expired.
  4. reserve(id2, {Work:1}, scopes, expires_at=30, now=20) -> Err(OverCap), even though id1 expired at 10 and its 10 units are unusable. Recovery requires an explicit close_expired(20) first; reserve never does it.
  5. The only in-repo callers of close_expired are the B16 integration tests (crates/id-sync/tests/federation_b16.rs:234,580); no production loop drives it.

Expected vs actual

  • Expected: like B20/B21, a full/over-cap reserve first reclaims what is already expired (close expired opens, then check caps), and only then refuses with OverCap — or documents that the caller must drive close_expired before every reserve.
  • Actual: expired open entries pin caps indefinitely; new work deadlocks with OverCap until manual intervention.

Dedupe

  • Searched open issues for fan-out/fanout/budget/ScopedLedger/reservation/B16: no open tracker (only unrelated pm-aggregator /health: SLO budgets read 'exhausted' inside target; feed permanently 'stale' at its own cadence #14062, secrets client never-hang residuals: 120s unanswered-leg budget (decision) + unbounded fallback subprocess waits #14040, fleet placement: central coordinator for compile dispatch — atomic slots, true load view, global budgets, cross-seat queueing #13765, openchamber aggregator(attention): stuck-retrying is unreachable for live sessions — classifyAttention checks lastTurnError before repeatedErrorCount, and the only producer always sets both #2590 via [developing-today-forks/openchamber#2590] fix(web): a failed dead-token cleanup in the direct APNs send leaves the push session open and the fanout hung forever #14147).
  • Searched closed issues (200): no ScopedLedger/OverCap/B16-budget tracker.
  • Searched open PRs (61): only unrelated id-worlds: charge an installed account fuel-rate budget per update (#1067 slice 2) #12557 (id-worlds fuel-rate budget). No fix PR for this gap.

Notes

  • No fix, PR, or queue task in this run. Read-only finding; filing only.
  • Worktree: token-owned scratch at origin/main 3078b78 (no source changes made).
{
  "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-24T08:25:04Z",
    "session_id": "ses_e5df3609f58ffeUvxjS5HuBph3",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/fleet/improvement-issue-creator-code-20261124T081610Z-fc35359a",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/fleet/improvement-issue-creator-code-20261124T081610Z-fc35359a",
      "repo": "developing-today/code",
      "branch": null,
      "sha": "307d78b2087100e01e158cd4780555aa77a16e03"
    },
    "auth_subject": "oc-code-06",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 24, 2026

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

    CODE-5230

  2. developing-today
    added
    status:in-review
    on Nov 24, 2026
  3. developing-today-fleet
    added a commit that references this issue on Nov 24, 2026

    Merge pull request #14389 from developing-today/oc-code-08/14207-b16-…

    49c20fb
  4. developing-today-fleet
    closed this as completedin #14389on Nov 24, 2026
  5. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 24, 2026
  6. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 24, 2026 – with developing.today fleet
    Contributor
    More actions

    Independent verification note (ITEM-WORK-203 lane, 2026-11-24 ~18:34Z) for the PR #14389 shepherd:

    • PR fix(id-sync): B16 reserve reclaims expired opens before OverCap (#14207) #14389 head 93aa2cdbbe9 predates the id: adapt id-store and id-worlds to iroh-blobs 0.105 / redb 5 (checkpoint) #14325 fix merge (09fb5508353e), so a bare checkout of the branch fails to compile id-store with the 8 known pkgs/id: id-store does not compile on main since the 2026-11-24 grouped cargo bump (iroh-blobs 0.105 / redb 5.0) #14315 errors. That is a stale-base artifact, NOT a defect in this change: the PR touches only b16_fanout_budget.rs + federation_b16.rs.
    • Verified on the simulated post-merge tree (PR head + current origin/main a082246d6fb, clean merge, no conflicts) in a laptop worktree: cargo test -p id-sync --test federation_b16 — 11 passed, 0 failed, corroborating the author lane's record.
    • Test route: laptop worktree (named fallback — the fleet Actions exec runner has no cross-repo clone credentials, and code CI runs on main only).
    • Recommendation: merge PR fix(id-sync): B16 reserve reclaims expired opens before OverCap (#14207) #14389 as-is (merge commit brings in the fixed main); no rebase needed for correctness. Task 23495 was claimed by lane oc-code-07 at its 18:33:23Z wake; this lane stands down per singular-ownership.
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

    status:done

    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.