refactor(featurebundle): simplify merge surface via MergeBundles/Append helpers#120
Conversation
…nd helpers
Reduce duplication in the feature-bundle merge surface so every new
FeatureBundle field requires exactly one append line instead of three
(length budget + Grow + append + struct field assignment).
- internal/featurebundle/merge_surface.go:
- Add MergedFeatureSurface.Append(b) — the single merge point for all
slice fields.
- Add MergeBundles(bundles...) helper that folds bundles in order.
- Extract buildEnabledFeatureBundles (registry walk) from MergeFeatureSurface;
MergeFeatureSurface now delegates to MergeBundles.
- Drop the manual slices.Grow length-budgeting (premature optimization;
append growth is sufficient and far less duplicated).
- internal/featurebundle/merge_surface_test.go (new): cover empty merge,
all-field concatenation, and bundle-order preservation across slices.
- docs/feature-bridge-retirement-checklist.md: note the MergeBundles/Append
simplification (and the already-merged standardbundle façade deletion).
No behavior change; merge order and field contents are preserved.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (4)**/*📄 CodeRabbit inference engine (Custom checks)
Files:
**/*.go📄 CodeRabbit inference engine (Custom checks)
Files:
⚙️ CodeRabbit configuration file
Files:
internal/**⚙️ CodeRabbit configuration file
Files:
**/*_test.go⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📚 Learning: 2026-07-01T22:57:42.953ZApplied to files:
🔇 Additional comments (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughRefactors ChangesFeature bundle merge refactor
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rdrails, EchoesVault
Documentation closure for the go-llm-interactive-proxy architecture
de-slopification effort. Updates the spec docs and project knowledge
base to reflect the end state of the refactor.
- specs/go_llm_proxy_arch_review/resolution-plan.md: mark all phases
complete; rewrite the plan as the final closure record.
- specs/go_llm_proxy_arch_review/{architecture-review,findings-register,
source-index}.md: update to reflect deleted BuildExecutor wrappers,
moved standard_table.go, and the feature merge surface.
- docs/adr/0001-registry-driven-composition.md: registry is now the
registry type only; standard tables live in standardplugins; add a
dated update entry for the standardbundle/types.go/BuildExecutor
cleanup.
- docs/architecture-guardrails.md: document the bootstrap_plan.go
composition-root exemption, the role metadata in the hexagonal
baseline, and the standardplugins.DefaultWireModel rename.
- docs/architecture.md: note the MergeBundles/Append merge-surface
simplification.
- internal/plugins/features/README.md: wiring location corrected from
internal/pluginreg to internal/standardplugins.
- EchoesVault/pages/{plugin-system,testing-strategy}.md and
EchoesVault/daily/2026-07-08.md: compiled knowledge base updated.
Docs only; no code or test changes.
Note: this PR describes the end state of the cleanup, which is delivered
across #118 (runtimebundle invariant boundary), #119 (baseline role),
and #120 (merge surface). It should merge after those three to keep
docs and code consistent.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reduces duplication in the feature-bundle merge surface so every new
FeatureBundlefield requires exactly one append line instead of three (length budget +Grow+ append + struct field assignment).What changed
internal/featurebundle/merge_surface.go:MergedFeatureSurface.Append(b)— the single merge point for all slice fields.MergeBundles(bundles...)helper that folds bundles in order.buildEnabledFeatureBundles(registry walk) fromMergeFeatureSurface;MergeFeatureSurfacenow delegates toMergeBundles.slices.Growlength-budgeting (premature optimization;appendgrowth is sufficient and far less duplicated).internal/featurebundle/merge_surface_test.go(new): cover empty merge, all-field concatenation, and bundle-order preservation across slices.docs/feature-bridge-retirement-checklist.md: note theMergeBundles/Appendsimplification (plus an accuracy fix for the already-mergedstandardbundlefaçade deletion).Verification (PR scoped, in isolation)
go test ./internal/featurebundle/...— passes (3 new tests:TestMergeBundles_empty,TestMergedFeatureSurfaceAppend_concatenatesAllFields,TestMergeBundles_preservesBundleOrderAcrossSlices).go vet ./internal/featurebundle/...— clean.go build ./...— passes; consumers (runtimebundle,standardplugins) build and test cleanly.No behavior change; merge order and field contents are preserved.
Fourth of the PRs splitting the post-review cleanup changes on the local working tree.