Repository navigation
AIV-P1-047: compare the candidates ticked on the ranking side by side, with cited trade-offs - #643
Open
ALFRED-LUCIFER wants to merge 2 commits into
Open
ALFRED-LUCIFER wants to merge 2 commits into
ALFRED-LUCIFER wants to merge 2 commits into
Conversation
…, with cited trade-offs The comparison page at /app/jobs/[jobId]/compare?ids=..., from the Compare artboard: the approved rubric's competencies by candidate (strength, verdict against the job's need, provenance, the cited words), headed by each candidate's backed score and "up to N if claims hold". Owner decision 26 Nov 2026: any number the recruiter ticks, not three, so a comparison holds 2 to 10 candidates and the ranking's Compare is no longer behind a flag. "The trade-offs" is a new AI task, assessment.compareTradeoffs@1, asked for on demand. What compares candidates is written from the snapshots and only picked by the model through a quote (keptTradeoffs shows the line as written): the live model reworded copied lines. A statement about cited work links to that item on the profile. An answer crossing candidates' evidence, leaving one out or leaving nothing for one reads "unavailable". Also: "Open comparison" on the decision pack page; listText no longer writes ", and X" for one name holding "and"; the e2e seed gives Arjun Menon and Layla Haddad a checked competency; ranking-selection.spec runs again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s its candidate
Code review of the first commit found that a model-written sentence about a piece of work could still carry a
comparison or advice, and that a candidate whose statements were all about work showed without their name.
- The model now writes no sentence. It picks one to three statements per candidate by citing them, and
keptTradeoffs shows each pick as it stands in its source: the one facts line that holds the quote, or the cited
excerpt whole (a part of an excerpt could change what it says). The checks on model prose are gone with the prose.
- A facts quote must pick exactly one line. An excerpt in which detectUnusualContent finds text aimed at an AI is
never offered as a pick.
- Every statement names its candidate ("<name> is the only one compared with ...", "Cited work of <name>: ...").
- The closing line no longer calls a gap small ("Claims still to check could change this order.") and carries its
basis, Observed.
- Tests for "Open comparison" on the decision pack page and for listText with one name holding "and"; the README
row has its status cell. Golden cases re-recorded from the dev deployment's live answers.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Ticket
Closes #111 · AIV-P1-047
Stack: none
What changed
The comparison page at
/app/jobs/[jobId]/compare?ids=…, built from the Compare artboard, and the ranking's "Compare" action that opens it.Owner decision, 26 Nov 2026: not three candidates, any number the recruiter ticks. A comparison holds 2 to 10 candidates (
MAX_COMPAREDin@credalent/assessment, held equal to the browser'sMAX_COMPAREby a test). Ten bounds the page's reads and the trade-offs prompt; it is one constant. The ranking's button text and journeys.md are updated to match.features/ranking): "Compare" is no longer behind thecompareflag. It is enabled with 2 to 10 rows ticked and opens the comparison with the ticked people in rank order; outside that the disabled button says why ("Choose 2 or more to compare", "Compare up to 10 at a time").features/compare, routejobs/(compare)/[jobId]/compare): breadcrumb, "Compare candidates", "Senior AI Engineer · rubric v2. The same 6 competencies…", "Change selection" (back to the ranking with the same people ticked) and "Open decision pack". One row per competency of the approved rubric, heaviest first ("Weight 25% · job needs 4 of 5"); one column per candidate headed by name, backed score and "up to N if claims hold" (ScoreWithUncertainty). Each cell shows strength (StrengthMeter), the verdict ("Above the need · 5 against 2"), provenance (ProvenanceTag) and the first cited item's own words. The competency column stays in view while a wide comparison scrolls sideways.assessment.compareTradeoffs@1, use casecompareTradeoffsin@credalent/assessment), shown when a person clicks "Show the trade-offs": one model call for the compared candidates.keptTradeoffsshows each pick as it stands in its source: the one facts line that holds the quote, or the excerpt whole.detectUnusualContentfinds text aimed at an AI.listText(assessmentdomain/explain.ts) wrote ", and Cost and reliability" for a single competency whose name holds "and"; one name is now written as it is. It also affected a ranking explanation with one such claim.ranking-selection.spec.tsis no longerfixme(it waited for this ticket); its box ticks use the repo's retry-until-hydrated pattern.Deviations from the Compare artboard and the ticket's wording (also at the top of
Compare.tsxandTradeoffs.tsx)shortcut:incompareTradeoffs).How verified
Locally, on the final commit unless noted:
pnpm lint,pnpm typecheck,pnpm format:check;web1095 tests,@credalent/assessment153,@credalent/ai432,@credalent/i18n47;pnpm ai:eval(recorded) all tasks pass. On the first commit:tests/architecture75,tests/integration975 on PostgreSQL,pnpm --filter web build.tests/e2e/src/compare.spec.ts"Scenario: Three candidates" (68 "up to 84 if claims hold", 64/76, 61/82; the Arabic row's "Strong · Above the need · 5 against 2 · Independently corroborated"),Compare.test.tsx,loadCompare.test.ts.compare.spec.ts"Trade-offs cite evidence, asked for by keyboard";modules/assessment/src/application/tradeoffs.test.ts; eval golden setpackages/ai/evals/assessment.compareTradeoffs/(4 cases: the demo trio, a pair where one candidate rests on claims only, an injection case, five candidates), recorded from the dev deployment's live answers: citation validity 100%, contract 100%, field match 100%, safety 100%, judge 100%.compare.spec.ts"One candidate, and candidates from another job",loadCompare.test.ts,Compare.test.tsx.compare.spec.ts"Trade-offs unavailable" (the fake model answers 503),tradeoffs.test.ts.compare.test.ts,Compare.test.tsx.compare,ranking-selection,pack-from-ranking,candidate-profile,add-applicants,duplicates,interviews,suggested-questions: 72 passed. axe in light and dark with the trade-offs shown; keyboard path on the ranking and on "Show the trade-offs". A light and a dark screenshot of the page were compared with the artboard by eye.code-revieweragent on the first commit: 2 blockers, 5 should-fix, 6 nits. All fixed in the second commit except one answered: "use another job's real applicant in the other-job test". The only check is membership of this job's applicant list, so another job's applicant and an unknown id take the same path; the tests now say so.Not done / follow-up ticket
shortcut:; needs a table whose rows a candidate's deletion reaches.Definition of Done (AGENTS.md §5)
code-revieweragent findings resolved (AGENTS.md 7.0); Copilot's as they arrivepnpm lint,pnpm typecheck, affected tests andpnpm buildpass locally; CI green// SAFETY: mutation check:comment (name the tests):eval.test.ts"Trade-offs between compared candidates" (crossed citations, a candidate left out, a quote across or between facts lines, the quote shown in place of the line or the excerpt);tradeoffs.test.ts(a candidate named twice, the model's own words, an excerpt aimed at an AI, missing identifiers, authorisation);compare.test.tsandCompare.test.tsx(the order line, claim-only strength, the name on a statement about work);loadCompare.test.ts(not on this job, the job check);navigation.test.ts(the page's 403)writeTradeoffsandloadComparerun ininActiveWorkspace;candidate.viewis checked per candidate on the job; ids validated with zodpackages/i18n, logical utilities🤖 Generated with Claude Code