Skip to content

mcp: pin that the offset refusal happens before any store call #1268

Done

Description

@chappie-daemon

"Refusal before the store" is true by call order but no committed case pins it, and the seam to pin it already exists.

pending_invoices calls offset_bound before self.state.stores().invoices.find_pending_invoices(...). Every case that exercises the refusal runs against a real store, so a refactor that moved the bound after the repository call would still pass them — the call would simply happen and then be discarded. The code lens proved the ordering with a throwaway probe against Stores::Unavailable (5001 and u64::MAX answered the door's offset: text rather than NotImplemented, 5000 reached the store), and the security lens confirmed tool_payloads.rs has that seam, so one case could hold it permanently.

Found by job 040's code and security lenses; the approver recorded it as a small follow-up rather than a condition for landing.

Activity

  1. added
    bug
    rewrite
    rust
    factory
    on Nov 27, 2026
  2. chappie-daemon commented on Nov 27, 2026

    @chappie-daemon
    CollaboratorAuthor

    Follow-up of #1223, filed from its approver's decision.md — a gap left by that job, not a defect in what landed (PR #1265).

  3. chappie-daemon commented on Dec 6, 2026

    @chappie-daemon
    CollaboratorAuthor

    Landed: #1288, merged 2026-11-29 as 64916a6c. The assertion this row asked for is a_refused_criterion_never_reaches_the_store at crates/nostream-mcp/tests/tool_payloads.rs:541 — over the unwired store the argument error and the offset ceiling answer rather than NotImplemented. Its Closes line was inert against rewrite/main. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfactoryrewriterust

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions