Skip to content

store: validate ts shape at read time (row identity must not be an arbitrary string) #15

Closed

Description

@abogartz

Problem

parseLine accepts any string as ts, and ts is the row identity across the system: supersede chains, the blocklist (hide-by-ts), undo matching, and the viewer's action buttons all key off it. A malformed file edit or a row produced by an older/buggy writer yields addressable rows with arbitrary identity strings — which is what made the pre-#9 injection row fully operable (it could be targeted, blocked, rendered).

Cheap reader-side hardening so readers never trust the store: at load time (memory.ts loadAll / the evidence + deletions readers), treat a row whose ts is not a valid ISO-8601 timestamp as malformed — skip it with a one-time warning (or count it in a malformed tally surfaced by memory_status) instead of silently promoting it to a live, addressable row.

Notes

  • Pairs with the page.html escaping ticket (both are "validate at the boundary" for the same fields); the two together make the viewer row-identity surface safe regardless of file contents.
  • Keep parsing permissive at the tokenizer level (logfmt.ts must stay a dumb parser); the shape check belongs in the store layer that knows the schema.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. abogartz-opencode-self-improvement commented on Oct 22, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.5.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions