Skip to content

Policy: scope blocked-write details and define global status metrics #213

Closed

Description

@WhollyMindless

Proposed classification: question, store-security, severity:low. Labels require maintainer permissions; these are suggestions for your triage.

For maintainer triage and approval of scope. Reviewed main at bf9f4d2, still current when these proposals were prepared. Review probes use synthetic temporary stores; this is not a report of a production incident. No implementation or assignment is implied by this issue.

SEC-04: memory_status (and the TUI status payload) reports store-wide counts and other repositories' blocked writes without the caller's reader

  • src/index.ts:1261 — store counts from unfiltered loadAll(); only the quarantine list uses reportReader
  • src/index.ts:1283 — blockedRecent(6) passed through unfiltered
  • src/status.ts:272 — blockedRecent reads write_blocked evidence for today and yesterday with no visibility filter, emitting ts, sid, reason
  • src/injection-epochs.ts:106 — buildPayload store counts from unfiltered loadAll() (TUI badge/panel)

Reproduction: test/review-probes/probe-status-breadth.probe.ts: seed 7 repo-B rows and a write_blocked line from session 'SESSION_B_SECRET_ID' bound to repo B. From repo A, call memory_status and memory_evidence({ev:'write_blocked'}).

Observed: memory_status prints 'RECENT BLOCKED WRITES ... session SESSION_B_SECRET_ID drift_ref_stale_incoming' and 'STORE 7 active · ... · 7 scopes', all of which belong to repo B. The same session's memory_evidence returns 'No evidence', so the two surfaces disagree.

Effect: Metadata disclosure across repositories: other sessions' ids, gate block reasons, timing, and aggregate row and scope counts. No row content is exposed.

Preconditions: More than one repository shares the store.

Limits: Whether aggregate counts are meant to be store-wide is a product decision. Listing other sessions' blocked writes conflicts with memory_evidence's partitioning either way.

Proposed scope / decision requested

This consolidates SEC-04 and architecture POLICY-1; no second issue is needed. Please decide separately whether blocked-write details should follow memory_evidence visibility and whether aggregate STORE counts are intentionally machine-wide. Parent reproduced a repo-A status exposing repo-B session ID/reason while evidence correctly omitted it. No memory content disclosure was demonstrated. If scoping is chosen, apply consistently to tool and TUI payload; coordinate shared assembly with #168.

Please accept, narrow, defer, or decline this independently of the other review findings. We will wait for your direction before taking implementation. Happy to supply a checked-in regression reproducer with an accepted fix; the review report and probe artifacts are preserved locally.

Activity

  1. added
    question
    store-security
    severity:low
    agent:ready
    on Nov 1, 2026
  2. added
    fix:blocked
    on Nov 3, 2026
  3. ocsi-fixer commented on Nov 3, 2026

    @ocsi-fixer

    Marking this fix:blocked because it is a policy decision, not an implementable spec. The body asks the maintainer to choose between options — whether blocked-write details surfaced by memory_status and the TUI status payload should follow memory_evidence's per-repository visibility partitioning, and whether the aggregate STORE counts are intentionally machine-wide — and it states explicitly that implementation waits on that direction ("Please decide separately…", "We will wait for your direction before taking implementation"). Neither question has an acceptance criterion I can verify mechanically, and picking a visibility policy on my own would be inventing the product decision that is the maintainer's authority. The reproduction and proposed scope are clear, so the moment a maintainer replies with the chosen policy (and whether it applies to both the tool and the TUI payload, coordinated with #168), the ticket can be unblocked and built against that answer.

  4. ocsi-triager commented on Nov 3, 2026

    @ocsi-triager

    osi-spec-hash: e9cb9a5ba33655c6 2026-11-03T22:38:34Z - acceptance criteria frozen at this text. A later edit to the body changes this hash, and the reviewer will withhold approval until a maintainer replies spec ok.

  5. removed
    agent:ready
    on Nov 4, 2026
  6. abogartz commented on Nov 4, 2026

    @abogartz
    Owner

    Decision sheet — verified current at 06e4e28

    The behavior still holds post-restructure: blockedRecent (src/status/write.ts) reads today+yesterday evidence with no visibility filter and emits ts, sid, reason; store counts come from unfiltered loadAll() in both the tool and the TUI payload.

    Two separable calls:

    (1) Blocked-write details (sid + reason of other repos' sessions — the actual cross-repo disclosure):

    • Follow memory_evidence visibility (recommended). Filter blockedRecent through the same reader rule; tool and TUI payload both. Cost: small; the reader plumbing already exists (reportReader is already used for the quarantine list in the same surface).
    • Or keep machine-wide and document it — but WM is right that listing other sessions' blocked writes contradicts memory_evidence partitioning either way.

    (2) Aggregate STORE counts (7 active · 7 scopes — metadata, no content, no ids):

    • Keep store-wide and say so (recommended). Counts are housekeeping; scoping them adds a filtered-scan cost per status call and buys little disclosure.
    • Or scope them too for full consistency with the recall surface.

    Option A — both scoped. Most consistent, most work, shared assembly must coordinate with #168.
    Option B — details scoped, counts store-wide + documented (recommended). Kills the disclosure, keeps the useful numbers, smallest diff.
    Option C — decline both, document status as a machine-wide admin surface. Leaves the tool disagreeing with memory_evidence, which is the inconsistency WM flagged.

    Recommendation: B.

    Maintainer: reply accept A, accept B, accept C, or defer.

  7. abogartz commented on Nov 4, 2026

    @abogartz
    Owner

    Maintainer decision 2026-11-04: accept B — blocked-write details (sid, reason) follow memory_evidence visibility; aggregate STORE counts stay machine-wide and get documented as such. Implementation queued as #306. Close this record when #306 merges.

  8. removed
    fix:blocked
    on Nov 4, 2026
  9. abogartz commented on Nov 4, 2026

    @abogartz
    Owner

    Decision delivered 2026-11-04: accept B (see decision comment). Contract now tracked by #306.

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

    questionseverity:lowstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions