Skip to content

refactor(ai): remove debug-logger abstraction — PR 2–4 modules#417

Merged
ianwhitedeveloper merged 2 commits intoai-testing-framework-implementation-consolidationfrom
pr/ai-debug-logger-removal
Feb 26, 2026
Merged

refactor(ai): remove debug-logger abstraction — PR 2–4 modules#417
ianwhitedeveloper merged 2 commits intoai-testing-framework-implementation-consolidationfrom
pr/ai-debug-logger-removal

Conversation

@ianwhitedeveloper
Copy link
Collaborator

Summary

Prerequisite cleanup for PR 5 (#416). Must merge before PR 5 resumes review.

Removes the debug-logger abstraction that was introduced in PR 2 but never covered by formal requirements, never exposed via the CLI, and never tested end-to-end. logFile was UAT scaffolding already broken in two places on the old branch. Stripping it simplifies every public signature, eliminates logger threading, and resolves all logger-related WIP items from the consolidation plan.


What's in This PR

Deleted

  • source/debug-logger.js and source/debug-logger.test.js — removed entirely (−417 lines across 11 files).

Modified — signature cleanup (PR 2–4 modules)

  • source/execute-agent.js — drop debug/logFile/logger params from executeAgent, runAgentProcess, spawnProcess, processAgentOutput; extract truncateOutput helper (eliminates duplication)
  • source/agent-parser.js — drop logger from unwrapAgentResult and unwrapRawOutput
  • source/aggregation.js — drop logger; replace manual zodError.issues mapping with z.prettifyError; switch to safeParse pattern
  • source/extraction-parser.js — convert resolveImportPaths to named params { importPaths, projectRoot }; drop positional debug/logger param
  • source/validation.js — drop debug param from verifyAgentAuthentication; convert logger.* calls to console.log
  • source/constants.js — remove debug/debugLog fields from defaults and schema

Tests updated

  • source/agent-parser.test.js — drop per-test logger locals
  • source/aggregation.test.js — drop createMockLogger; full expected-value assertions
  • source/execute-agent.test.js — drop logger args
  • source/extraction-parser.test.js — drop noopLogger; update resolveImportPaths call sites to named params
  • source/limit-concurrency.test.js — full expected-value assertions
  • source/validation.test.js — drop debug arg; use handleAIErrors routing pattern

Why This is a Separate PR

These changes touch already-merged modules from PRs 2–4. They are logically independent from PR 5's new modules (test-extractor.js, ai-runner.js) and are cleaner to review in isolation. PR 5 depends on the cleaned-up signatures established here.


Test Results

All existing tests pass with the signatures updated:

npm test       → passing (all test files)
npm run lint   → Lint complete.
npm run ts     → TypeScript check complete.

Made with Cursor

@ianwhitedeveloper ianwhitedeveloper marked this pull request as draft February 25, 2026 20:07
@ianwhitedeveloper ianwhitedeveloper force-pushed the pr/ai-debug-logger-removal branch from a985629 to ecd2c58 Compare February 25, 2026 20:39
@ianwhitedeveloper ianwhitedeveloper force-pushed the ai-testing-framework-implementation-consolidation branch from a96a49d to 6c81837 Compare February 25, 2026 20:39
debug/logFile/logger params were never in the formal requirements, never
exposed via the CLI, and never tested end-to-end. logFile was UAT
scaffolding already broken in two places. Removing the abstraction
simplifies every public signature and eliminates logger threading.

- Delete debug-logger.js and debug-logger.test.js (−417 lines)
- Drop debug/logFile/logger params from execute-agent, agent-parser,
  aggregation, extraction-parser, validation public signatures
- Convert user-visible progress messages to console.log/console.warn
- Delete internal diagnostic noise throughout
- Remove debug/debugLog fields from constants.js defaults and schema
- Extract truncateOutput helper in execute-agent.js (eliminates duplication)
- Convert resolveImportPaths to named params { importPaths, projectRoot }
- Replace manual zodError.issues mapping with z.prettifyError in aggregation
- Full expected-value assertions and allNoop spread pattern in test files

Co-authored-by: Cursor <cursoragent@cursor.com>
@ianwhitedeveloper ianwhitedeveloper force-pushed the pr/ai-debug-logger-removal branch from ecd2c58 to 82202d2 Compare February 25, 2026 20:44
- Document parseOutput signature in executeAgent docblock
- Extract authGuidance constant from validation.js; import
  in test to decouple expected value from inline string
- console.log -> console.warn on auth failure path
- Restore smoke-test comment in verifyAgentAuthentication
- Normalize Try() call site in extraction-parser.test.js

Made-with: Cursor
@ianwhitedeveloper ianwhitedeveloper marked this pull request as ready for review February 25, 2026 21:50
@ianwhitedeveloper ianwhitedeveloper merged commit a6b8a8f into ai-testing-framework-implementation-consolidation Feb 26, 2026
@ianwhitedeveloper ianwhitedeveloper deleted the pr/ai-debug-logger-removal branch February 26, 2026 17:57
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