Skip to content

test: prove structural graph, error, and crash consistency semantics #340

Closed

Description

@Sinity

Parent

Part of #330.

Context

The consolidated plan expands proof subjects beyond CLI/schema/provider paths into archive structure, crash consistency, interruption behavior, and error semantics. These are too broad for #332/#333 and too concrete to leave only in the umbrella.

Scope

Add proof obligations over structural graph and operational failure semantics.

Structural graph subjects:

  • raw rows;
  • core rows: conversations, messages, content blocks, attachments, attachment refs;
  • derived products: conversation stats, session profiles, work events, phases, tag rollups, work threads, day/week summaries, action events;
  • operational rows: runs;
  • search/vector state: FTS, embeddings metadata, stale/missing provenance.

Effect-driven crash/interruption claims:

  • DbWrite: atomic, rollback safe, idempotent, interrupt resumable, no partial visible state.
  • FileWrite: temp-then-rename, parent exists, partial file not consumed, orphan temp cleanup.
  • Destructive: preview target set matches execution target set, dry-run evidence exists, interruption leaves state explainable.

Error semantics subjects:

  • user-facing error type;
  • machine-readable error envelope;
  • parser quarantine reason;
  • readiness/degraded-state report;
  • repair/maintenance failure;
  • structured diagnostic event.

Acceptance criteria

  • At least one structural graph invariant proves raw/core/derived consistency beyond conversations/messages.
  • At least one interruption/resume or crash-consistency claim is exercised on a synthetic archive.
  • Parser quarantine errors preserve source/provider/path context without leaking private payload fragments.
  • Repair/maintenance failure evidence states whether data was unchanged, partially changed, or rolled back.
  • Error claims produce machine-readable evidence and user-facing context checks.

Activity

  1. added
    theme:verifiability
    phase:migration
    theme:semantic-proof
    on Apr 22, 2026
  2. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Starting #340 after completing the deployment-readiness sequence and #336. I’m intentionally deferring #337-#339 for now per the sequencing note; they depend on proof/lab command moves being better grounded.

    Initial #340 tactic:

    • Survey the current proof catalog/model shape, storage structural checks, parser quarantine/error context, and repair/maintenance result types.
    • Pick the narrowest real vertical slice that adds structural graph/error/crash-consistency obligations without inventing a broad validation framework.
    • Prefer one exercised synthetic-archive runner plus catalog-visible claims/evidence over a large command migration.
  3. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Checkpoint for #340:

    • PR opened: test: add structural error proof evidence #351 (test: add structural error proof evidence).
    • Local proof slice implemented:
      • artifact.path.dependency_closure
      • maintenance.repair.crash_consistency
      • parser.quarantine.context_redaction
      • error.machine_user_context
    • The structural claim now has a raw-to-session-product path spanning raw validation, archive core rows, derived rows, FTS, and readiness projection.
    • Synthetic archive evidence exercises orphan-message dry-run/repair/idempotence and explicit ambiguous-vs-rolled-back failure states.
    • Malformed Codex JSONL evidence verifies provider/source/raw-id context without leaking a private payload fragment.
    • Full local devtools verify passed; pre-push devtools verify --quick also passed.

    One incidental baseline fix is included in #351: markdown message body lines starting with ## are escaped so they cannot masquerade as renderer message section headers.

  4. added 5 commits that reference this issue on Apr 22, 2026
    87b1a4e
    a4f228e
    034dcc2
    719e4c9
    075e73f
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

    area:parserarea:pipelinearea:qaarea:storagephase:migrationtheme:semantic-prooftheme:verifiabilitytype:test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions