Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5312,3 +5312,37 @@ incorporated by `plan/designs/postgres_schema_design.md`. Analysis:
Amends D107/D108, D88/D90, D55, D67 and D74; preserves the D60/D61 library
boundary. Build order is `plan/plans/temporal_clocks.md`. This decision resolves
the design gates; it does not certify T.1 implementation, conversion or release.

## D111. Unknown-start states may coexist without fabricated identity or contradiction

**Status:** accepted when merged. **Date:** 2026-09-07.

**Context.** D107 prohibits mixed dated/undated evidence attachment and requires
coexistence without a supported succession or contradiction. Its exclusion
nevertheless treats an ordinary unknown-start state as an infinite interval,
making some required same-value coexistence impossible in PostgreSQL.

**Decision.** Apply relation interval exclusion only to states with a known
verdict start, preserving the existing belief, contradiction and erased-boundary
conditions. Both fully unknown and unknown-start/known-end states can coexist;
known-start open-ended states retain protection. All writers validate start
acquisition against eligible neighbors under D110 locks. Refused acquisition
preserves existing endpoints and records the reason. Current membership remains
D107 §7.1; consumers disclose unknown starts and unresolved identity overlap,
and fact-identity counts do not imply distinct dated episodes.

**Alternatives and consequences.** Forced evidence or contradiction invents
semantics. Exempting only both-NULL endpoints misses a legal ending-occurrence
cap; exempting unknown ends unnecessarily weakens dated open-ended protection.
An explicit overlap-permission field adds redundant lifecycle state for this
class. SQL stops enforcing uniqueness among unknown-start identities; ordered
identity adjudication and receipts remain mandatory. No new public grant,
source of validity, schema field or scheduler is introduced. Conversion,
readiness, replay, erasure and consumers must share the amended contract.

**Authority.** [D107 §4.2.1](plan/designs/temporal_clocks_design.md),
[D110 companion schema](plan/designs/temporal_write_and_lifecycle_schema.sql).
[Analysis and independent challenge](plan/analysis/temporal_undated_state_coexistence.md).
Amends D107/D110's unknown-start exclusion policy; preserves their mixed identity,
world-time, belief-time and erasure contracts. This resolves the identified
mixed-state contract conflict; implementation and release remain separate gates.
2 changes: 2 additions & 0 deletions plan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ architecture lives in `designs/`; research in `analysis/` is non-binding.

For the temporal program, start with [D107 temporal clocks](designs/temporal_clocks_design.md),
then [D110 writes, corrections and lifecycle](designs/temporal_write_and_lifecycle_design.md).
D111's unknown-start coexistence amendment lives in D107 §4.2.1, with
[supporting analysis](analysis/temporal_undated_state_coexistence.md).
The [complete schema amendment](designs/temporal_write_and_lifecycle_schema.sql)
is incorporated by the [PostgreSQL design](designs/postgres_schema_design.md).
[Temporal sequencing](plans/temporal_clocks.md) tracks implementation dependencies;
Expand Down
86 changes: 86 additions & 0 deletions plan/analysis/temporal_undated_state_coexistence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Unknown-start states and relation exclusion

Status: non-binding analysis, 2026-09-07. This records an implementation-discovered
conflict in D107/D110. The binding resolution is D111 in
`../designs/temporal_clocks_design.md` §4.2.1.

## Problem and evidence

Consider two claims normalized to the same relation triple and state kind:
“Alex is CEO” without dates and “Alex was CEO during 2019.” D107 §4.2 prohibits
evidence attachment between dated and undated windows. Its §4.4 requires
coexistence when no supported succession boundary or contradiction exists.
Nevertheless §4.2's relation exclusion treats an ordinary unknown state window
as an unbounded range, overlapping every dated window of that triple. There is
no legal stored outcome for an ordinary, non-conflicting mixed pair in both
ingestion orders. Inventing succession from identical values would not fix the
semantic problem.

Exact inspected contracts: `../designs/temporal_clocks_design.md` §4.1
(unknown seed endpoints), §4.2 (mixed evidence prohibited; unknown bounds under
exclusion), §4.4 (world-time caps and coexistence), §7.1 (current membership);
`../designs/temporal_write_and_lifecycle_design.md` §4 (corrections draw endpoint
candidates only from already-linked identity evidence) and §6.1 (erasure is
distinct from ordinary missing timing). The implementation at `267a9d8e` plus
the ordered-application working changes exposed the conflict; an implementation
failure is evidence of the gap, not authority to weaken the constraint.

