Skip to content

feat(query): inspect reference-aware definition containment - #54

Merged
krafczyk merged 12 commits into
mainfrom
reference-aware-definition-queries-2
Oct 2, 2026
Merged

krafczyk merged 12 commits into
mainfrom
reference-aware-definition-queries-2

Conversation

@krafczyk

@krafczyk krafczyk commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extend nested definition queries with literal materialize, ref, and all traversal and independent reference-bearing path filtering.
  • Find stored owners of exact CDef, ObjectRef, or StateRef targets without materializing targets; retain typed hop witnesses, source scope, replica evidence, fixed-result context, and bounded occurrence semantics.
  • Keep eligible materialize-only indexed defaults and existing Store formats; use authoritative residual verification with explicit scan policy for richer modes.
  • Includes the prerequisite worker-signature assertion fix carried by the original local main ancestor.

Relates to #50. This PR intentionally does not assert that reference discovery implies ownership, ready payloads, or completed computation.

Verification

Post-Deploy Monitoring & Validation

  • Check repo.query(target).nested(edges="all", contains_ref=True).owners() and exact-reference containment against known Store fixtures. Healthy: source-scoped owner and occurrence counts match authoritative roots, with no unexpected scan under indexed-only policy. Investigate wrong owner provenance, missing hits, or unauthorized scans; revert this PR if Store authority is misreported.

Preserve transient Ref and Mat intent in invocation graphs until the worker-owned signature boundary consumes it, while continuing to reject assertions from result graphs and persistence.

Add bounded malformed-node and subprocess regressions, clarify worker failure diagnostics, and document the invocation-only contract. Refs #48.
Introduce immutable traversal policy and exact-reference query entry points without changing ordinary authority lookup. Reject unsupported execution until root-local traversal is integrated.\n\nVerification: focused query builder, nested, and reference tests (33 passed).
Walk detached authoritative roots through literal materialize and reference edges without resolving exact targets. Preserve legacy occurrence identity while carrying typed edge evidence.\n\nVerification: focused nested and reference-result tests (43 passed).
Carry exact reference identity, complete path witness ledgers, and boundedness through fixed-universe refinements and compatible result-set operations. Keep fresh backend containment blocked until authoritative capture is integrated.\n\nVerification: focused result, nested and reference-result tests (57 passed).
Keep indexed materialize-only defaults, correct stored-descendant membership in memory, and preflight scans before fenced root-local residuals. Preserve existing sidecar formats and expose literal policy in explanations.\n\nVerification: six focused query test files (99 passed).
Capture selected authoritative roots behind read fences with derived-generation checks, merge root-local witnesses in canonical order before a global cap, and retain replica provenance across graph-distinct sources.\n\nVerification: focused federation, refresh, reference index, and concurrency files (116 passed).
Apply literal traversal policy and typed paths to GeneratorSelector nested verification while preserving exact witness budgets and drain-before-cap semantics. Keep fixed-universe refinement and explanations scan-safe.\n\nVerification: focused template, nested, and performance tests (72 passed).
Document literal traversal, exact-reference identity, source scope, scan policies, typed witnesses, and authority limits. Add definition-only and reopened-sidecar acceptance cases and curate a small routine regression roster.\n\nVerification: focused nested, reference, federation, and index tests (140 passed).
A fixed-universe ObjectRef or StateRef projection applies max_occurrences to its retained witnesses. Preserve that boundedness signal even though fresh direct projections intentionally ignore the raw-path cap.\n\nVerification: focused result, reference-result, and nested tests (58 passed).
Include the newly exported containment edge policy in the exact core facade identity and lazy-import roster.\n\nVerification: focused import-safety and query-builder tests (26 passed).
Retain policy, source, carrier and minimal owner-target ledgers across direct and raw projections. Keep bounded Generator evidence bounded, reject unsupported projection changes, and preserve selector budgets on fixed refinement.\n\nVerification: focused result, nested, generator, federation, and import checks (211 passed; subsequent generator budget checks 70 passed).
Keep the namespace promotion's exact public facade roster aligned with the new containment edge policy.\n\nVerification: focused namespace, import-safety, public-reference and builder tests (30 passed).
@krafczyk
krafczyk merged commit 29100c5 into main Oct 2, 2026
57 of 60 checks passed
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