Skip to content

chore(meta): drop unused builder materialize stack after EDS-2 - #246

Merged
buke merged 1 commit into
mainfrom
chore/eds12-status-and-materialize-cleanup
Aug 5, 2026
Merged

chore(meta): drop unused builder materialize stack after EDS-2#246
buke merged 1 commit into
mainfrom
chore/eds12-status-and-materialize-cleanup

Conversation

@buke

@buke buke commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

User description

Summary

  • Remove the dead materializeEffectiveModels stack from ModuleBuilder now that EDS-2 Persist writes pure declarations and recomputes via ExpandModelsAlongExtends / E2 (#244 / #245).
  • Keep PreloadTree tip coverage by asserting meta.ListDeclarations directly in the persist helper test.
  • Local-only: synced EDS-1/2 status into .dev/docs/.../meta-effective-dual-store-design.md (§8/§8.1/§9.1/§11; gitignored, not in this PR).

Test plan

  • go test ./internal/module/artifact/build/backend/ ./pkg/meta/ -count=1
  • CI green on this PR

Made with Cursor


PR Type

Refactoring, Tests


Description

  • Go Core: Remove obsolete materializeEffectiveModels and helper functions from ModuleBuilder.

  • Go Core: Update builder unit tests to call meta.ListDeclarations directly instead of deleted helpers.

  • No TypeScript module changes (modules/) or new source files requiring SPDX headers.


File Walkthrough

Relevant files
Refactoring
builder.go
Drop dead materialize and model cloning helper stack         

internal/module/artifact/build/backend/builder.go

  • Remove materializeEffectiveModels and its internal helper functions
    (mergeOrderedFields, mergeOrderedServices, computeEffectiveMeta,
    loadLatestModelByPath, clone helpers).
  • Recompute logic is now delegated directly to meta.RecomputeKeys.
+0/-325 
Tests
builder_test.go
Adapt builder backend unit tests to use meta.ListDeclarations

internal/module/artifact/build/backend/builder_test.go

  • Remove TestMergeCloneAndMaterializedHelpers associated with deleted
    materialize stack.
  • Update TestPersistHelpersAndBuild to test meta.ListDeclarations
    directly with PreloadTree: true.
+12/-165

Summary by CodeRabbit

  • Refactor
    • Removed legacy model materialization and inheritance processing.
    • Simplified declaration loading and persistence behavior.
  • Tests
    • Updated persistence coverage for preloaded declaration trees, missing paths, and wrapped list errors.
    • Removed tests for retired materialization, cloning, merging, and cycle-detection behavior.

- Remove materializeEffectiveModels and its merge/clone helpers now that Persist recomputes via ExpandModelsAlongExtends / E2.

- Point persist helper coverage at ListDeclarations PreloadTree instead of the deleted loadLatestModelByPath wrapper.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change removes effective-model materialization from ModuleBuilder. Tests now query meta.ListDeclarations directly and validate preloaded declarations, missing paths, and wrapped list errors.

Changes

Model materialization removal

Layer / File(s) Summary
Remove materialization and update validation
internal/module/artifact/build/backend/builder.go, internal/module/artifact/build/backend/builder_test.go
ModuleBuilder no longer merges inherited metadata, loads parent models, detects cycles, or clones model entities. Tests now call meta.ListDeclarations directly and verify declaration results and errors.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: Review effort 3/5

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: removal of the unused materializeEffectiveModels stack after EDS-2 implementation.
Description check ✅ Passed The description provides comprehensive context including motivation (EDS-2 changes), detailed summary of deletions, test plan confirmation, and file walkthrough. All critical information is present.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/eds12-status-and-materialize-cleanup

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/module/artifact/build/backend/builder_test.go`:
- Around line 636-639: Update the declaration assertion in the test to require
exactly one result by checking len(decls) == 1 before accessing decls[0].
Preserve the existing nil validation for the sole declaration and the subsequent
loaded assignment.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 915fc032-d11f-4f4d-be8d-c616e576ab05

📥 Commits

Reviewing files that changed from the base of the PR and between 8f5e582 and da185b8.

📒 Files selected for processing (2)
  • internal/module/artifact/build/backend/builder.go
  • internal/module/artifact/build/backend/builder_test.go
💤 Files with no reviewable changes (1)
  • internal/module/artifact/build/backend/builder.go

Comment thread internal/module/artifact/build/backend/builder_test.go
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@buke
buke merged commit a4dcddd into main Aug 5, 2026
44 checks passed
@buke
buke deleted the chore/eds12-status-and-materialize-cleanup branch August 5, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant