Skip to content

refactor: align test structure to src/ and fix framework API breakage#176

Closed
jafreck wants to merge 5 commits intomainfrom
refactor/test-structure-alignment
Closed

refactor: align test structure to src/ and fix framework API breakage#176
jafreck wants to merge 5 commits intomainfrom
refactor/test-structure-alignment

Conversation

@jafreck
Copy link
Owner

@jafreck jafreck commented Mar 16, 2026

Summary

Align test file structure to mirror src/ layout and fix all framework API breakage from @cadre-dev/framework 0.2.1.

Test structure changes

  • Rename test files to match source module names (e.g. aamf-output-schemaagent-output-schemas)
  • Move flow step tests into tests/flow/steps/ mirroring src/flow/steps/
  • Move KB/lore tests from tests/core/ to tests/lore/
  • Delete obsolete claude-runner.test.ts (tested removed wrapper)
  • Remove legacy naming and coverage-gaps prefixes

Source fixes for framework 0.2.1 API

  • shared.ts: remove broken classifyError import from framework/runtime
  • cost-estimator.ts: pass pricing via costOverrides (models key removed); implement 80/20 split in estimateFromTotal directly
  • token-tracker.ts: replace framework delegation with standalone tracking (loadFromAggregates and getByWorkItem removed from framework)
  • retry.ts: implement retry loop natively (computeDelay and RETRY_ORIGINAL removed from framework); preserves fast infrastructure retry and exponential backoff
  • agent-launcher.ts: map to issueNumber (workItemId removed from framework)
  • runtime.ts: remove signal/hooks from FlowRunnerOptions (no longer supported); process phase results from executionOutputs post-run

Resolves all 17 pre-existing type errors from framework consolidation.

jafreck added 5 commits March 15, 2026 18:07
Test structure changes:
- Rename test files to match source module names (e.g. aamf-output-schema → agent-output-schemas)
- Remove 'coverage-gaps' and legacy naming from test files
- Move flow step tests into tests/flow/steps/ mirroring src/flow/steps/
- Move KB/lore tests from tests/core/ to tests/lore/
- Delete obsolete claude-runner.test.ts (tested removed wrapper)

Source fixes for @cadre-dev/framework API changes:
- shared.ts: remove broken classifyError import from framework/runtime
- cost-estimator.ts: pass pricing via costOverrides (models key removed)
- cost-estimator.ts: implement 80/20 split in estimateFromTotal directly
- token-tracker.ts: replace framework delegation with standalone tracking
  (loadFromAggregates and getByWorkItem removed from framework)
- retry.ts: implement retry loop natively (computeDelay and RETRY_ORIGINAL
  removed from framework); preserves fast infr  removed from framework); preserves fast infr  removed from framework); preserves fast infr  removed from framework); ptes  removed from framewo (all pre-existing)
…untime

- agent-launcher.ts: map to issueNumber (workItemId removed from framework)
- runtime.ts: remove signal/hooks from FlowRunnerOptions (no longer supported),
  process phase results from executionOutputs post-run instead
- Resolves all 17 pre-existing type errors from framework consolidation
@jafreck jafreck closed this Mar 16, 2026
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.

1 participant