Complete relative import destination documentation audit

This commit is contained in:
2026-10-14 17:45:31 +00:00
parent 08e03f6a38
commit 10edd95d4d
11 changed files with 95 additions and 39 deletions

View File

@@ -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