Complete relative import destination documentation audit
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Implement relative import destinations
|
||||
|
||||
Status: in progress. Execute Stage 1 through Stage 9 in order, one focused stage
|
||||
per Luna implementation prompt. The
|
||||
Status: complete. All nine implementation stages are complete; this document
|
||||
preserves sequencing decisions and completion evidence. The
|
||||
[feature roadmap](relative-import-destinations.md) owns the approved target and
|
||||
syntax; this document owns implementation decisions, sequencing, and evidence.
|
||||
|
||||
@@ -415,7 +415,7 @@ No limitations.
|
||||
|
||||
## Stage 9 — Reconcile documentation and audit the complete feature
|
||||
|
||||
Status: planned. Scope: final consistency and evidence; no publication work.
|
||||
Status: complete. Scope: final consistency and evidence; no publication work.
|
||||
|
||||
1. Reconcile `docs/config.md`, declaration comments, consumer guide, component
|
||||
overview, and development reading/test maps. Change only affected material.
|
||||
@@ -446,6 +446,18 @@ Done: authors can declare immediate-parent-relative path/glob destinations in
|
||||
existing import-capable loads with coherent values, provenance, bounds, and
|
||||
ownership. Independent specification headers remain a separate future decision.
|
||||
|
||||
Evidence (2026-10-14): starting revision `08e03f6`, using
|
||||
`go1.26.8 linux/amd64`. The local documentation-link plus root/private boundary
|
||||
tests, `GOTOOLCHAIN=local GOPROXY=off go test -race ./...`, and
|
||||
`./scripts/check.sh` all passed. The implementation diff from the recorded
|
||||
baseline was reviewed: production changes are limited to per-import YAML
|
||||
parsing, immediate-parent traversal/placement, and retaining each source's
|
||||
effective destination. It adds no public API, source-header processing, key-name
|
||||
grammar, new limit, root reset, callback/version phase, precedence, or secret
|
||||
semantics. The request-to-evidence matrix above covers the accepted import-
|
||||
destination rows; the unfinished independent-header proposal remains separate.
|
||||
No limitations. Release preparation and publication were not performed.
|
||||
|
||||
## Implementation owner map
|
||||
|
||||
Use graph discovery to confirm current symbols and locations before editing:
|
||||
@@ -467,9 +479,37 @@ Use graph discovery to confirm current symbols and locations before editing:
|
||||
- Behavioral foundations: engine `imports_test.go`, `glob_test.go`,
|
||||
`destination_import_test.go`, `destination_accounting_test.go`,
|
||||
`destination_diagnostic_test.go`, `destination_provenance_test.go`,
|
||||
`destination_integration_test.go`; root `facade_destination_test.go`; and
|
||||
`destination_integration_test.go`, `destination_import_lifecycle_test.go`;
|
||||
root `facade_destination_test.go` and `facade_resource_context_test.go`; and
|
||||
maintained consumer fixtures/tests. Reuse owners rather than duplicate suites.
|
||||
|
||||
## Relative-Import Behavior Evidence
|
||||
|
||||
The accepted relative-import scenarios in the broader request are covered by
|
||||
the following focused owners. Existing test suites are cited where this work
|
||||
reuses their unchanged contracts; independent source-header checking remains
|
||||
deferred and is not represented as implemented evidence.
|
||||
|
||||
| Behavior | Evidence |
|
||||
| --- | --- |
|
||||
| Omitted/empty destinations, literal key sequences, malformed shapes and source-local member locations | `TestParseImportDestinationUsesLiteralStringSegments`, `TestParseImportDestinationRejectsInvalidShapesAndMembers`, and `TestImportDestinationValidationPrecedesOptionalSuppression` in `internal/engine/imports_test.go`; root and mounted behavior in `TestFacadeRelativeImportDestinationsForRootAndMountedLoads` |
|
||||
| Immediate-parent accumulation, sibling isolation, same suffix for glob matches, and physical traversal | `TestImportTraversalUsesPerDeclarationDestinations`, host/native import tests in `internal/engine/destination_import_test.go`, existing physical ordering in `internal/engine/glob_test.go`, and `TestFacadeRelativeImportDestinationsPreserveNativeResourceContexts` |
|
||||
| Peer conflicts, tier overlays, version ownership, cycle/repetition identity, and main-owned checker scope | `TestRelativeImportDestinationsKeepStrictCompositionBoundaries`, `TestRelativeImportDestinationsUseEffectiveVersionOwnership`, `TestRelativeImportDestinationsKeepMainVersionCheckScoped`, and `TestLayeredDestinationsDoNotChangeRepeatedSourceIdentity` in `internal/engine/destination_import_test.go`; `TestFacadeSameFragmentMountsAtSeparateCollectionDestinations` |
|
||||
| Public failure records, source-local directive errors, effective paths, original content coordinates, and complete failure reporting | `TestFacadeRelativeImportFailuresRetainSourceRecordsAndCoordinates`, `TestEntryDestinationSurvivesImportSetupAndParseFailures`, existing imported diagnostic/remediation tests, and `TestFacadeDestinationMappingFailurePaths` |
|
||||
| Host/native source records, direct and inherited resources, physical resource bases, and detached destinations | `TestFacadeRelativeImportDestinationsForRootAndMountedLoads`, `TestFacadeRelativeImportDestinationsPreserveNativeResourceContexts`, `TestLayeredImportedInheritedValuesRetainResourceContexts`, and existing source-equivalence/resource-context suites |
|
||||
| Final sibling inheritance, defaults/decode/resolution/secret lookup/validation lifecycle, history, sensitivity, explanations, rendering, and bilateral diffs | `TestRelativeImportsFeedFinalInheritanceAndInspectionLifecycle`, `TestRelativeImportMatchesWrappedPlacementAndSafeDiff`, existing nested inheritance/cancellation and displaced-descendant tests, and the destination-sensitive diff suite |
|
||||
| Accumulated depth/node accounting, multiple glob contributions, actual empty mappings, and absent optional path/glob imports | `TestImportedEmptyBodiesChargeFullRelativeDestinations`, `TestGlobMatchesChargeTheirSharedRelativeDestination`, `TestRelativeImportDestinationUsesAccumulatedDocumentDepth`, and `TestAbsentOptionalImportsDoNotChargeUnusedDeepDestinations` in `internal/engine/destination_accounting_test.go` |
|
||||
| Ordinary and mounted consumer workflows, application-owned resource opens, and guide links | `Example_rootRelativeImports` and `TestPromptBundleUsesRelativeImportDestinations` in `examples/consumers/layered_test.go`; `TestCollectionBundleAssemblesMountedPeersAndResources` and `TestCollectionPeerPromptConflictsRemainStrict` in `examples/consumers/destinations_test.go` |
|
||||
|
||||
The public acceptance rows about file/reader/mapping sources reuse
|
||||
`facade_equivalence_test.go`, `TestFacadeInputDestinationsAcrossSourceKinds`,
|
||||
and the explicit-filesystem import tests. The rows about protected paths,
|
||||
source-local resource ownership, history, and disclosure reuse the input
|
||||
destination, inheritance, resource-context, and diff owners named above; this
|
||||
feature adds integration checks rather than a duplicate cross-product. The
|
||||
broader request's independent source-header rows remain proposals for separate
|
||||
consideration.
|
||||
|
||||
## Open Questions
|
||||
|
||||
None required for this feature. Selected list syntax and existing placement
|
||||
|
||||
@@ -53,9 +53,11 @@ The following behavior defines the target:
|
||||
- A prompt's ordinary `version` override changes that field and retains omitted
|
||||
lower fields. It neither identifies a merge record nor replaces a whole prompt.
|
||||
- Source-root `configkit.imports` remains structural. Imported application data
|
||||
inherits the input destination transitively. Import paths still resolve from
|
||||
their declaring source; containment, optionality, cycles, and repeated-source
|
||||
rules remain applicable. Placement does not change physical source identity.
|
||||
inherits the input destination transitively when its import omits
|
||||
`destination` or supplies `[]`; the accepted [relative-import extension](../adr/0012-relative-import-destinations.md)
|
||||
appends any declared segments. Import paths still resolve from their declaring
|
||||
source; containment, optionality, cycles, and repeated-source rules remain
|
||||
applicable. Placement does not change physical source identity.
|
||||
- Sibling inheritance runs after assembly in the effective destination scope.
|
||||
Peer fragments can supply a child and its sibling parent. Qualified PromptKit
|
||||
references do not acquire cross-collection inheritance meaning.
|
||||
|
||||
@@ -4,8 +4,8 @@ Status:
|
||||
|
||||
- Input destinations are implemented on the ConfigKit development branch
|
||||
(placement baseline reviewed at `315f464`).
|
||||
- Relative import destinations have been accepted and implementation is in
|
||||
progress; the [roadmap](relative-import-destinations.md) owns delivery scope.
|
||||
- Relative import destinations have been accepted and implemented; the
|
||||
[roadmap](relative-import-destinations.md) records their completed delivery.
|
||||
- Source specification headers have been partially accepted in the shared
|
||||
application-version-policy form described below. This does not accept
|
||||
PromptKit's original independent collection-header semantics. Design and
|
||||
@@ -193,9 +193,10 @@ An input with imports enabled must be able to use its existing source-root
|
||||
destination. The directive remains structural configuration, not an application
|
||||
field below that destination.
|
||||
|
||||
Without an explicit relative destination, imports inherit their importing
|
||||
input's destination, including transitive imports. Import paths continue to
|
||||
resolve relative to their declaring source's filesystem context. A mounted document must not send
|
||||
When an import omits `destination` or supplies an empty list, it inherits its
|
||||
importing document's effective destination, including transitively. An explicit
|
||||
sequence appends to that destination. Import paths continue to resolve relative
|
||||
to their declaring source's filesystem context. A mounted document must not send
|
||||
its imported application fields back to the configuration root accidentally.
|
||||
|
||||
Existing opt-in, containment, missing-input, cycle, and repeated-source behavior
|
||||
@@ -351,7 +352,7 @@ new coercion, or per-collection checker should be inferred from partial acceptan
|
||||
|
||||
## Requested Addition: Relative Import Destinations
|
||||
|
||||
Disposition: accepted; implementation is in progress under the
|
||||
Disposition: accepted and implemented under the completed
|
||||
[relative import destinations roadmap](relative-import-destinations.md).
|
||||
The behavior below records the accepted capability; exact syntax and completion
|
||||
status follow that work, rather than implying a released feature.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Relative Import Destinations Roadmap
|
||||
|
||||
Status: planned; syntax selected and implementation has not started. The
|
||||
[implementation plan](implementation.md) owns sequencing and completion evidence.
|
||||
Status: complete. The
|
||||
[implementation plan](implementation.md) preserves sequencing, behavior
|
||||
evidence, and the final compatibility audit.
|
||||
This roadmap addresses only the relative-import-destination addition in
|
||||
the [PromptKit request](promptkit-feature-request.md#requested-addition-relative-import-destinations).
|
||||
Independent source specification headers are deferred for reconsideration after
|
||||
@@ -90,19 +91,20 @@ merging, root-reset syntax, automatic discovery, recursive glob syntax, and
|
||||
collection management are outside this delivery. This scope statement does not
|
||||
establish new permanent exclusions beyond [existing deferred scope](deferred.md).
|
||||
|
||||
## Current baseline
|
||||
## Pre-implementation baseline
|
||||
|
||||
Reviewed baseline: `315f464`, with input destinations implemented. The
|
||||
Reviewed baseline: `315f464`, with input destinations implemented. At that
|
||||
revision, the
|
||||
[configuration contract](../config.md#input-destinations) and
|
||||
[ADR 0011](../adr/0011-input-destinations.md) describe that feature.
|
||||
[ADR 0011](../adr/0011-input-destinations.md) described that feature.
|
||||
|
||||
- [Directive parsing](../../internal/engine/directives.go) accepts `path` or
|
||||
- [Directive parsing](../../internal/engine/directives.go) accepted `path` or
|
||||
`glob` plus `optional`; it rejects unrecognized fields. Import declarations
|
||||
currently carry no relative destination.
|
||||
- [Import traversal](../../internal/engine/imports.go) holds one destination for
|
||||
carried no relative destination.
|
||||
- [Import traversal](../../internal/engine/imports.go) held one destination for
|
||||
an input's entire import tree. Both document placement and imported source
|
||||
records use it. Per-document effective placement is therefore required.
|
||||
- [Input acquisition](../../internal/engine/load_input.go) currently assigns
|
||||
- [Input acquisition](../../internal/engine/load_input.go) assigned
|
||||
the input destination to all returned imported source records. That uniform
|
||||
assignment must no longer overwrite distinct import destinations.
|
||||
- [Destination helpers](../../internal/engine/destination.go) already validate
|
||||
|
||||
Reference in New Issue
Block a user