Skip to content

2.1.0: objectstate.codegen; drop well_filter debug - #28

Merged
trissim merged 3 commits into
mainfrom
refactor/L6-codegen
Oct 11, 2026
Merged

trissim merged 3 commits into
mainfrom
refactor/L6-codegen

Conversation

@trissim

@trissim trissim commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Part of OpenHCS consolidation surface L6.

  • objectstate.codegen (moved from OpenHCS): importing it registers pycodify formatters that write raw field values, never resolved ones.
    • LazyResolutionFormatter handles every LazyResolutionDataclass. In clean mode it writes the fields whose raw value differs from the field default.
    • LazyDataclassFormatter handles factory-made LazyDataclass. In clean mode it writes constructor-set fields and concrete values.
    • field_needs_source(current, default, context) serves owners that format lazy-config fields themselves.
  • Bug fixed: base configs that inherit through None are LazyResolutionDataclass but not LazyDataclass, and they were written through pycodify's generic dataclass formatter. That formatter reads resolved values, so in full mode a saved config stopped inheriting. OpenHCS's new round-trip test found this.
  • G7 leftover: this deletes the debug branches that were gated on application field names (well_filter, num_workers, sub_dir, output_dir_suffix). A generic library should not name app fields, and these branches were already unreachable after the rename. Docstring examples now use partition_filter / PartitionFilterConfig.
  • Version: 2.1.0. It adds a module and nothing public is removed. It now depends on pycodify>=0.2.0,<0.3.

Release order: pycodify 0.2.0 must be released first (OpenHCSDev/pycodify PR). CI here installs from PyPI and fails until it is.

Tests: local full suite passed (238 + 2), with pycodify from its PR branch.

🤖 Generated with Claude Code

trissim and others added 2 commits October 11, 2026 07:37
…ter debug

- objectstate.codegen registers LazyDataclassFormatter with pycodify: source is
  written from raw field values (clean mode: constructor-set fields and
  concrete values; full mode: every field) and exposes field_needs_source for
  owners that format lazy-config fields themselves. Moved from OpenHCS.
- Deletes debug branches gated on application field names (well_filter,
  num_workers, sub_dir, output_dir_suffix); docstring examples now use
  partition_filter / PartitionFilterConfig.
- Depends on pycodify>=0.2.0,<0.3. 2.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base configs that inherit through None (LazyResolutionDataclass, not
factory-made LazyDataclass) were written through pycodify's generic dataclass
formatter, which reads resolved values: full mode baked inherited values into
the source and the loaded config stopped inheriting. LazyResolutionFormatter
writes their raw values (clean mode: fields that differ from the field
default); LazyDataclassFormatter refines it with the constructor-set rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 11, 2026 12:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim merged commit 4eb8de1 into main Oct 11, 2026
11 checks passed
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