Skip to content

Fix manual status updates for application URLs - #101

Open
raederhans wants to merge 1 commit into
Pickle-Pixel:mainfrom
raederhans:agent/manual-status-url-validation
Open

Fix manual status updates for application URLs#101
raederhans wants to merge 1 commit into
Pickle-Pixel:mainfrom
raederhans:agent/manual-status-url-validation

Conversation

@raederhans

Copy link
Copy Markdown

Summary

  • resolve apply --mark-applied and --mark-failed against either the canonical discovery URL or the final application_url
  • fail with a non-zero exit instead of printing success when no job matches
  • reject ambiguous shared application URLs rather than updating multiple jobs
  • add regression coverage and document the fix under [Unreleased]

Root cause

The manual status path executed UPDATE jobs ... WHERE url = ? and ignored the affected-row count. The CLI then printed Marked as applied or Marked as failed unconditionally. That made out-of-band applications, including email applications, easy to misrecord when the operator had the final ATS/application URL rather than the original discovery URL.

User impact

Manual status commands now identify the canonical row before writing. Unknown or ambiguous URLs produce an actionable error and exit code 1, so automation cannot treat a zero-row update as success.

Validation

  • pytest tests -q - 6 passed
  • ruff check tests/test_manual_status.py - passed
  • python -m compileall -q src tests - passed
  • git diff --check - passed

Known repository baseline

ruff check src is not green on the current upstream main; it reports 149 pre-existing findings across the existing source tree. This PR does not broaden into unrelated lint cleanup.

Manual email or out-of-band applications may be recorded with either the
discovery URL or the final application URL. Resolve both forms to one canonical
job row and stop with an actionable error when the URL is missing or ambiguous,
so the CLI never prints success after a zero-row update.

Constraint: Keep this independent of browser auto-apply and provider changes.
Rejected: UPDATE with url OR application_url | duplicate application URLs could mutate multiple jobs.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Preserve exact-match and ambiguity checks for manual status writes.
Tested: pytest tests -q (6 passed); ruff check tests/test_manual_status.py; compileall; diff check
Not-tested: Full upstream ruff remains blocked by 149 pre-existing findings on main.
@raederhans
raederhans marked this pull request as ready for review August 14, 2026 14:27
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