Skip to content

Keep saved Codex-assisted insights visible as live metadata refreshes #62

Description

@thrr87

Problem

A successful Codex-assisted result is retrieved only when its stored scope fingerprint exactly matches the current scope fingerprint. The scope includes the metadata payload fingerprint, and that payload contains frequently changing values such as Usage Remaining, evidence intervals, activity, and account observations.

After the usage reader refreshes, the current fingerprint can change and a previously saved result no longer matches. The UI then stops displaying it even though the successful result remains in codex-assisted-history.json.

This makes successful insights appear transient or absent and prevents users from reliably seeing their saved analysis history.

Expected behavior

A successful insight remains visible for the same user-selected analytics scope after live measurements refresh. Results from unrelated accounts, ranges, filters, or Source Content selections must not leak into that scope.

Acceptance criteria

  • Define a stable selection/scope identity separately from the analyzed payload fingerprint.
  • Metadata refreshes within the same selected account, time range, visible range, filters, and pinned baseline do not hide the latest successful result.
  • Changing account, range, filters, pinned baseline, or Source Content selection still selects the correct matching result.
  • Preserve the exact payload fingerprint as provenance if needed; do not use it as the sole visibility key.
  • Add a regression test that records a result, changes only live payload measurements, and confirms the result remains visible.
  • Existing cross-account and Source Content isolation tests continue to pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions