Skip to content

bug(store): #1840 dedup-replay snapshot fix applied only to MCP path, not offline/HTTP — entity_snapshot_after still stripped on the offline transport #1860

Description

@markmhendrickson

Summary

The #1840 fix (PR #1852, commit 1289cc123) — populate entity_snapshot_after + add a deduplicated marker on a deduplicated observation replay — was applied only to src/server.ts (the MCP path). The offline/local HTTP path (src/actions.ts) still returns a stripped entry on the idempotency-replay early-return, so entity_snapshot_after is empty there.

This means #1840 is not fixed on the offline/local SQLite transport, which is the only deployment mode the original reporter (an external evaluator running Neotoma as an offline audit ledger) uses. v0.18.4 reports it fixed; it is fixed on MCP, not on the reporter's actual transport.

How it was found

The new offline-transport-parity CI gate (PR #1858) caught it on first run: behavior cell #3 (dedup response) passes on the MCP surface but the offline/HTTP surface returns a stripped entry. The gate currently documents this as an MCP-only divergence rather than failing green main; this issue is to actually close the gap so the parity cell can be promoted to a hard dual-transport assertion.

Verification

  • git show 1289cc123 --stat → touches src/server.ts + one test only; src/actions.ts (the HTTP/offline store handler) was not changed.
  • src/server.ts populates entity_snapshot_after + deduplicated on the replay path; the equivalent offline/HTTP replay path in src/actions.ts does not.

Fix

Mirror the #1840 fix into the offline/HTTP store path in src/actions.ts: on a deduplicated/idempotency-replay store, read the persisted snapshot into entity_snapshot_after and set deduplicated: true, matching src/server.ts. Then promote the transport-parity gate's dedup cell (PR #1858) from MCP-only to a hard MCP↔offline parity assertion so this can't regress.

Acceptance

  • A deduplicated store over the offline/HTTP path returns a populated entity_snapshot_after (equal to getEntitySnapshot) and deduplicated: true, with observation count staying 1.
  • The transport-parity dedup cell asserts identical effect on both transports (no documented MCP-only divergence).

Meta

This is a textbook case of the exact failure the v0.18.4 hardening work targets: a fix verified on one transport while the reporter runs another. Pairs with task_policy reproduce_reporter_environment_before_fixed and the offline-parity gate.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions