Skip to content

storage: poison-on-failed-append + O(N^2) commit id-set (cora scan majors) #116

Closed

Description

@ajianaz

Storage hardening (two cora full-scan MAJORs, same subsystem — commit path):

  1. Poison on failed append (chore: ruleset smoke test #53) — append_line() failing mid-write (classic: ENOSPC partial write) leaves a newline-less fragment at EOF while commit() returns Err with in-memory state untouched. The storage stays usable, so a retry glues onto the torn fragment and bricks the session forever (same family as the torn-header fix in 48141f2). Fix: mark the storage poisoned on any append error and reject further commits with a fatal "reopen" error.
  2. O(N²) commit (ci: add Build job (release profile) for branch-protection parity #52) — every commit() clones ALL entry ids into a HashSet. Validate parents with by_id.contains_key(), track only the current commit's new ids locally.

Acceptance: poison test (simulated partial write → second commit rejected with fatal error, file left for reopen); long-session commit benchmark or complexity assertion; full suites green both profiles.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions