Skip to content

fix: create prompt file when both automatic review flags are set#70

Merged
shashank-factory merged 1 commit intodevfrom
fix/prompt-file-missing-dual-review-flags
Apr 1, 2026
Merged

fix: create prompt file when both automatic review flags are set#70
shashank-factory merged 1 commit intodevfrom
fix/prompt-file-missing-dual-review-flags

Conversation

@factory-nizar
Copy link
Copy Markdown
Contributor

@factory-nizar factory-nizar commented Apr 1, 2026

Problem

When both automatic_review: true and automatic_security_review: true are set, prepareTagExecution() returned early without creating a prompt file, causing the "Run Droid Exec" step to fail with:

Prompt file '/home/runner/_work/_temp/droid-prompts/droid-prompt.txt' does not exist.

Repro: https://github.com/Factory-AI/factory-mono/actions/runs/23825974314/job/69449081451

The early return was left by a "parallel mode" design (separate jobs for code review and security review) that was never implemented. The action.yml is a single composite action with no step that reads run_security_review, so the early return just skipped prompt creation and nothing picked up the slack.

Fix

When both flags are set, call prepareReviewMode() instead of returning early. This creates the prompt file and runs code review normally. The run_security_review output is still set but has no effect since no step in action.yml consumes it -- security review was never running in this configuration anyway.

When both automatic_review and automatic_security_review were true,
prepareTagExecution returned early without calling prepareReviewMode,
so no prompt file was written. The Droid Exec step then failed with
'Prompt file does not exist'.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid bot commented Apr 1, 2026

Droid finished @factory-nizar's task —— View job


Droid reviewed PR #70 and found no actionable bugs. Both candidate comments were rejected during validation — one was speculative about pre-existing architectural design (parallel security review jobs), and the other had an invalid diff anchor on unchanged code. The fix correctly resolves the missing prompt file issue.

@shashank-factory shashank-factory merged commit 7f00497 into dev Apr 1, 2026
4 checks passed
@shashank-factory shashank-factory deleted the fix/prompt-file-missing-dual-review-flags branch April 1, 2026 00:56
Copy link
Copy Markdown
Contributor

@factory-droid factory-droid bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix correctly routes the dual-flag case through prepareReviewMode() to create the prompt file, resolving the runtime failure. The run_security_review output flag is preserved for downstream parallel job handling, consistent with the pre-existing architecture. No actionable bugs found.

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.

2 participants