Skip to content

fix(ats): withdrawn is its own outcome; webhooks speak the API vocabulary - #549

Merged
thinkclay merged 1 commit into
mainfrom
claude/ats-withdrawn-and-webhooks
Aug 7, 2026
Merged

thinkclay merged 1 commit into
mainfrom
claude/ats-withdrawn-and-webhooks

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #533 and #541 — the two items that needed a decision. Both confirmed before implementing.

#533 — withdrawn was being counted as rejected

The transform mapped withdrawn -> rejected, so a candidate who pulled out was counted as one the employer turned down. Wrong for funnel conversion, and wrong for EEO adverse-impact ratios, which count rejections.

withdrawn is now a distinct ApplicationStatus. The board still draws seven columns — a state nobody works doesn't earn board width — so it shares the terminal column via COLUMN_FOR_STATUS, with a "Withdrawn by candidate" badge on the card. The data keeps them apart, which is what the metrics read.

Widening the union surfaced all five places that had to decide what withdrawn means: the status-change modal, the metrics stage distribution, the message-template stages, the kanban STATUS_MAP, and the client transition table. Each was handled deliberately — withdrawn is terminal and is not an employer move, matching the server's table from #530.

#541 — webhooks spoke a different vocabulary

triggerWebhook sent the row verbatim, so a consumer polling GET /v1/applications/{id} saw pending while the webhook for the same row said new. One field, one resource, two vocabularies.

Now routed through withApiStatus — the same helper the REST responses use — so the two can't drift apart again. There's a test asserting no DB status name can survive into a payload.

Before this ships: worth confirming core.webhook_configurations has no enabled rows in production. Webhooks are per-org opt-in, so if an org has already integrated against new/screen, this is breaking for them and should be versioned instead. I can't check production from here.

(The issue originally named core.webhook_endpoints; that was wrong and I've corrected it there.)

Verification

76 backend tests pass. The applications integration suite fails identically with and without this change — 6 passed / 19 failed either way — so those are the known-red auth fixtures, not a regression. I checked by stashing rather than assuming.

🤖 Generated with Claude Code

…us vocabulary

Two decisions from 2026-08-05, both confirmed before implementing.

## #533 — withdrawn is its own outcome

The transform mapped `withdrawn -> rejected`, so a candidate who pulled out was
counted as one the employer turned down. That is wrong for funnel conversion
and for EEO adverse-impact ratios, which count rejections.

`withdrawn` is now a distinct ApplicationStatus. The board still draws seven
columns — a state nobody works does not earn board width — so `withdrawn`
shares the terminal column with `rejected` via COLUMN_FOR_STATUS, and the card
carries a "Withdrawn by candidate" badge so the two are still distinguishable
on screen. The data keeps them apart, which is what the metrics read.

Widening the union surfaced all five places that had to decide what withdrawn
means: the status-change modal, the metrics stage distribution, the message
template stages, the kanban STATUS_MAP, and the client transition table. Each
was handled rather than defaulted — withdrawn is terminal and is not an
employer move, matching the server's table.

## #541 — webhooks spoke the DB vocabulary

`triggerWebhook` sent the row verbatim, so a consumer polling
GET /v1/applications/{id} saw `pending` while the webhook for the same row said
`new` — one field, one resource, two vocabularies. It now goes through
withApiStatus, the same helper the REST responses use, so the two cannot drift
apart again.

Treated as a bug fix rather than a versioned change, per that decision.
Webhooks are per-organisation opt-in via core.webhook_configurations (the issue
originally named the wrong table; corrected there), so the blast radius is any
org that has already configured one — worth confirming that table has no
enabled rows in production before this ships.

76 backend tests pass. The applications integration suite fails identically
with and without this change (6 passed / 19 failed either way) — those are the
known-red fixtures, not a regression.

Refs #533, #541
@thinkclay
thinkclay merged commit 7c5fccd into main Aug 7, 2026
11 of 12 checks passed
@thinkclay
thinkclay deleted the claude/ats-withdrawn-and-webhooks branch August 7, 2026 18:51
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📊 Performance Benchmark Results


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.

fix(ats): withdrawn applications are displayed as rejected, corrupting funnel and EEO counts

1 participant