Skip to content

relay: an EOSE finish hint can be false when nip56.hideActionableReports is on #1093

Open

Description

@chappie-daemon

Found by the approver of #870 (job 025), confirmed from the tree. Default off, so this ships as a known-unsound hint under a setting rather than as a live defect.

The mechanism

crates/nostream-storage/src/lmdb/events.rs:1562-1579 — reported() implements the capture's NOT EXISTS (… reports …) and is consulted inside the storage matcher when nip56.hideActionableReports is on. The row is therefore dropped before the handler ever sees it.

The handler-side refused counter added in #870 sees only rows its own Filter::matches rejects. A row the storage layer withheld leaves refused false, proven true, and the relay emits ["EOSE",<id>,["finish"]] over a row that matches but will not be served — the same lie as an auth trim, with the difference that no handler-side counter can see it.

The same NOT EXISTS exists in the Postgres arm, so this is a capability both backends share, not an LMDB quirk.

What it needs

The shape already exists beside search_rule(): a declared backend capability — suppresses_rows — and one more term in proven (subscribe.rs), rather than a counter threaded through the storage stream. NIP-56 hiding is a storage-layer decision, so the declaration belongs in the same seam as the matching rule.

What a test needs

A store with an actionable report and hideActionableReports on, a limited read that matches the hidden row plus one visible row, and the assertion that the frame carries no finish. The existing double cannot produce it — it applies Filter::matches itself, the same limitation #870 hit for the search case.

Reported in 025-nip-currency's decision.md; named in the PR body there. Not fixed in that job because its resume budget was spent.

Activity

  1. added
    bugSomething isn't working
    rewritenostream 4.0 Rust/LMDB rewrite
    rustRust implementation work
    factoryBuilt by the software factory
    on Nov 9, 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

    bugSomething isn't workingfactoryBuilt by the software factoryrewritenostream 4.0 Rust/LMDB rewriterustRust implementation work

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions