Skip to content

Persist compounds as durable fact values#312

Merged
justinjoy merged 1 commit into
mainfrom
durable-compound-fact-values
May 14, 2026
Merged

Persist compounds as durable fact values#312
justinjoy merged 1 commit into
mainfrom
durable-compound-fact-values

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

Summary

  • add a private durable compound-value codec backed by typed DuckDB tables
  • store compound functor, arity, and typed args as graph-local logical values instead of runtime handles
  • replay durable compound refs into fresh engine-local handles with canonical hash verification
  • validate compound refs before fact append and cover tenant/graph/namespace isolation plus corrupt payload fail-closed cases

Validation

  • meson test -C builddir-issue50-fact --print-errorlogs — 69 passed, 1 skipped
  • meson test -C builddir-issue50-default --print-errorlogs — 67 passed, 1 skipped
  • git diff --check

Add a graph-local compound codec so fact rows reference durable logical compound values while replay materializes fresh engine-local handles.

Constraint: Runtime compound handles are session-local scratch values and must not be stored as durable fact data.

Rejected: Persisting engine compound handles directly | handle ids can change across engine reloads and leak tenant-local runtime state.

Confidence: medium

Scope-risk: moderate

Directive: Keep compound replay as a durable-id to fresh-handle translation boundary; do not bypass it with raw engine handles.

Tested: meson test -C builddir-issue50-fact fact-compound fact-store fact-schema policy-store --print-errorlogs; meson test -C builddir-issue50-default fact-schema policy-store --print-errorlogs

Not-tested: Full fact replay scheduler integration remains a later bridge; native Windows fact-store tests remain governed by existing configuration.
@justinjoy justinjoy merged commit 0ed2577 into main May 14, 2026
3 checks passed
@justinjoy justinjoy deleted the durable-compound-fact-values branch May 14, 2026 02:45
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