Repository navigation
fix(ats): withdrawn is its own outcome; webhooks speak the API vocabulary - #549
Merged
Merged
Conversation
…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
Contributor
📊 Performance Benchmark Results |
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.
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.withdrawnis now a distinctApplicationStatus. The board still draws seven columns — a state nobody works doesn't earn board width — so it shares the terminal column viaCOLUMN_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
triggerWebhooksent the row verbatim, so a consumer pollingGET /v1/applications/{id}sawpendingwhile the webhook for the same row saidnew. 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_configurationshas no enabled rows in production. Webhooks are per-org opt-in, so if an org has already integrated againstnew/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