Task · TSO-0002.02

Bound retained state and protect local persistence

Description

Remediate byte-retention, SQLite isolation, ingress WAL ownership, and configured-file size findings while preserving existing durable formats and operator workflows.

Acceptance Criteria

Definition of Done

Implementation Plan

Implement byte-budget normalization at every retention seam, collision-resistant SQLite identity with fail-closed legacy handling, UID ownership checks, and bounded held-descriptor file reads; verify with focused race tests.

Resume only to clear the shared full-suite workflow-contract gate; no retained-state implementation changes.

Implementation Notes

Retained-state and persistence tests, including Windows cross-compilation, pass. Final go test -race ./… is blocked only by unchanged internal/ci workflow-contract assertions outside this lane.

Shared workflow-contract blocker cleared: full build, vet, race suite, lint, and actionlint passed on 2026-08-25.

Final Summary

Added fixed-byte retention budgets, collision-resistant and identity-bound SQLite storage with fail-closed legacy handling, WAL UID checks, and bounded held-descriptor file reads.

The complete repository gate now passes.

View the source file on GitHub