Skip to content

Fix missing module imports after Math Brain refactoring#294

Draft
Copilot wants to merge 2 commits intocodex/fix-report-generation-birth-data-errorfrom
copilot/sub-pr-293
Draft

Fix missing module imports after Math Brain refactoring#294
Copilot wants to merge 2 commits intocodex/fix-report-generation-birth-data-errorfrom
copilot/sub-pr-293

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

Tests failed with ReferenceError: [function] is not defined after Math Brain was refactored into separate modules. The seismograph-engine and monolith were calling functions that weren't properly exported through the module boundaries.

Changes

Module orchestration:

  • Export mapT2NAspects and subjectToAPI from orchestrator
  • Import both functions in monolith
  • Export enrichDailyAspects, selectPoeticAspects, weightAspect, and related constants from monolith for seismograph-engine's lazy-loading pattern

Import paths:

  • Fix scaleDirectionalBias import in seismograph-engine (was metric-labels, should be canonical-scaling)

Test fixtures:

  • Add required data.person.planets structure to mock API responses

Result

18/19 tests passing (was 7/19). Remaining failure is unrelated provenance metadata issue in NATAL_ASPECTS mode.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add mapT2NAspects export to orchestrator and import in monolith
- Add subjectToAPI export to orchestrator and import in monolith
- Fix scaleDirectionalBias import in seismograph-engine (move from metric-labels to canonical-scaling)
- Export enrichDailyAspects, selectPoeticAspects, weightAspect, and related constants from monolith for seismograph-engine lazy loading
- Fix mock API responses in tests to include required data.person.planets structure

These changes fix the calculateSeismograph function and related dependencies, resolving the test failures mentioned in the PR review.

Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Copilot AI changed the title [WIP] Normalize Math Brain birth data payload Fix missing module imports after Math Brain refactoring Nov 10, 2025
Copilot AI requested a review from DHCross November 10, 2025 19:47
@DHCross
Copy link
Owner

DHCross commented Jan 28, 2026

Closing as stale (2+ months) - Math Brain imports have been refactored since. If fixes are still needed, please reopen against current main.

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