Explicit point publication

gestaltdb.reasoning.adapters.publication.reconcile_point is an opt-in persistence boundary, separate from inference. It recomputes from fresh positive entity claims under the database-wide temporal writer lock, then publishes one logical temporal commit into a caller-selected, separate target world. It never accepts an old inference result, changes current property-graph records or installs generated rules in the global rule catalog.

Standalone example. Choose the capability-qualified installation tab below.

Point publication uses the selected backend contract. Nontransactional orphan recovery remains caller-managed; tabs do not imply identical atomicity.

1python -m pip install "gestaltdb[lmdb]"
 1from tempfile import TemporaryDirectory
 2from gestaltdb.graphdb import GraphDB
 3from gestaltdb.ontology import Ontology, SubPropertyOf, compile_ontology
 4from gestaltdb.reasoning import ReasoningLimits
 5from gestaltdb.reasoning.adapters.claims import ClaimMapping, ClaimSelection
 6from gestaltdb.reasoning.adapters.publication import reconcile_point
 7
 8plan = compile_ontology(Ontology("relations", [SubPropertyOf("p", "q")]))
 9with TemporaryDirectory() as directory:
10    graph = GraphDB.create(directory, backend='lmdb', serializer='json')
11    try:
12        graph.epistemic.assert_claim(subject="a", predicate="p", object="b", agent="registry",
13                           polarity="positive", valid=(0, 100))
14        params = dict(valid_time=50, source_world="default", target_world="derived",
15                      publication_key="my-job", selection=ClaimSelection(),
16                      mapping=ClaimMapping(), limits=ReasoningLimits())
17        first = reconcile_point(graph, plan, **params)
18        assert first.asserted == 2  # complete closure, including input p
19        assert reconcile_point(graph, plan, **params).commit_id is None
20        assert not list(graph.epistemic.iter_claims_as_of(world="derived", valid_time=51))
21    finally:
22        graph.close()

Identity, reconciliation and stale-input policy

Validity is exactly the single microsecond quantum [t, t+1 microsecond). Keys, points and worlds have separate output identities. publication_key names a managed namespace; do not reuse it for unrelated jobs or edit its reserved gestaltdb:ontology claims manually. Mapping, source policy and ontology revision can change within a namespace; the next call reconciles against the new closure. Other agents/sources in the target world remain untouched.

The generation digest includes database identity, point/world/key, revision, mapping, policy and the exact selected input version references. The receipt and claim provenance also record the authenticated input context. Unchanged inputs produce a no-op retry even though prior output commits advanced the database horizon. After an interrupted call, rerun with the same parameters; visible publication is recognized through canonical claim versions, not a separate possibly missing dependency index. Failed inference publishes nothing. Writes use the existing temporal commit visibility/recovery mechanism; see Temporal history and service reference for orphan audit/reclamation. No new storage protocol or power-loss durability guarantee is invented here.

On a nontransactional backend, interruption before the visibility marker can leave derived temporal indexes ahead of canonical history. Reads/reconciliation fail closed rather than returning a partial closure. Quiesce writers, audit with report = graph.temporal.list_temporal_orphans(), explicitly reclaim validated unpublished artifacts with graph.temporal.reclaim_temporal_orphans(through_commit=report.through_commit), rebuild temporal indexes if still required, then retry reconciliation. The adapter rejects unreclaimed incomplete commits even if older-prefix reads would otherwise succeed; it never silently repairs indexes. Transactional backends avoid this partial index-publication window.

Stale policy is recompute latest while holding the temporal writer guard. This intentionally serializes writers during extraction and inference. Work bounds limit kernel/adapter counts, not lock duration or backend authentication cost. The input policy must exclude recognized derived claims. Full recomputation from base evidence, not bounded witness removal, eliminates self-supporting cycles and preserves independent support. Losing the final support retracts the managed output; losing only one support updates its generation. This is not incremental truth maintenance or an all-support proof index.

Point versus interval publication

This point API accepts no output interval or window. Interval conclusions require intersecting premise validity and unioning independent supports without filling gaps. A point witness alone cannot establish those interval unions. Use Temporal delta maintenance and interval publication for range evaluation and Authenticated interval-batch publication for computation-owned guarded interval publication. These are separate APIs, not options on this point publisher.