refactor: trim internal-only exports from the public barrels (#203) - #206
Conversation
…ance#203) Remove four internal-only re-exports from the package root and /alliance entry to shrink the public surface and blast radius: trimOptional, createUnconfiguredAllianceContext (core), and the concrete URL generators generatorMailing, generatorSlackCpplang (alliance). The symbols stay in their modules; only the barrel re-exports are dropped, and no in-repo importer used them via the barrel. Deprecated-in-window legacy facades are kept. Add a snapshot guard test that pins the runtime value-export allow-list for both barrels, so a future internal symbol leaking into a barrel fails CI. Document the removal in CHANGELOG (Breaking, library) and MIGRATION.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR trims the public export surface by removing internal-only re-exports (trimOptional, createUnconfiguredAllianceContext, generatorMailing, generatorSlackCpplang) from the core and alliance package barrels, adds a snapshot test to guard runtime exports, and updates CHANGELOG.md and docs/MIGRATION.md accordingly. ChangesTrim internal-only public export surface
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
=======================================
Coverage ? 83.86%
=======================================
Files ? 45
Lines ? 2306
Branches ? 768
=======================================
Hits ? 1934
Misses ? 372
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Shrinks the public export surface (issue #203) to reduce blast radius.
An audit of both barrels (
.and./alliance) classified every export. Most are legitimately public or deprecated-in-window legacy facades that the deprecation policy says can't be removed yet, so this is a conservative trim of the genuinely internal leaks plus a guard so the surface can't grow silently.trimOptional,createUnconfiguredAllianceContext(core), and the concrete URL generatorsgeneratorMailing,generatorSlackCpplang(alliance). None are documented or consumer-facing, and no in-repo importer used them via the barrel (they all import from the direct module path).setPineconeClient,getDefaultServerContext, theregisterUrlGeneratorfamily) and all response schemas.buildQueryExperimentaltrim) and MIGRATION.Verified locally: typecheck and
eslint src/clean, full suite green (342 tests), build passes.Closes #203.
Summary by CodeRabbit
Bug Fixes
Documentation
Chores