Skip to content

test: capture raw quarantine regression cases #328

Closed

Description

@Sinity

Context

Live archive repair split stale validation-state cases from two legitimate quarantine failures:

  • malformed JSONL that should preserve the decode failure as a real quarantine case
  • zero-length Codex/session export that should remain an explicit decode failure

The behavior is important enough to deserve deterministic local regressions rather than staying only as operator memory.

Scope

Add synthetic/raw regression fixtures for explicit quarantine behavior around malformed and empty raw exports.

Acceptance criteria

  • Malformed JSONL input produces a preserved, inspectable decode failure rather than stale validation-state ambiguity.
  • Zero-length raw input produces an explicit decode/quarantine failure.
  • These cases do not regress parser tolerance for recoverable malformed-but-provider-shaped payloads.
  • Tests verify both persisted state and user-facing diagnostic/reporting behavior where practical.
  • devtools verify passes before merge.

Ref #196

Activity

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

    @Sinity
    OwnerAuthor

    Checkpoint while implementing #328:

    • Existing coverage already pinned ingest_record behavior for zero-length blobs, malformed JSONL in strict mode, and validation-off tolerance for recoverable malformed JSONL.
    • Added the remaining boundary coverage instead of duplicating those cases:
      • validation service persistence now proves zero-length and malformed JSONL decode failures become failed validation rows with parse_error, stay unparsed, and are classified as quarantined;
      • doctor --schemas --schema-quarantine-malformed now has a real CLI regression asserting operator-visible decode_errors=1 quarantined=1 output and persisted quarantine state.

    Focused verification currently clean:

    pytest tests/unit/pipeline/test_quarantine_fixtures.py -q
    pytest tests/unit/cli/test_check.py -q -k quarantine
    ruff format --check tests/unit/pipeline/test_quarantine_fixtures.py tests/unit/cli/test_check.py
    ruff check tests/unit/pipeline/test_quarantine_fixtures.py tests/unit/cli/test_check.py
  3. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Closed by PR #347: #347

    Merged squash commit: f97a0abc0a1843bcaad790b2add838e0d3831412.

    What landed:

    • validation-flow regression coverage for zero-length and malformed JSONL raw records, asserting failed validation state, persisted parse_error, unparsed/quarantined classification, and no parse backlog routing;
    • CLI regression coverage for polylogue doctor --schemas --schema-quarantine-malformed, asserting the operator-facing decode_errors=1 quarantined=1 summary and persisted quarantine state.

    Verification before merge:

    pytest tests/unit/pipeline/test_quarantine_fixtures.py -q
    pytest tests/unit/cli/test_check.py -q -k quarantine
    ruff format --check tests/unit/pipeline/test_quarantine_fixtures.py tests/unit/cli/test_check.py
    ruff check tests/unit/pipeline/test_quarantine_fixtures.py tests/unit/cli/test_check.py
    devtools verify
    # pre-push also ran devtools verify --quick

    Remote status at merge was clean for PR policy, GitGuardian, CodeRabbit, lint, typecheck, showcase, Nix build/check, and CodeQL. The Python matrix remained in progress under the CI-quota guidance; local devtools verify covered the full non-integration pytest baseline.

  4. added 4 commits that reference this issue on Apr 22, 2026
    2d2e329
    90a0a8d
    107bc0e
    c0f4d07
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:pipelinephase: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