Add detached source lookup to results and errors
This commit is contained in:
@@ -172,6 +172,18 @@ the returned configuration or inspection records cannot alter ConfigKit's privat
|
||||
snapshot. ConfigKit performs no logging. `Result.WriteEffective` exposes only the
|
||||
frozen redacted projection.
|
||||
|
||||
`Result.Source(id)` returns the detached record for an acquired source already
|
||||
listed by `Result.Sources()`. Source IDs are local to one load; empty and unknown
|
||||
IDs return false. This passive lookup uses retained evidence and does not reacquire
|
||||
the source, access the filesystem, or look up credentials. A source ID can be
|
||||
obtained from the source records or exact origin locations.
|
||||
|
||||
`LoadError.Source(id)` performs the same lookup over the partial, already-sanitized
|
||||
inventory returned by `LoadError.Sources()`. It preserves the source evidence and
|
||||
placement available when loading failed, which may be incomplete; it does not
|
||||
promise a record for every attempted source. Nil or zero-valued errors and empty
|
||||
or unknown IDs return false.
|
||||
|
||||
### Completion and resource lifetime
|
||||
|
||||
`Load` is synchronous and complete on return. Success means input assembly,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Pre-v1 Public API Cleanup Implementation Plan
|
||||
|
||||
Status: in progress; Stages 1–8 are complete and Stages 9–11 are pending.
|
||||
Status: in progress; Stages 1–9 are complete and Stages 10–11 are pending.
|
||||
Baseline: `07e4ae5d9236935389e81b207d4a8f00543fafce`.
|
||||
Audience: a Luna coding agent executing the stages sequentially.
|
||||
|
||||
@@ -356,7 +356,7 @@ D8's role check is resolved and its unproduced declaration is removed.
|
||||
|
||||
## Stage 9 — Add Detached Source Lookup On Results And Load Errors
|
||||
|
||||
Status: pending. Implements A1 and N5.
|
||||
Status: complete. Implements A1 and N5.
|
||||
|
||||
1. Add engine-local `lookupSourceInfo(sources []SourceInfo, id string)
|
||||
(SourceInfo, bool)` beside source cloning helpers. Return zero/false for
|
||||
|
||||
Reference in New Issue
Block a user