Conversation
`--dry-run` is documented as "Preview actions without submitting", but a dry run currently records the job as submitted. The dry-run prompt instructs the agent to "Do NOT click the final Submit/Apply button ... then output RESULT:APPLIED with a note that this was a dry run" (prompt.py). run_job matches on `RESULT:APPLIED` and returns "applied", and worker_loop writes that straight to the database. `dry_run` is threaded through every signature but is never consulted again once run_job returns, so the preview is indistinguishable from a real submission. The result is silent and not recoverable through the CLI: - mark_result sets apply_status='applied' and applied_at - acquire_job only selects `apply_status IS NULL OR apply_status = 'failed'`, so the job is never offered again - reset_failed explicitly excludes 'applied', so --reset-failed can't clear it A rehearsal therefore consumes a real application permanently, and the job is reported in the dashboard totals as applied. This makes a dry run leave the job untouched: the lock is released, nothing is persisted, and the outcome is still surfaced in the dashboard so the run is visible without being recorded. Reproduce with `applypilot apply --url <job> --dry-run`, then check `SELECT apply_status, applied_at FROM jobs WHERE url = '<job>'`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--dry-runis documented as "Preview actions without submitting", but a dry run currently records the job as submitted.The dry-run prompt instructs the agent to "Do NOT click the final Submit/Apply button ... then output RESULT:APPLIED with a note that this was a dry run" (prompt.py). run_job matches on
RESULT:APPLIEDand returns "applied", and worker_loop writes that straight to the database.dry_runis threaded through every signature but is never changed again once run_job returns, so the preview basically marks it the same as a real submission.This fix makes a dry run leave the job untouched: the lock is released, nothing is persisted, and the outcome is still surfaced in the dashboard so the run is visible without being recorded.
Reproduce with
applypilot apply --url <job> --dry-run, then checkSELECT apply_status, applied_at FROM jobs WHERE url = '<job>'.