Audit sequence identity scaling and lifecycle

This commit is contained in:
2026-10-23 22:03:16 +00:00
parent e01aeca761
commit 0be7cdb00e
4 changed files with 79 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
# Sequence Identity And Combination Implementation Plan
Status: implementation in progress; Stages 1–29 complete.
Status: all thirty stages complete.
Audience: a Luna coding agent implementing one numbered stage per prompt, in
order. This plan starts at commit
@@ -1031,6 +1031,37 @@ from Stages 28–29 if their covered content is unchanged. Record completed scop
validation, benchmark commands/qualitative findings, and any real remaining
issues accurately. No new timing thresholds or release gates are introduced.
**Completion:** Audited the shared indexed sequence-combination and identity
validation paths, declaration gathering, numeric normalization, ownership and
selector-path handling, adapters, dependencies, boundaries, and limits. Removed
per-declaration temporary-slice allocation while retaining detached declaration
ownership. Added a mixed-size identified-sequence upsert benchmark because the
existing assembly benchmarks did not exercise this path. Its allocations grew
roughly in proportion to record count from 128 to 2,048 records; elapsed times
were similarly proportional in this short run and are descriptive only.
Benchmark command:
```sh
go test ./internal/engine -run '^$' -bench '^(BenchmarkComposeWideMappings|BenchmarkUnderlay(BroadCatalog|ManySmallTiers)|BenchmarkOverlay(RecursiveMappings|ManyApplications)|BenchmarkInheritance(Expansion|IndependentScopes)|BenchmarkSequenceMixedUpsert)$' -benchmem -benchtime=100ms
```
The benchmark reported mixed-upsert results of 278,009 B and 2,337 allocations
per operation at 128 records; 1,122,177 B and 9,253 allocations at 512; and
4,521,839 B and 36,925 allocations at 2,048. No thresholds are implied. The
code review found shared combination and identity algorithms, indexed matching
and mapping access, declaration grouping by destination, coefficient/exponent
numeric normalization without magnitude expansion, operation-local ownership
and selector traversal, no remaining early-CLI adapter, and no newly introduced
dependencies, public internal types, background work, release machinery, or
sequence-specific resource limits. Obsolete registration names remain only in
historical or roadmap text.
Verified with `./scripts/check.sh`, `go test -race ./...`,
`go test . -run 'TestLocalDocumentationLinks|TestDependencyImportBoundary|TestPublicFacadeBoundary' -count=1`,
`git diff --check`, and the benchmark command above. No remaining implementation
issues were found.
Acceptance: all roadmap operations and lifecycle boundaries work through ordinary
and layered loads; values and inspection agree; application constraints hold on
successful final results; deferred behavior and YAML-only guarantees have not