Skip to content

feat: add governed candidate withdrawal evidence - #67

Open
seonghobae wants to merge 10 commits into
feat/normalized-candidate-applicationfrom
feat/governed-candidate-withdrawal
Open

feat: add governed candidate withdrawal evidence#67
seonghobae wants to merge 10 commits into
feat/normalized-candidate-applicationfrom
feat/governed-candidate-withdrawal

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible gap

PR #66 deliberately removes bare withdrawn from raw candidate-application stage persistence because that shape cannot prove candidate initiation. This stacked lane adds the missing governed candidate-withdrawal boundary without reintroducing a staff-controlled shadow rejection.

Implemented withdrawal contract

The branch adds separate tenant-qualified, append-only, FORCE-RLS candidate_withdrawal_record evidence rather than a raw pipeline stage. It binds candidate actor/identity-resolution provenance, withdrawal evidence version/digest, chronology, immutable audit/outbox correlation, one-withdrawal cardinality, and rejects staff-actor shadow rejection, evidence mismatch, duplicate withdrawal, destructive rewrite, and foreign-tenant visibility. candidate: syntax is correlation, not authentication; Keyverse remains read-only through the published identity contract.

Fresh dependency state

Dependency PR #66 exact head is f27136f5febea21fb9b3cc7f22d4b564484a52be on feat/normalized-candidate-application. Every applicable exact-current-head Orgmetra workflow is terminal GREEN: Candidate Application 32975075961, Foundation 32975075951, Recovery 32975076065, Job-Analysis API 32975076045, Selection Review 32975075811, Requisition Review 32975076032, SAST 32975076053, and Security 32975075769. #66 is open · non-draft · mergeable, but technical GREEN is not merge authorization because no qualifying independent non-author approval exists and the acquisition-grade control gap remains open in #89.

Fresh child state / active-writer boundary

During the current freshness pass, this child branch advanced independently to exact head 79d1f6233c3bc5d9c2b796f3eba00f69ba6051e9 (docs(adr): index active decision records and reseal foundation manifest). GitHub reports open · non-draft · currently non-mergeable. The recorded stack base is still old parent head 15a4bc98f983e0357acb5e373be3cbfb4e0b0072, so this descendant remains stale relative to #66's current head and parent checks/reviews cannot transfer.

Fresh exact-head Actions lookup for 79d1f6233c3bc5d9c2b796f3eba00f69ba6051e9 returns no workflow runs. Absent exact-current-head evidence is non-passing. Historical Candidate Withdrawal Quality 32480099494 on predecessor child head cf59b3001fa58e5a978099c2a5692a03f4849fdd is predecessor-only evidence and must not be promoted to the new child head.

Because another same-repository writer advanced the child branch during this run, this loop will not race that writer by changing branch refs, retargeting, or toggling Draft/Ready. The live non-draft flag is metadata only and is not integration or merge authority.

Stack / merge governance

Process #66 dependency-first. Do not restack merely to manufacture descendant evidence while #66 is still unintegrated. After #66 actually integrates, the owning writer must retarget/revalidate #67 against fresh develop, reconcile the new child ADR/provenance changes plus migration ordering, refetch exact head/base/rules/reviews/threads, and rerun every applicable global and withdrawal-lane gate without transferring parent/predecessor evidence.

Effective organization ruleset 18156473 is active on the default branch but currently requires only one approving review, dismisses stale reviews, does not require last-push approval, requires conversation resolution and central workflows, and permits routine OrganizationAdmin always bypass. Issue #89 owns the stricter acquisition-grade target of at least two qualifying independent non-author approvals, approval after last push, complete exact-head local/central GREEN evidence, resolved conversations, and no routine administrator bypass.

Do not self-approve, weaken a gate, use routine admin bypass, race another writer, transfer predecessor evidence, or mutate a dedicated-writer dependency.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d2faad26-d6f7-4870-a9a3-0e816253c2ad

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment on lines +108 to +123
IF audit_event_envelope ->> 'source' <> 'urn:orgmetra:talent_acquisition'
OR audit_event_envelope ->> 'type' <> 'orgmetra.candidate.application_withdrawn'
OR audit_event_envelope ->> 'subject'
<> 'candidate_withdrawal_record:' || NEW.candidate_withdrawal_record_id::text
OR audit_event_envelope ->> 'orgmetraactor' <> NEW.initiating_actor_reference
OR audit_event_envelope ->> 'orgmetrapurpose' <> 'candidate_withdrawal'
OR audit_event_envelope ->> 'orgmetrareason' <> 'candidate_requested'
OR audit_event_envelope ->> 'orgmetraevidence' <> NEW.withdrawal_evidence_reference
OR audit_event_envelope ? 'orgmetraconfirmation'
OR (audit_event_envelope #>> '{data,high_impact}')::boolean IS NOT FALSE
OR audit_event_envelope #>> '{data,result_code}' <> 'application_withdrawn'
OR audit_event_time <> NEW.withdrawn_at
OR audit_event_time > NEW.recorded_at THEN
RAISE EXCEPTION 'candidate withdrawal audit envelope does not bind exact candidate provenance'
USING ERRCODE = '23514';
END IF;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Digests and evidence version are not bound to the audit envelope

The insert trigger (0015_candidate_withdrawal_governance.sql) binds withdrawal_evidence_reference to the envelope's orgmetraevidence, but evidence_version, identity_resolution_digest, and withdrawal_evidence_digest are only shape-checked, never cross-checked against the audit event. The audit record therefore does not attest to those digest values. This reads as intentional but is a real gap in provenance coverage.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant