Confirmed searchable residue after failed ingest
Reviewed master at 886c36d8ebe861aa987059a1744d45b78797baae (v4.7.0). Suggested priority: P2.
Knowledge ingest commits FTS chunks individually while the knowledge DB transaction is still pending. If a later FTS chunk fails, knowledge rows roll back but earlier FTS rows remain. Hybrid search queries FTS independently and can return a document the ingest reported as failed and which has no source rows.
Sources: write/rollback path, FTS commit, hybrid retrieval.
Isolated reproduction
In temporary real stores, ingest a three-chunk document. Make the second FTS write return False; delegate the other writes to the real method.
outcome: failure, 0 chunks
knowledge DB source rows: 0
durable FTS source rows: 2
search returns: orphan.md
Independently reproduced three times. No production knowledge was touched.
Acceptance criteria
- Failed initial ingest leaves no searchable orphan rows.
- Failed replacement preserves the previously durable/searchable document, not a mixture.
- Coordinate FTS publication with DB verification or compensate reliably, under write serialization.
- Add failure-after-first-chunk tests that query the real hybrid surface after rollback, not only DB counts/status.
No source changes were made.
Confirmed searchable residue after failed ingest
Reviewed
masterat886c36d8ebe861aa987059a1744d45b78797baae(v4.7.0). Suggested priority: P2.Knowledge ingest commits FTS chunks individually while the knowledge DB transaction is still pending. If a later FTS chunk fails, knowledge rows roll back but earlier FTS rows remain. Hybrid search queries FTS independently and can return a document the ingest reported as failed and which has no source rows.
Sources: write/rollback path, FTS commit, hybrid retrieval.
Isolated reproduction
In temporary real stores, ingest a three-chunk document. Make the second FTS write return
False; delegate the other writes to the real method.Independently reproduced three times. No production knowledge was touched.
Acceptance criteria
No source changes were made.