test(ontology): JobPosition identity is fail-closed on receipt results - #916
Merged
Conversation
Collaborator
Author
|
Independent adversarial review APPROVE on |
identity_from_receipt_result already extracts only canonical UUID ids.
Extend existing tests: extra title/phone/salary keys are ignored, the
serialized identity omits them, recruiting {title, department} is Err,
and missing/non-UUID org_unit_id fails closed. No new #[test].
jason931225
marked this pull request as ready for review
August 26, 2026 10:25
jason931225
force-pushed
the
lane/ontology-job-position-identity
branch
from
August 26, 2026 10:25
24f5f07 to
f6dbbc5
Compare
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.
Draft. Disjoint from UI/GATE/AUTH/inbox/#897–#910. Independent review before merge. Base
2f99f9ea.Candidate SHA:
24f5f07b40f1138c923c69d2a31bb222de6ec3faidentity_from_receipt_resultis fail-closed: missing or non-UUID canonical ids are refused. Extra recruiting/PII keys (title,phone,salary) on a receipt result are ignored; serializedJobPositionIdentitycontains onlyjob_position_id,org_unit_id,version. Recruiting posting{title, department}without canonical ids is Err. OrgEntitySummary remains refused.Lease:
backend/crates/ontology/rest/src/job_position.rsonly. No new#[test]. No/api/v1/job-positions. No OpenAPI.Tests
discovered 19, executed 19, passed 19.
#[test]attributes injob_position.rsremain 3.Filtered job_position tests: 3 passed, 16 filtered out.
merge-tree
0 vs
origin/main(2f99f9ea) and pairwise vs 897–910 (all CLEAN, no overlapping paths):897
c9d8c558e6a1, 898e390a25e4ab1, 899f861f7150bc8, 900b4ca34abb886, 901149445136642, 90211645e482753, 9035d30ddec3f0a, 904e5164a429e8b, 9050c2b572c52c2, 90665fa2123621d, 9076b8d2de89a12, 908053b96cda1e9, 90900ccfb2012da, 910af25cbca7835.Pre-mortem / blast radius
receipt_result_round_trips_canonical_ids.{title, department}as a position would fabricate identity. Detection:free_text_title_alone_is_not_a_job_position_identity.org_unit_idsucceeding would be fail-open. Detection: assertions in the round-trip test.Detection / rollback / stop
cargo test -p console-ontology-rest --libjob_position tests.main./api/v1/job-positionsexpansion; merge-tree conflict with 897–910; new#[test]function.Review
Independent adversarial review required before merge. Not merge/release.
HOLDs
/api/v1/job-positionsroute. Identity stays on ontology action receipt results./_uiHOLD unchanged.