feat(hiring): final-selection queue, honest seat counts, and human interviews
Authored in a parallel session alongside the TypeScript migration; committed separately so the two never share a commit. No TypeScript migration file is included here. Candidates becomes the queue of hiring decisions waiting on a person, rather than a second Talent Pool listing every application the org ever took. Final selection is DERIVED - there is no `final_selection` value in the `application_status` enum and none is added. The fact it reads is the existence of an interview row, a NOT NULL foreign key, rather than `job_applications.interview_id`, which the schema keeps as an unconstrained soft reference precisely so it may dangle. `status = 'interview'` is set both when an interview is arranged and when one is completed, so status alone cannot tell a queue of people who have been interviewed from a queue of people merely booked in. Seats on a position are counted from the employment records instead of a stored column. A `filled` counter would be a second source of truth, and the day it disagreed with `staff` nothing could say which was lying. Someone who has left frees their seat, and over-hiring floors at zero rather than going negative. `DEMO_FILL` is gone. `hiringRecords.js` padded the hires list with five invented people so Hired History read as a history rather than as three rows; the padding reached Analytics too, where "total hires" counted eight against a database holding three. Hires now come only from `staff`. Both paths that file an application on somebody's behalf now carry `worker_profile_id`, the link back to the talent-pool record. The column is nullable, so omitting it saved cleanly and failed silently: the application belonged to an email address rather than to a person, and the hire it became could not be traced back to the profile it came from. `HiredChronology` used to `return null` with no hires, taking the `chronology` node identity out of the DOM with it - so on an honest empty dataset the section could not be addressed by Owliver or the layout editor at all. It now renders an empty state inside the section it keeps. Nine new checks cover the above; `npm test` reports 1684/1691. SIX SSR PARITY CHECKS FAIL ON PURPOSE, and `scripts/__baseline__/README.md` documents each with verified tag counts. Five are the `DEMO_FILL` removal: the Hired History and Analytics baselines were captured while the padding was in effect and, because they render with queries disabled, the padding is all they contain. The sixth is this change to what Candidates says. Do not regenerate those baselines to clear them - two of the checks exist to prove the UI node tree migration added exactly two `<div>`s, and that proof needs the baseline to be pre-migration markup. Recapturing now would write post-migration markup into a file named `pre-migration` and the check would compare the current render against itself forever. The debt is held until the migration work lands, when both files are recaptured together. The seventh failure, the stale backend seed fixture, predates all of this. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HBG1wnuRfJKCstGB8Fekr8
This commit is contained in:
@@ -5,6 +5,60 @@ agent layer existed. `skill-check.mjs` asserts against it on every run.
|
||||
|
||||
Regenerating it is a deliberate act, and the reason belongs here.
|
||||
|
||||
## OUTSTANDING — the HTML baselines contain data that no longer exists
|
||||
|
||||
**Six checks fail on purpose. Do not regenerate these baselines to clear them.**
|
||||
|
||||
Hired History paints the same styled elements, in the same order
|
||||
Hired History shows the same words
|
||||
Hired History added only identity wrappers
|
||||
analytics: paints the same styled elements, in the same order
|
||||
analytics: shows the same words
|
||||
candidates: shows the same words
|
||||
|
||||
The first five are the `DEMO_FILL` removal, described immediately below. The
|
||||
sixth is the final-selection queue and has its own dated entry further down.
|
||||
|
||||
`hiringRecords.js` used to pad the hires list with five invented people
|
||||
(`DEMO_FILL`) so Hired History read as a history rather than as three rows. The
|
||||
padding applied to Analytics too, so "total hires" counted eight where the
|
||||
database held three. It has been removed: hires now come only from `staff`.
|
||||
|
||||
`hired-history.pre-migration.html` and `analytics.pre-migration.html` were
|
||||
captured **while the padding was in effect** — and because these baselines render
|
||||
with queries disabled, the padding is *all* they contain. The Hired History
|
||||
baseline is 31,453 characters holding all five invented names; the genuine empty
|
||||
state is 11,947 and holds none.
|
||||
|
||||
**Verified before leaving them failing**, so the drift is known rather than
|
||||
assumed. Tag counts, baseline → now:
|
||||
|
||||
<td 40 -> 0 five table rows of people who were never hired
|
||||
<span 51 -> 13
|
||||
<div 78 -> 39
|
||||
<p 26 -> 7
|
||||
<svg 20 -> 8
|
||||
|
||||
Every difference is content that was fabricated. No styling, ordering or
|
||||
structural rule changed.
|
||||
|
||||
**Why they are not regenerated yet.** Two of them — `added only identity
|
||||
wrappers` and `carries node identity in the DOM` — exist to prove the UI node
|
||||
tree migration added exactly two `<div>`s and nothing else. That proof needs the
|
||||
baseline to be *pre*-migration markup. Recapturing now would write *post*-
|
||||
migration markup into a file named `pre-migration`, and the check would compare
|
||||
the current render against itself and pass forever without proving anything.
|
||||
|
||||
So the debt is held until the migration work lands, at which point both files
|
||||
are recaptured together and this section is replaced by a dated entry saying so.
|
||||
|
||||
**One related fix was made rather than deferred.** `HiredChronology` used to
|
||||
`return null` with no hires, which took the `chronology` node identity out of the
|
||||
DOM with it — so with an honest empty dataset the section could not be addressed
|
||||
by Owliver or the layout editor at all, and the page said nothing where it most
|
||||
needed to. It now renders an empty state inside the section, which the section
|
||||
keeps. `carries node identity in the DOM` passes again because of it.
|
||||
|
||||
## 2026-08-27 — the seed gained the three statuses nothing exercised
|
||||
|
||||
`application_status` has seven values. The fixture produced four: `applied`,
|
||||
@@ -63,3 +117,47 @@ with it. It now names the page's topics in a sentence.
|
||||
Every intent `kind` was unchanged. No routing moved, no skill matching changed.
|
||||
That is why this regeneration was safe: the diff was read first, and it was one
|
||||
cosmetic change on a path that only runs when no agent is configured at all.
|
||||
|
||||
## 2026-09-11 — Candidates became the final-selection queue
|
||||
|
||||
`candidates: shows the same words` now fails, and it is the only check this
|
||||
change breaks.
|
||||
|
||||
The page used to list every application the org had ever taken — all seven
|
||||
statuses at once — which made it a second Talent Pool rather than the queue of
|
||||
hiring decisions waiting on a human. It now opens on final selection: interview
|
||||
completed, not hired, not rejected. That is a change to what the page *says*, so
|
||||
a check asserting the page says exactly what it said before was always going to
|
||||
fail. There is no version of this work that leaves those words alone.
|
||||
|
||||
**What drifted, verified before leaving it failing.** The rendered delta is the
|
||||
empty state and nothing else:
|
||||
|
||||
before "…0 of 0 candidates No candidates match your filters"
|
||||
now "…0 of 0 candidates Nobody is awaiting a decision
|
||||
Candidates arrive here once their interview is completed,
|
||||
and leave once they are hired or declined."
|
||||
|
||||
Title, subtitle and toolbar meta are byte-identical. The old copy was not merely
|
||||
different, it was untrue: with no filters applied there is nothing to clear, and
|
||||
"no candidates match your filters" describes a filter that was never set.
|
||||
|
||||
Tag and class counts, baseline → now:
|
||||
|
||||
class="…" 26 -> 27 one inserted: the description paragraph
|
||||
|
||||
One insertion, nothing changed and nothing dropped — which is why
|
||||
`candidates: paints the same styled elements, in the same order` and
|
||||
`candidates: carries node identity in the DOM` both still pass. Those two are
|
||||
the migration proof; only the words moved.
|
||||
|
||||
The new stage filter options cost nothing here. `FilterSelect` is a Radix
|
||||
`Select`, so its options live in a portal that is closed in static markup, and
|
||||
`SelectValue` renders empty on the server — the baseline contains neither the
|
||||
old option labels nor the new ones.
|
||||
|
||||
**Why it is not regenerated.** The same reason as the five above:
|
||||
`candidates.pre-migration.html` is load-bearing for the UI node tree proof, and
|
||||
recapturing it now would write post-migration markup into a file named
|
||||
`pre-migration`. It is held until the migration work lands and all of these are
|
||||
recaptured together.
|
||||
|
||||
Reference in New Issue
Block a user