Skip to content

feat: materialize option defaults at feature intake, canonicalizing default-equivalent twins - #876

Merged
TomKaltofen merged 3 commits into
mainfrom
feat/os-008-intake-default-canonicalization
Jul 22, 2026
Merged

feat: materialize option defaults at feature intake, canonicalizing default-equivalent twins#876
TomKaltofen merged 3 commits into
mainfrom
feat/os-008-intake-default-canonicalization

Conversation

@TKaltofen

@TKaltofen TKaltofen commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Declared PropertySpec defaults are now materialized at feature intake (Engine.add_feature_to_collection). Two requests for the same feature that differ only by explicitly setting a key to its declared default merge into one feature during planning instead of raising at compute time; a warning advises deduplicating the request. Dependency declaration (input_features, child option inheritance) still observes declared pre-default options. The compute-boundary materialization remains as an idempotent safety net, and its twin-collapse ValueError is unreachable from engine-driven runs. The lifecycle stage table lives in memory-bank/systemPatterns.md.

Review and tests

Two independent deep reviews. Accepted fixes: merge warning with first-listed dependency precedence, an intake memo keeping shared Options instances aliased, and a filter-path invariant comment. 9 new test pins; full tox gate green (7195 passed, 170 skipped).

…efault-equivalent twins (os-008)

Rebind each resolved feature's options through options_with_defaults at
Engine.add_feature_to_collection, so default-equivalent twin requests merge
through the standard duplicate path instead of raising the twin-collapse
ValueError at compute time. Dependency declaration (input_features, child
option inheritance) keeps observing declared pre-default options via a stash
in _process_feature. The compute boundary stays as an idempotent safety net
for direct API use. Documents the lifecycle stage table in the memory bank.
…aliased at intake (os-008)

Review fixes: a merge that holds only after materialization (declared
pre-default options differ) now logs a warning advising deduplication and
noting first-listed dependency precedence; intake materialization is memoized
per feature group and source Options identity so aliased Options stay aliased;
the filter-path identity-no-op invariant is documented in place. Also notes
that subtype resolution applies defaults internally in the lifecycle table.
@TKaltofen
TKaltofen requested a review from TomKaltofen as a code owner July 22, 2026 10:36
@TKaltofen TKaltofen changed the title feat: materialize option defaults at feature intake, canonicalizing default-equivalent twins (os-008) feat: materialize option defaults at feature intake, canonicalizing default-equivalent twins Jul 22, 2026
@TomKaltofen
TomKaltofen merged commit 58f0588 into main Jul 22, 2026
18 checks passed
@TomKaltofen
TomKaltofen deleted the feat/os-008-intake-default-canonicalization branch July 22, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants