Skip to content

Move state log maintenance off startup #102

Description

@ipo

Outcome

Restore bounded background log retention and WAL maintenance with cross-process coordination so foreground startup is not blocked. Integrate with the initialization ownership established by the dependency.

Governing evidence

Closed issue #24 and commits 2870449677 and c884ee7ce3.

The issue and this evidence define required behavior. Port functional intent onto the current upstream architecture; patch identity is irrelevant.

Non-goals

Do not add a daemon, unbounded scans, or maintenance work to the model-visible turn path.

Acceptance criteria and verification

Tests demonstrate prompt startup completion, bounded batches, eventual maintenance, competing processes, active readers, and isolated maintenance errors. Run the smallest focused just test -p <crate> checks that cover the changed crates under the repository reduced-priority wrapper. Regenerate schemas or snapshots only when this ticket changes them. For a large Rust change run scoped just fix -p <crate>, then just fmt; do not rerun tests after fix/format. Remove disposable build artifacts afterward.

Likely areas

State startup orchestration, log retention/WAL maintenance, and concurrency tests.

Dependencies

Fully blocked by #101.

Do not begin ticket-owned mutation until every dependency is integrated; their landed contracts are authoritative.

Blocks #104.

Delivery

The accepted result must integrate as exactly one issue-linked commit with subject feat(state): move log maintenance off startup. Tests, snapshots, generated files, and fixes belong in that commit; adaptation or test-only follow-up commits are not permitted.

Agent routing

agent_level: 5

Agent signature

gpt-5.6-sol@high:01a07441-98af-75c1-9950-8af46deb76de

Activity

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

    enhancementNew feature or requestlocal-ticket/enhancementAdds or improves behavior in the local Codex forklocal-ticket/stateChanges local SQLite state or log persistence behavior

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions