Repository navigation
AIV-P2-012: record decisions as the authorised hiring owner; stages update through the outbox - #641
Open
ALFRED-LUCIFER wants to merge 34 commits into
Open
ALFRED-LUCIFER wants to merge 34 commits into
ALFRED-LUCIFER wants to merge 34 commits into
Conversation
submitScorecard completes the interview, keeps the draft (rebuilt on the
questions the page shows) as the submitted scorecard with its
recommendation, writes InterviewCompleted.v1, records each rated note as
interview_note evidence ("Interviewer's scorecard") and applies the
previewed ratings through the assessment's audited applyScoreChange, whose
audit entries are the last statements, in one transaction. A competency
not assessed in this round has no rating and stays a gap. A second submit
or a double click is "Already submitted"; a failure rolls everything back
and the saved draft stays.
The scorecard page saves, then submits with the preview the person saw,
says the outcome and links to the ranking; a rating needs a note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Copy without semicolons ("Your ratings are saved. Try again."), and a
submit help line that says only what is true now.
- A note is at most 1,000 characters (the most the assessment logs as a
reason), with its count under the field.
- The confirmation is the shared SuccessBanner (ok tone, tick, status)
with "See the ranking" inline, as the artboard's ok note.
- Partly shown records no evidence: the preview shows it changing nothing.
- The submit reuses the meeting summary's `decisions` wiring plus
`suggestedQuestions`, and both end in one `recordAndApply` helper.
- Every refusal says why; Submit waits, disabled with a reason, for the
preview of the ratings, stays disabled once submitted, and a save
refused as closed reads "Already submitted".
- One reader for the questions the page shows, for the page and submit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into feat/AIV-P2-011-pack-recommendation
…n per pack member A new AI task, decisions.summariseMember@1, writes each pack member's card text from the snapshot they joined with: strengths citing inspected work, risks citing the facts or the claim, the Round 1 finding citing the interview notes, and Credalent's recommendation (advance or hold, never reject). The worker writes it once per member after PackReady.v1 or the new PackMembersAdded.v1 (decisions.member_summary, RLS forced, append-only for the app role), so no model is called inside the pack page or the preview's request: this replaces #636's live explainRanking call and its ingress-timeout shortcut. A rejected answer (a citation outside the snapshot, off the schema) or no model stores "Summary unavailable", shown with the assessment's own strengths. The pack page gains "What the role needs", "Competencies and weights", the cited card text with links to each evidence item, "Preparing summary", the empty pack and the shared-pack footer; the preview shows the same cited text; the job header's Decision stage reads "Shortlist ready" while an undecided pack exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A first Partly shown is not in the audit log: the comments, test names, README and copy now say the note is kept on the scorecard and logged only with a change it makes; the "every change is logged" test rates Cost and reliability Partly shown with a note (the ticket's Background) and finds one entry. - "Submitted and logged" only where something was logged. - A reopened submitted scorecard shows only the ranking link; a save refused because the interview closed says submitted or cancelled. - The submit rebuilds on the questions the page shows only when the latest assessment is on the interview's rubric version, as the page. - shortcut: an older dev draft with a note over 1,000 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker's summary job, wired as the worker wires it with the fake model: written once per member and per message (redelivery and a new message call no model), Arjun's answer citing a source outside his snapshot stored unavailable, Sara's facts read from the snapshot she joined with, a later member summarised alone after PackMembersAdded.v1, no stage, decision, notification, other outbox or audit entry written, the job's hiring owner reading the summaries and another job's owner, an interviewer and another workspace not, RLS alone on member_summary and inbox, and the app role refused any change or delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into feat/AIV-P2-011-pack-recommendation
…source - shownQuestions and the suggestedQuestions port are tested: no question unless the latest assessment is on the interview's rubric version. - saveScorecardDraft throws scorecard_submitted for a completed interview and scorecard_closed only for a cancelled one, so the web action maps the codes directly instead of reading the interview again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…R-006 amendment The pack spec runs the worker's summary job itself with the fake model and checks, by keyboard and with axe in light and dark: "Preparing summary" with the scores shown, the role and its weights, Sara's cited strengths, risks, Round 1 line and "Credalent's recommendation: advance, and probe cost and reliability", each source linked to its item on her profile, Arjun's rejected answer shown as "Summary unavailable" with the assessment's own strengths, no decision option chosen, "Shortlist ready" on the Decision stage, the preview's cited text, and 404 for another workspace's member. The decisions README, the modules table and ADR-006 (point 6) record the task, its checks in code and its live runs: 3 of 3 for decisions.summariseMember, and all 15 judge golden cases in 3 of 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into feat/AIV-P2-011-pack-recommendation
…es their stages from DecisionsRecorded.v1 Decision controls and Record the decision on the pack page with the shared preview, the recordDecisions server action (403 for anyone but the named hiring owner), mayDecide on the pack view, readDecisionsAsSystem, intake stages round2_shortlist and not_advanced, intake.inbox (RLS forced), and the worker's idempotent stage consumer, audited as the hiring owner's. Nothing contacts a candidate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion' into feat/AIV-P2-012-record-decisions
… decision stages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion' into feat/AIV-P2-012-record-decisions
…y test; word the stage rule for this layer tenancy.test.ts checks every workspace-owned table for a cross-workspace leak and stopped at decisions.member_summary and decisions.inbox, which nothing seeded (AGENTS.md 3.4): each workspace now gets a member's summary and a handled summary message, as the worker writes them. The decisions README and the pack page's header now say what is true for this layer: the pack summary moves no stage; recorded decisions do, AIV-P2-012. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…for decisions, stage wording) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its excerpt states Review blocker: @1 asked what an excerpt "says the candidate built, ran or measured", and its live answer for Arjun Menon called a service design and on-call runbook a reader he built and ran; the judge passed it in 5 of 5 runs under the generic rubric. @2 asks what the excerpt states, in its words, with no other activity, role, scale or result and no adjective of the model's own, and no longer names the words the eval checks for. Arjun's rubric now names what the KYC excerpt does and does not state, and the invented answer is pinned as a judge case that must fail (5 of 5 live). The three cases are re-recorded live under @2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r@2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chosenOrDecided: someone on the Round 2 shortlist or not advanced is skipped like someone already chosen, in intake and in the ranking's preview, which says why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aims labelled, the joined snapshot read - The recommendation's action is decided from the snapshot (advance at 50% or more of the weight met, otherwise hold), whatever the model chose; ADR-006 states the threshold. - A model that stays unavailable (timeouts, an open circuit) is no answer: nothing is stored and the pack is asked again 15 minutes later; only answers a redelivery cannot change are stored "Summary unavailable". The handler's classification and its rescheduled PackReady.v1 are unit-tested with a throwing model. - Each statement keeps the citation contract's claim flag and each CV quote is stored as a claim, shown under the shared Claim tag, never highlighted as cited evidence. - "Summary unavailable" shows the levels of the snapshot the member joined with, read by its id after getPack has authorised the job, instead of the latest result when it happens to match. - "What the job needs" (never "role" for a job), neutral "None stated in this summary." for an empty section, the deviations for model wording and the Round 1 score change, the need bars' "names no source" shortcut, the transaction-length shortcut, a required shortlistReady, and the unused preview key removed. - A hiring owner following a card's source reaches the profile's evidence, never a raw file or contact detail (Playwright). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd one DecisionsRecorded.v1 proved recordDecisions returns when the decisions were recorded, so the confirmation and the read-only choices show at once, before the page is read again. The section is the shared Card; the remaining artboard differences are listed with their reasons. The record is proved to write exactly one DecisionsRecorded.v1 and nothing that could reach a candidate. Error text in the error tone; names computed once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # apps/web/src/features/decision-pack/services/loadPack.ts # modules/decisions/src/composition.ts
Owner
Author
|
Re-review nits: (2) the heading level is now listed in the deviations. (1) the README line for |
…, CI flakes fixed at their cause - AiUnavailable carries a typed `transient` flag (timeout, retryable status, open circuit, budget store). The pack summary job reschedules only those, carries on with the remaining members and asks again once at the end, for up to 6 hours after a member joined; a 4xx (Azure's content filter), an answer over the token cap, no AI service, or an outage past the window stores the member "Summary unavailable". - @3: a strength naming a competency must cite the facts line naming it, checked in code (`competency_uncited`); the judge passed @2's uncited names in 3 of 3 runs even with Huda's rubric naming the rule. The focus is a noun phrase, and the number rule names a counting word. All three cases re-recorded live, each with a live verdict; Huda's rubric names what her excerpts state. evals/config.ts records the judge's miss as a shortcut. - CI run 45877523565: settings.spec saved before the form hydrated (a native submit the form never saw), so it now saves again until the form answers; score-preview's seven-scenario test passed 30 s on the runner with every navigation about 2 s, so it gets a 90 s budget; the ranking's first render after sign-in took over 5 s there, so its title gets 15 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…AsSystem, ADR-006 for @3 and transient retries - The card reads "advance, and look into <focus> next", with fixtures holding the noun phrase the model now gives. - The statement-level claim flag, never rendered, is dropped; each citation keeps its own (a CV quote under the Claim tag). - readSnapshot is readSnapshotAsSystem; the pack page header says "What the job needs", lists the Claim tag and that claims are never highlighted, and names the code-decided action and the focus wording as deviations. - The hiring owner's profile check names where the file-link rule is proven (loadProfile.test.ts: a file-backed item, a recruiter's link as the positive control; seesFiles forced true made it fail). - ADR-006 records @3, the transient-only retry and its 6-hour window, the judge's misses, ADVANCE_SHARE's file and this round's live runs (task 3 of 3, judge golden cases 3 of 3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r@3, transient outages) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # apps/web/src/features/decision-pack/components/DecisionPack.test.tsx # apps/web/src/features/decision-pack/components/DecisionPack.tsx # modules/decisions/src/composition.ts
…xcerpt first, the retry window from joining
- competency_uncited matched names as substrings, so a short name ("AI", "Go") inside a word ("maintains",
"algorithm") rejected every honest strength; names now match as whole phrases, in the text and in the quote.
- A strength's first citation must be the excerpt it is about, checked in code (it was prompt-only).
- The outage window is tested from a member's addedAt (13:00, now 14:00, pack prepared 08:00: rescheduled).
- settings.spec: the form is server-rendered, so a field typed into before hydration loses its value to the loaded
state; each edit-and-save step after a load now retries until the form answers with the edited value.
- The prompt file's comment reads "look into <focus> next".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ited, work cited first) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f competency names tested
- settings.spec: "Use default" shows only while the value differs from the default, so the restore step clicks it
only when it is there; the two save steps wait the default time for "Settings saved" and the value (only the
out-of-range check, which never reaches the server, keeps the quick retry).
- decisions.summariseMember's competency check is tested for a lower-case name and a name with regex characters
("C++"), with their mutation checks; its docstring says a strength's first citation is inspected work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… eval tests) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ALFRED-LUCIFER
changed the base branch from
feat/AIV-P2-011-pack-recommendation
to
main
November 26, 2026 19:51
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 #126 · AIV-P2-012. It also delivers the
DecisionsRecorded.v1stage-update consumer, which #123 left to this ticket.Stack: main ← #640 (AIV-P2-011) ← this PR. The base is #640's branch until it merges.
What changed
The authorised hiring owner records a decision for each pack member: "Advance to Round 2", "Hold" or "Do not advance". Stages update through the outbox. No candidate is contacted (AGENTS.md 1.5).
Decisions module:
getPackreturnsmayDecide.readDecisionsAsSystem(tx, workspaceId, packId)in the composition, for the worker.DECISIONSandNOTE_MAX.recordDecisionsalready existed: audit last, strict event, only the named hiring owner may record.Intake module:
round2_shortlistandnot_advanced.stageAfter: advance moves to Round 2 shortlist, do not advance to Not advanced, hold keeps the current stage.findForPersonAndJobandapplyDecisions.createDecisionStageHandler({ event, decisionsOf, audit }):intake.inbox;application.stage_changed, with the hiring owner as actor and their reason, after the moves.Worker: relays
DecisionsRecorded.v1to theassessmentqueue and registers the handler. Ashortcut:records moving both to adecisionsqueue later, which needs an infra apply (owner).Migrations (intake):
0006_uneven_jack_flag.sql:intake.inboxwith its tenant policy, and the two stages added toapplication_stage_check.0007_force_rls_inbox.sql: forces row-level security onintake.inbox.Web:
recordDecisionsserver action: zod input.ForbiddenErrorgives 403; a pack the member cannot see gives 404. Logs carry ids only.useRecordDecisionsControllerhook andRecordDecisions.tsx.loadPackreturns each member's decision,mayDecideanddecided. New en.json keys and stage labels. Module READMEs anddocs/02-architecture/modules.mdupdated.Deviations from the artboard and the 22 Nov design update
h3(text-section, 12 px gap), not the artboard'sh2(14 px gap), because the pack title is the page'sh2.How verified
record-decisions.spec.ts(keyboard);PackClient.test.tsx; integrationrecord-decisions.test.ts(3 decisions audited with hiring owner and time; stages moved once even when delivered again)notifications.messageand outbox counts unchanged)PackClient.test.tsx; Playwrightnot_advanced; can be added to a new pack)recordDecisions.test.ts;PackClient.test.tsx(read-only); Playwright (recruiter read-only, ungranted hiring owner 403)PackClient.test.tsx,loadPack.test.ts, Playwrightdecisions.test.ts,application.test.tsandpacks.test.tsformayDecide.intake.inboxin the integration test and the tenancy table check.mayDecidecheck removed;intake.outbox;intake.inbox;record-decisions,decisions,intake,choose-for-interview,workerandmigrations-and-rlspass.record-decisionsandpack-from-ranking: 19/19.next buildpasses.tenancy.test.ts: passes, now that AIV-P2-011: show the decision pack with cited strengths, risks and Credalent's recommendation #640 seeds its decisions tables.Not done / risk
Review fixes (8b8290a, c82480a; merges e11b4b5 and 3a2aeb0 of #640)
chosenOrDecided(stage)in the intake domain coversinterview,round2_shortlistandnot_advanced.chooseForInterviewskips all three with a reason ("On the Round 2 shortlist / Not advanced by the hiring owner's decision, so not chosen again"), and the ranking preview counts them.applications.test.tsandRanking.test.tsxfailed.DecisionsRecorded.v1indecisions.outbox, and nothing innotifications.*. Mutation check: also enqueueEmailQueued.v1→ the test failed.recordDecisionsreturns{ decidedAt }; the choices go read-only and "Record decisions" hides immediately. Mutation-checked.next buildpasses.🤖 Generated with Claude Code