PostgreSQL's [range documentation](https://www.postgresql.org/docs/15/rangetypes.html#RANGETYPES-INFINITE)
confirms that missing endpoints produce unbounded ranges. Its
[constraint documentation](https://www.postgresql.org/docs/15/sql-createtable.html)
confirms that the default exclusion check is immediate. Retrieved 2026-09-07.
Deferring the check changes its timing, not whether coexistence is valid.

## Alternatives and independent challenge

| Alternative | Assessment |
| --- | --- |
| Force evidence attachment | Loses the D107 distinction between a dated spell and an undated assertion whose identity is unresolved. |
| Create a contradiction group, erase a boundary, or invalidate belief | Introduces unsupported semantics merely to escape a constraint. |
| Keep the input retrying | Does not resolve the invariant and stalls an ordinary input indefinitely. |
| Exempt only states with both endpoints NULL | Incomplete: an ending occurrence can lawfully cap an unknown-start state to `(NULL, T)`. A later dated assertion before T produces the same mixed-pair conflict. |
| Exempt all states with either endpoint unknown | Unnecessarily removes protection from known-start open-ended states. |
| Exempt states whose start is unknown | Resolves both unknown-start shapes; retains known-start finite and open-ended protection; uses existing endpoint data. |
| Introduce explicit per-fact uncertain-overlap permission | Can distinguish more cases, but adds authority, writers, replay, erasure and consumer contracts for a class already identifiable by missing start. |
| Permit evidence after model-proven mixed identity | Potentially useful separate semantics, but inconclusive judgments still need lawful coexistence. |

An independent read-only analysis initially preferred the both-NULL exception.
A second pass challenged it with the legal ending-occurrence cap. Both analyses
then converged on known-start-only exclusion. `CanonicalBounds.is_known` in
`src/rememberstack/core/temporal.py` is start-based; changing that helper would
not itself settle the state identity contract or unknown-start semantics.

## Recommended full consequences

The exclusion requires a known verdict start, in addition to its existing state,
non-invalidated, no-contradiction and no-erased-boundary conditions. Unknown-start
rows retain their kind, immutable seed, actual endpoints and bases. The
admission/identity/block/revision protocol and durable application receipt
prevent duplicate application; SQL does not pretend to settle uncertain identity.

Acquiring a known start is a transition into exclusion eligibility. Under the
complete D110 locks the writer must check the entire proposed interval against
all eligible same-triple neighbors. Refuse an overlapping correction and retain
the previous endpoints with a recorded reason. A cap that preserves an unknown
start does not enter the exclusion. Erasure keeps its separate provenance and
uncertain-membership rules.

Current membership remains D107 §7.1: a missing start adds no lower-bound test;
a known end still expires the row. Reads disclose the actual missing start and
unresolved identity overlap. Aggregates count fact identities, including both
coexisting identities when eligible; that count is not proof of distinct dated
spells or unique real-world episodes. Profiles cannot turn this uncertainty into
a fabricated timeline. No new schema field, scheduler or public permission is
needed. These contracts apply to conversion, replay and all writers, not only
new ingestion.

The compatible exact-state shortcut is a related implementation hazard: a
single deterministic evidence target must survive inference about additional
candidates. D107 already requires that outcome. Multiple compatible exact
targets require their own explicit identity selection contract; this analysis
does not authorize arbitrary selection among historical slices.

Required database evidence includes both ingestion orders, unknown-start finite
ends, multiple historical slices, known-start exclusion rejection, valid and
refused start acquisition, deterministic receipt replay, and erasure behavior.
The amendment is not an implementation or release certificate.
4 changes: 3 additions & 1 deletion plan/designs/postgres_schema_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,9 @@ establish.
The appendix separates committed enum expansion, structural stores, fenced
in-place conversion and final constraint validation. Drop the old all-kind
relation exclusion before applying converted uncapped occurrence rows, then
install the final state exclusion after conversion. The basis vocabulary adds
install the final state exclusion after conversion. D111 restricts that exclusion
to known-start states; ordinary unknown-start coexistence and guarded start
acquisition follow `temporal_clocks_design.md` §4.2.1. The basis vocabulary adds
`erased`; cleared unsupported endpoints carry NULL/erased, affect current-query
certainty and sit outside certified-state range exclusion. All ordinary writes
and conversion/replay obey the documented serving-generation gate.
Expand Down
60 changes: 54 additions & 6 deletions plan/designs/temporal_clocks_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,60 @@ no-op" short-circuit applies only to compatible state-shaped assertions; missing
make an occurrence a state. D110 §3 defines the complete staging/receipt path.

**Relations schema.** The existing GiST `EXCLUDE` on `(subject, predicate,
object) && tstzrange(valid_from, valid_until)` becomes partial on
`temporal_kind = 'state'`, retaining the existing non-invalidated and
no-contradiction predicates. D110 further excludes intervals with an `erased`
endpoint basis and requires explicit uncertain-membership disclosure. Ordinary
unknown-bounds states remain unbounded ranges under it. Occurrences have no
interval exclusion.
object) && tstzrange(valid_from, valid_until)` protects states with a known
verdict start, retaining the non-invalidated and no-contradiction predicates.
D110 further excludes intervals with an `erased` endpoint basis and requires
explicit uncertain-membership disclosure. D111 §4.2.1 below defines ordinary
unknown-start coexistence. Occurrences have no interval exclusion.

### 4.2.1 Unknown-start state coexistence (D111)

A missing start is insufficient evidence that a state occupied every earlier
instant. For example, “Alex is CEO” without dates and “Alex was CEO during
2019” cannot establish one identity under the mixed-pair rule above, but need
not contradict each other. Treating the first row as an infinite interval for
uniqueness would prohibit the required `new`/coexist outcome. The exclusion
therefore applies only when `valid_from IS NOT NULL`, alongside the existing
state, non-invalidated, no-contradiction and no-erased-endpoint predicates.

Both `(NULL, NULL)` and `(NULL, finite_end)` states may coexist with dated
same-triple states. The latter arises when an ending occurrence lawfully caps
an unknown-start state. A known-start open-ended state remains protected.
Preserve temporal kind, immutable seed, endpoint bases and existing dates;
do not invent a contradiction, an erased endpoint, or an identity attachment
to make a row fit the constraint. Mixed `new` is an ordinary durable completed
identity outcome, not an endlessly retried input. D110's ordered admission,
block locks and application receipts still prevent duplicate application.

Every writer that acquires a known start, including autonomous correction and
compensation, checks the complete resulting interval against all eligible
same-triple state neighbors under D110's locks and revisions. An overlapping
proposal is refused with a recorded reason and unchanged previous endpoints;
the database constraint remains the final defense. Capping an unknown-start
state without acquiring a start preserves its exemption. Conversion and replay
use the same predicate, and readiness verifies its exact definition. Erasure
retains D110 §6's separate basis, deletion and replay requirements.

Membership stays as defined in §7.1: ordinary missing start supplies no lower
bound, and a known end still expires the fact. Reads expose that missing start
and any unresolved identity overlap; they do not turn ordinary unknown timing
into an erased-boundary result. Aggregates count eligible fact identities,
which can include both coexisting rows. Such counts must not be described as
proof of distinct dated spells or real-world episodes. Profiles and K pages
preserve this uncertainty instead of constructing an unsupported chronology.

This changes no public grants or mutation authority and adds no new state
field. It removes SQL uniqueness among unknown-start identities, making
identity adjudication and receipts responsible for that class. Forced evidence
would collapse unresolved identities; a both-NULL exception misses the legal
known-end case; exempting unknown ends would also lose protection of dated
open-ended states. Explicit overlap permission would add redundant lifecycle
state for this class. See the
[analysis and independent challenge](../analysis/temporal_undated_state_coexistence.md).

Acceptance requires both ingestion orders, unknown-start finite-end states,
multiple dated historical slices, retained known-start exclusion, accepted and
refused start acquisition, receipt replay, and source-removal/erasure coverage.

### 4.3 Revising a verdict: autonomous recorded correction (D110/D108)

Expand Down
5 changes: 4 additions & 1 deletion plan/designs/temporal_write_and_lifecycle_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ forced into a state. The single unknown-bounds-state shortcut applies only
to a state-shaped claim. `unknown` is the uncertain shape; `undated` is never
a fourth temporal enum. Relations' exclusion remains partial on state kind,
non-invalidated belief and no contradiction group, preserving the existing
contradiction exception. Overlapping occurrences remain legal.
contradiction exception. D111 (`temporal_clocks_design.md` §4.2.1) additionally
requires a known verdict start for exclusion eligibility; ordinary unknown-start
coexistence and start acquisition follow that contract. Overlapping occurrences
remain legal.

## 4. Autonomous corrections and compensation (#366)

Expand Down
2 changes: 1 addition & 1 deletion plan/designs/temporal_write_and_lifecycle_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ ALTER TABLE public.relations
predicate WITH =,
object_entity_id WITH =,
tstzrange(valid_from, valid_until, '[)') WITH &&
) WHERE (temporal_kind = 'state'
) WHERE (temporal_kind = 'state' AND valid_from IS NOT NULL
AND valid_from_basis <> 'erased' AND valid_until_basis <> 'erased'
AND invalidated_at IS NULL AND contradiction_group IS NULL);

Expand Down
20 changes: 20 additions & 0 deletions plan/proposals/temporal_overlap_permission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Explicit permission for unresolved state overlap

Status: unchosen alternative to D111, 2026-09-07.

An explicit per-fact identity-uncertainty field could permit overlap independently
of endpoint knowledge. It would require a recorded authority for setting and
clearing permission, a partial exclusion predicate, all-writer participation,
replay/forget coverage, and disclosure in retrieval, counts and generated text.

D111 chooses missing verdict start as the existing discriminator for ordinary
undated coexistence. Adding permission for exactly that class duplicates state
and creates more transitions that can disagree. See
`../analysis/temporal_undated_state_coexistence.md` for the comparison.

Adoption trigger: an accepted requirement calls for materializing distinct
known-start overlapping state identities while their identity remains unresolved,
and neither evidence attachment nor retaining unresolved testimony meets that
requirement. That decision must specify whether counts refer to fact identities
or distinct world episodes and include the complete lifecycle cost; a database
exclusion error alone is not evidence of contradiction or permission.
Loading