Skip to content

test: cover VisualAgent MainPrompt._parse_answer aggregation - #28

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789677966-visual-agent-parse-answer-test
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789677966-visual-agent-parse-answer-test

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Adds the missing non-pricy unit test for the visual agent's prompt module. MainPrompt._parse_answer merges think.parse_answer and action_prompt.parse_answer into one dict; nothing asserted that both survive the merge, so a key change or collision in either sub-parser would silently drop the thought or the action.

New tests/agents/test_visual_agent_prompt.py builds a real MainPrompt from DEFAULT_PROMPT_FLAGS and asserts:

  • both think and action are present and correct for a well-formed answer;
  • with use_thinking=False, the invisible Think element contributes nothing ("think" not in ans_dict) while action still parses;
  • a missing <think> tag surfaces parse_error (Think's non-raising fallback) rather than being swallowed.

Runs without a MiniWoB server or any LLM call.

Devin-Org: engineering

Link to Devin session: https://app.devin.ai/sessions/627e197fd9264cb3aad32f13e728016d
Open in Devin Desktop: https://app.devin.ai/desktop/session/627e197fd9264cb3aad32f13e728016d?variant=devin

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

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.

0 participants