Skip to content

Fix apply stage on Windows and make dry-run side-effect-free - #93

Open
ArchieChelle wants to merge 1 commit into
Pickle-Pixel:mainfrom
ArchieChelle:fix-apply-stage-windows
Open

Fix apply stage on Windows and make dry-run side-effect-free#93
ArchieChelle wants to merge 1 commit into
Pickle-Pixel:mainfrom
ArchieChelle:fix-apply-stage-windows

Conversation

@ArchieChelle

Copy link
Copy Markdown

Problems

  1. Windows launch failure: the apply stage spawned the bare claude command name, which fails on Windows with WinError 2 (the actual executable is claude.cmd). Every apply attempt failed on Windows.
  2. --url selector bug: the apply selector used apply_status != 'in_progress', which excludes never-applied jobs because NULL != 'in_progress' evaluates to NULL in SQL, not true. Jobs that had never been touched were silently skipped.
  3. --dry-run wasn't side-effect-free: dry runs could still create accounts, enter data, and upload files, and successful dry runs were mislabeled as "applied" in the database.

Fixes

  • Resolve the claude CLI via shutil.which() before spawning, so Windows finds claude.cmd.
  • Make the apply_status selector NULL-safe, matching the queue selector's logic.
  • Add a top-priority DRY RUN RULES block that stops the agent before any account creation, data entry, upload, or submit. Dry runs emit a distinct RESULT:DRY_RUN token and are recorded as neither applied nor failed.
  • Ignore .venv/ in git.

Scope

src/applypilot/apply/launcher.py, src/applypilot/apply/prompt.py, .gitignore.

- Resolve the claude CLI via shutil.which() before spawning it. Windows
  could not launch the bare "claude" name (it is claude.cmd), failing every
  apply with WinError 2.
- Fix the --url apply selector: "apply_status != 'in_progress'" excluded
  never-applied jobs because NULL != 'in_progress' is NULL in SQL. Now
  NULL-safe, matching the queue selector.
- Make --dry-run a true preview. A top-priority DRY RUN RULES block stops the
  agent before any account creation, data entry, upload, or submit; it emits a
  distinct RESULT:DRY_RUN token, and the launcher records it as neither applied
  nor failed (previously it created accounts, entered data, and mislabeled the
  job as "applied").
- Ignore .venv/ in git.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant