Files
gbrain/test
triton6564685 888fe26c24
Some checks failed
E2E Tests / Tier 1 (Mechanical) (push) Failing after 9s
E2E Tests / Tier 2 (LLM Skills) (push) Has been skipped
test(v0.18.2.fork.1): manifest edge cases — malformed jsonb + concurrent same-slug
Closes Issue #9 from /plan-eng-review (user decision A: 加三個都).

Cache TTL hit/miss/invalidation already covered in
test/longest-prefix-match.test.ts. This file adds the two remaining
edge-case scenarios:

  - Malformed jsonb safe-skip: slug_prefix_rules = "not_an_array"
    string, mixed-type array entries, and 'null'::jsonb config all
    handled gracefully — bad rows skip, valid rows continue matching.
  - Concurrent put_page on same slug across two sources: both rows
    persist, composite UNIQUE (source_id, slug) does its job.

Note: manifest-jsonb-pglite.test.ts (originally planned in design
Phase 5 for engine parity) is dropped from scope. The implementation
parses jsonb in TypeScript via JSON.parse on the SELECT result,
not via SQL jsonb_array_elements / ->>operators, so PGLite vs
Postgres jsonb-operator parity is not exercised by manifest routing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 22:29:39 +08:00
..