Skip to content

Make no-output command test deterministic in MockLLM#36

Closed
joone wants to merge 2 commits intomainfrom
codex/fix-test-failure-in-github-actions
Closed

Make no-output command test deterministic in MockLLM#36
joone wants to merge 2 commits intomainfrom
codex/fix-test-failure-in-github-actions

Conversation

@joone
Copy link
Copy Markdown
Owner

@joone joone commented Feb 16, 2026

Motivation

  • Make the Handle no output unit test deterministic across environments by ensuring the mock LLM returns a command that consistently produces no matches and triggers the intended "no output" code path.

Description

  • Modify MockLLMAPI.getCommandForPrompt in src/llm/index.ts to return grep '__LOZ_TEST_NO_OUTPUT_9f8b7c__' README.md for the Find sfsdfef prompt so grep runs against a known file with a guaranteed-missing token.

Testing

  • Ran npm run build which succeeded and ran npm test -- --grep "Handle no output" which produced 1 passing for the targeted test; running npm test -- test/command.test.ts showed the targeted Handle no output case passed while other unrelated tests failed due to environment-dependent services and missing API credentials.

Codex Task

@joone joone closed this Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant