Accept descriptive import default field names

This commit is contained in:
2026-10-27 14:35:42 +00:00
parent 197567177e
commit 7548fa101a
2 changed files with 13 additions and 11 deletions

View File

@@ -26,6 +26,7 @@ as well.
| N1 | Rename `Paths(paths ...string) Search` to `SearchPaths(paths ...string) Search`, replacing the old name outright. Preserve literal file candidates, ordering, deferred acquisition, and selection/failure behavior. Leave semantic `Path` APIs and `Searches` unchanged. |
| N2 | Replace `LayerBase = "base"` with `LayerMain = "main"`, without a compatibility alias. Update Go references and affected string comparisons, serialization, and rendered labels. Preserve the existing main-tier category, imported contributions' owning tiers, precedence, and acquisition order. |
| N3 | Replace `CodeExplainLimitExceeded = "explain.limit_exceeded"` with `CodeHistoryLimitExceeded = "history.limit_exceeded"`, without a compatibility alias. Update Go references and affected diagnostic-code consumers. Preserve the existing quota, retained-node accounting, failure conditions, diagnostic locations, and admission timing before effective secret lookup and application validation. |
| N6 | Rename `ImportDefaults.Follow` to `FollowSymlinks` and `ImportDefaults.Hidden` to `IncludeHidden`, replacing the old fields outright. Preserve `*bool` types, nil defaulting, explicit true/false, declaration overrides, traversal behavior, and search scope. Keep YAML keys `follow` and `hidden`, and Go fields `Required`, `Recursive`, and `Pattern`, unchanged. |
### Recording Methods (D6)

View File

@@ -1,8 +1,8 @@
# Additional Public API Review
Reviewed revision: `3ebb848eadf6e61275ecec6e35838ad6576cdd3a`.
Status: N1–N5 accepted, with N4 incorporated into D6 and N5 into A1; N6 remains
open for discussion. Implementation has not begun.
Status: N1–N6 accepted, with N4 incorporated into D6 and N5 into A1.
Implementation has not begun.
## Scope And Assessment
@@ -13,7 +13,7 @@ It covers loading/discovery, source and resource ownership, paths and collection
registration, callbacks, inspection/diffs, secrets, and diagnostics. It does not
repeat the symbol inventory or conduct a correctness/performance audit.
[api.md](api.md) owns the accepted D1–D8, A1, and N1–N5 changes. Those decisions remain
[api.md](api.md) owns the accepted D1–D8, A1, and N1–N6 changes. Those decisions remain
settled; public path comparison (A2) remains deferred. The findings here are
additional opportunities, including consequences of the accepted cleanup.
@@ -29,11 +29,10 @@ obsolete input-error category, and a missing convenience on failed loads.
| N3: shared-history quota (accepted) | Rename `CodeExplainLimitExceeded` to `CodeHistoryLimitExceeded`, with value `"history.limit_exceeded"`; decision recorded in [api.md](api.md). | Go constant rename and machine-readable code change. |
| N4: recording-kind diagnostic (accepted through D6) | Incorporated into [D6 in api.md](api.md#recording-methods-d6). | Conditional constant removal. |
| N5: failed-load source lookup (accepted through A1) | Incorporated into [A1 in api.md](api.md#direct-source-lookup-a1). | Compatible addition. |
| N6: import-default field names | Consider `FollowSymlinks` and `IncludeHidden`; lower priority. | Go field renames; YAML keys unchanged. |
| N6: import-default field names (accepted) | Rename to `FollowSymlinks` and `IncludeHidden`; decision recorded in [api.md](api.md). | Go field renames; YAML keys unchanged. |
These are design recommendations, not defect severities or additional release
gates. The string-value changes in N2 and N3 are explicitly accepted; N6 remains
a proposal for discussion.
These accepted design changes are not defect severities or additional release
gates. The string-value changes in N2 and N3 are explicitly accepted.
## N1. Distinguish Discovery Paths From Semantic Paths
@@ -168,6 +167,9 @@ coherent way to remove the same consumer bookkeeping on both outcomes of a load.
## N6. Make The Go Import Defaults More Self-Describing
Status: accepted. [api.md](api.md) owns the selected change; the discussion below
preserves its rationale and alternative.
Evidence: [lifecycle.go](../../lifecycle.go) exposes `ImportDefaults.Follow` and
`ImportDefaults.Hidden`. Their comments explain symbolic-link traversal and
inclusion of hidden files/directories, but an options literal alone does not
@@ -187,10 +189,9 @@ refinement, weaker than N1's collision between two different path concepts.
## Discussion And Validation
Discuss the renames and string-value changes first, then N4 alongside D6 and N5
alongside A1. N6 can be decided independently. Accepted additions should be moved
into [api.md](api.md); this audit is not an implementation plan or a permanent
second API reference.
All six findings have been accepted and incorporated into [api.md](api.md), with
N4 folded into D6 and N5 into A1. This audit retains the review evidence and
rationale; it is not an implementation plan or a permanent second API reference.
The review used the trusted catalog, root declarations and comments, current
contracts and consumer guidance, and graph-assisted production-reference checks.