Apply collection policies during sibling inheritance

This commit is contained in:
2026-10-23 20:19:05 +00:00
parent 9e75496664
commit 36ff9170b7
8 changed files with 704 additions and 15 deletions

View File

@@ -248,8 +248,14 @@ between tiers before resolving relationships. An omitted `extends` retains a
lower-priority relationship; `extends: null` cancels it while preserving the
child's own settings. Superseded references are historical evidence, not active
relationships to validate. Each child recursively overlays its own settings
over its resolved parent: explicit zero, false, empty string, sequence, and
over its resolved parent: explicit zero, false, empty string, and
null values replace inherited values, while mappings combine recursively.
Sequences at collection destinations use the shared collection operation with
the parent as lower input and the child as higher input. The destination's
explicit mode applies; otherwise a copied identity selects upsert and an
unkeyed destination replaces. A parent's explicit mode does not move to a
different destination. Sequences outside collection destinations remain atomic
replacements.
The child retains its key. All effective relationships resolve, including
entries the application may never select for execution. Partial parent
definitions undergo normal typed decoding and application-owned validation,
@@ -853,7 +859,11 @@ main apply their resolved sequence operation between precedence tiers; a higher
strict scope inherits the lower identity and explicit mode before peer
composition. Overlay declarations apply after the base source graph is composed
and must agree with retained collection identity and any application
registration. These policies do not change inheritance or CLI behavior. A root
registration. During mapping-sibling inheritance, a parent's YAML identity can
follow its collection to the child destination, while the parent's explicit
operation stays at the parent destination. A child declaration selects the
operation at its destination; absent one, keyed collections use upsert and
unkeyed collections use replace. These policies do not change CLI behavior. A root
`configkit.imports` declaration still requires `Options.Imports`; `NoSource` has
no declaration scope.

View File

@@ -1,6 +1,6 @@
# Sequence Identity And Combination Implementation Plan
Status: implementation in progress; Stages 1–17 complete.
Status: implementation in progress; Stages 1–18 complete.
Audience: a Luna coding agent implementing one numbered stage per prompt, in
order. This plan starts at commit
@@ -641,6 +641,12 @@ handoff; existing mapping-sibling relationship selection remains unchanged.
Validation: inheritance, history, provenance, sensitivity, and resource-context
tests plus the everyday check. No identified-record parent lookup is active yet.
**Completion:** Activated collection-aware sequence operations at mapping-sibling
inheritance destinations, including identity transfer, destination-local modes,
record-owned policy projection, and application registrations. Verified focused
inheritance and sequence tests, `go test -race ./internal/engine`, and
`./scripts/check.sh`.
## Stage 19 — Build Identified-Record Inheritance Graphs
Scope: relationship extraction/validation and shared scheduling for sequence