Skip to content
go-libfossil Check-in [a08e7e9d71]
Login

Check-in [a08e7e9d71]

Overview
Comment:fix(content): preflight stored bytes with SQLite blob semantics

A BLOB-affinity column can hold TEXT; SQLite length(TEXT) stops at NUL and is not a byte-allocation bound. Cast content to BLOB in metadata and guarded payload reads so malformed dynamically typed values cannot bypass stored-byte preflight.

The adversarial TEXT fixture previously read a one-MiB payload and reserved sixteen MiB of inflation before rejecting corruption. Both drivers now reject before any payload read or inflation reservation.

Timelines: family | ancestors | descendants | both | main | trunk | feat/submanifest-reader
Files: files | file ages | folders
SHA3-256: a08e7e9d717f51f92b3d78c5a985c83fd2952a07758b8a3ffda1bb9a4a555085
User & Date: [email protected] on 2026-10-21 01:08:01.000
Other Links: branch diff | manifest | tags
Context
2026-10-21
01:15
fix(content): prove stored budgets before SQLite prefix materialization

Keep the first pass metadata-only: typeof and direct length(BLOB) retain SQLite OP_Column length/type flags. Reject other storage classes without reading content. A CAST or substr in this pass can materialize a whole value before its stored-byte budget, so prefix reads now follow the complete stored-total proof.

Charge prefix reads and potential SQLite bytes separately; prove aggregate declared inflation before full driver payload reads. Both-driver EXPLAIN regressions reject full-content OP_Column operations in metadata preflight. check-in: d5eb1f3a5a user: [email protected] tags: feat/submanifest-reader, main, trunk

01:08
fix(content): preflight stored bytes with SQLite blob semantics

A BLOB-affinity column can hold TEXT; SQLite length(TEXT) stops at NUL and is not a byte-allocation bound. Cast content to BLOB in metadata and guarded payload reads so malformed dynamically typed values cannot bypass stored-byte preflight.

The adversarial TEXT fixture previously read a one-MiB payload and reserved sixteen MiB of inflation before rejecting corruption. Both drivers now reject before any payload read or inflation reservation. check-in: a08e7e9d71 user: [email protected] tags: feat/submanifest-reader, main, trunk

01:03
fix(sync): isolate prepared fallback cache and cancellation

Never share RID-keyed cache state across prepared service transactions: protocol-fatal responses can roll back after expansion while returning a nil Go error. Reject canceled contexts before acquiring a transaction and propagate observer cancellation instead of serving densely.

Reproduce rollback, RID reuse and incorrect content under the replacement hash; verify cancellation and deadline responses do no dense work. Exercise newly shunned payload and basis suppression after prepared-proof invalidation. check-in: 632e7349e6 user: [email protected] tags: feat/submanifest-reader, main, trunk

Changes