Skip to content

feat(history): preserve ordinary durable updates in immutable temporal history - #61

Open
DivyamTalwar wants to merge 1 commit into
feat/jitmind-preflight-stage-metrics-20260929from
feat/jitmind-closure-c03-reviewed-20260929
Open

DivyamTalwar wants to merge 1 commit into
feat/jitmind-preflight-stage-metrics-20260929from
feat/jitmind-closure-c03-reviewed-20260929

Conversation

@DivyamTalwar

Copy link
Copy Markdown
Owner

Original ZIP gap

Implements C03 / GAP-03, refs #52. Stacked on #58 for a reproducible reviewed sequence; no dependency on another user product. The earlier manual J09 perspective store is retained, but ordinary durable writes now have their own supported historical path.

Implementation

  • Record fact/page history, immutable effect identities, operation receipt and projection event in the same SQLite transaction as each ordinary durable add/update/delete/noop.
  • Add bounded snapshot_at() reads by transaction revision/time and valid time, immutable historical-page lookup, and an explicit structured correction path through commit_temporal().
  • Preserve earlier knowledge perspectives when current validity changes. Exact retries do not add a second historical effect.
  • Add explicit v1-to-v2 history enablement with a known coverage baseline; unavailable pre-migration history is not invented.
  • Expose bounded outbox_events() and get_event() for independently delivered consumers, regardless of the reference consumer's delivered bit.
  • Provide compact-copy history retirement into a new image while preserving original stores, receipts and retained source pages.

Review-driven corrections

An independent frozen-source review found import/migration provenance gaps, a compatibility regression, and incomplete corruption detection. The final candidate reconciles fact/page scope, preserves split provenance, validates immutable effects and indexed payload identity, rejects overlapping migration baselines atomically, and bounds event/page acquisition before loading payloads. Current corrected validity is distinct from independent page expiry/TTL.

Applicable independent probes pass; two older probe expectations are explicitly superseded by stronger migration rejection/unknown-coverage contracts, not silently deleted. Exact findings, replacement controls and limitations are in docs/closure/C03-remediation.md.

Actual assembled verification

Candidate: 5dc8e4855d74042964fdbfa8074350d4ea372af3.
Parent: 3803a448bb4dfa493a2d8e43999f73cf9a23443c.
Supervisor rerun on unchanged source bytes:

PYTHONPATH=$PWD python -m pytest -q -p no:cacheprovider
# 1016 passed, 0 failed, 0 skipped; 3 expected optional-provider warnings
python -m compileall -q jitmind tests
python -m pip check
python -m ruff check --no-cache --isolated --select E9,F <owned Python files>
git diff --check
# all passed

Tests use actual SQLite, ordinary MemoryAgent/store APIs, deterministic local generation fixtures, real parser regressions and owned child-process failure/restart tests. Counts include inherited tests, not independent benchmarks.

Compatibility and operations

New databases use the history-enabled schema. Existing v1 data requires explicit quiesced migration; earlier experimental unpublished v2 layouts require reviewed reconciliation rather than silent adoption. Historical raw APIs are trusted-host surfaces, and the integrated request facade must authorize them. History retirement is not physical erasure of source pages, backups or external copies. DELETE/FULL local SQLite is the tested path; no hardware-power-loss, live-provider or universal platform claim.

See docs/transactional-history.md and docs/closure/C03-interfaces.md for APIs, seven-query example, migration, bounds and recovery. C01/C02/C07/C09 final composition and release gates remain separate tracked work. No automatic merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant