Skip to content

[M1/Correctness] Implement dual-axis temporal storage and queries #176

Description

@samovers

Parent: #167
Depends on: #170, #173, #174, #192

Outcome

Implement the accepted ADR so every historical answer is pinned independently to domain-valid time and tenant knowledge order.

Acceptance criteria

  • Allocate one monotonic tenant knowledge position to each governed write batch; every record in that batch shares the position.
  • Store explicit valid-time intervals for domain facts that have temporal force, with constraints matching [M1/ADR] Specify valid-time and knowledge-time semantics #170.
  • Expose repository/query APIs that require both a valid-time cut and a knowledge-position cut where history matters.
  • Remove ambiguous as_of/capture-time substitution and reject naive or semantically unclassified timestamps.
  • Update in-force selection, supersession/correction, freshness, qualification, materialization keys, context snapshots, and replay to use the correct axis.
  • Add indexes and exclusion/uniqueness constraints needed by the approved interval semantics without treating recordedAt as total order.
  • Pin both temporal cuts in every derived snapshot, review decision, and output receipt.
  • Consume [M1/Security] Persist pre-tenant operational security audit safely #192's trusted-binding boundary: pre-binding failures never receive a tenant batch or position, and a durable refusal after binding enters exactly the bound tenant's governed batch.
  • Add tests for future-effective, expired, late-arriving, corrected, equal-wall-clock, interval-boundary, whole-batch visibility, rollback, cross-tenant, historical replay, pre-binding no-tenant invariance, and the post-binding refusal switch.

Boundaries

Implement #170 exactly. Do not implement or invent the #192 audit lane, infer tenant attribution, reuse a tenant table for pre-binding failures, invent missing domain dates, change law/contracts, activate profiles, alter manifests/active sets, or raise capability claims.

Bounded first-delivery path — 2026-09-11

Renewed canonical Phase A approval at exact PR #11 head 4494924998183fe3fa7bc1b63b76a85893335044 is the canonical planning basis, not executable authority. The current path is a working pending-review operation claim with truthful result recovery and current authorized readback, followed by one separately specified temporal write/read child. The precursor does not satisfy this epic: the later child must bind the exact domain-time carrier and prove independent valid-time and knowledge-position cuts.

Authorization, shared transaction coordination, compatible successor command/selection and exact temporal/read bindings remain dependencies. #170/#173/#174/#192 are completed foundations, not work to reopen. Keep #180/#181/#182/#183/#185 responsibilities separate. No epic acceptance criterion, label or status is changed and no ready Delivery child is claimed by this note.

The initial authorization scope is exactly ASSERT_OPERATION_CLAIM and RECEIVE_READ_DATA, with full unchanged rules and all required dependencies. History completeness/historical-admission verification under CP2A-DEP01 remains unresolved; an inactive writer, empty lookup or permanent UNAVAILABLE is not closure. No new qualifying action, read target, writer, schema, runtime or public activation is introduced.

What is next: complete the separately governed claim/read prerequisites, then select the exact temporal Delivery boundary and tests. Do not close #176 with a record lookup or idempotency replay.

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

    blockedCannot proceed until a named prerequisite or authority is satisfied.tracking-epicProgramme containing multiple independently reviewable capabilities; owns no implementation PR.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions