test(coverage): add unit tests for agent-profiles context fetching and hintConfig trailing messages#537
Conversation
…d hintConfig trailing messages
|
🤖 On it — checking the PR now Progress: [██░░░░░░░░] 21% (iteration 15/70) 🔍 Code Review Update (1 min) Last updated: iteration 15 · review |
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM - Well-structured test additions covering context-fetching orchestration paths in agent-profiles.ts and trailing message logic in hintConfig.ts. Tests correctly exercise happy paths, error handling (squint failures, work item errors), and edge cases (empty outputs, missing cardId). Mock isolation is proper with the top-level beforeEach clearing all mocks between tests. CI is green.
Summary
src/backends/agent-profiles.tscontext-fetching functions, covering all 4 orchestration paths (fetchWorkItemContext,fetchReviewContext,fetchCIContext,fetchPRCommentResponseContext) and their helper functions (fetchDirectoryListing,fetchContextFileInjections,fetchSquintOverview,fetchWorkItemInjection)src/config/hintConfig.tscovering the implementation agent trailing message builder,formatIterationStatusurgency levels (no emoji /formatDiagnosticLoopWarningthreshold behavioragent-profiles.test.tsmock setup withreadPRFileContents,resolveSquintDbPath, andexecFileSyncmocks needed for context testsagent-profiles.test.ts(+29 new context tests) and 29 tests inhintConfig.test.ts(+18 new tests) — 86 tests in these two filesTest plan
npm test— all 3139 tests pass (184 files)npm run lint:fix— no errors (1 pre-existing warning in unrelated file)npm run typecheck— zero errorsCard
https://trello.com/c/79qkpRR2/109-find-top-area-that-needs-test-coverage-and-plan-new-tests
🤖 Generated with Claude Code