feat: expose hire-to-employment People API - #18
Draft
cursor[bot] wants to merge 239 commits into
Draft
Conversation
This was referenced Aug 16, 2026
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.
Buyer-visible scope
This lane rebuilds the first post-hire customer-facing People API on the current protected Orgmetra contracts, rather than replaying the historical implementation that predated governed candidate-worker conversion, immutable audit/outbox persistence, and purpose-bound PII authorization.
Protected-base reconciliation
The current default/protected integration base is
developatd531ba0fbb0d1cb70dbaa6b5c6b0431e59cc4c22.The historical #18 tree carried a legacy tenant schema, mutable
audit_eventshape, pre-governance candidate-worker link, a competingpackages/orgmetra-domain, and duplicated Keyverse/purpose logic. Those artifacts are intentionally not replayed. The rebuilt branch preserves historical ancestry while its active diff stays on current canonical Orgmetra contracts.Implemented bounded slices
orgmetra_keyverse_adaptercontract and authorizes the exact opaqueperson_recordtarget before protected worker values are retrieved;PostgresPeopleReadPortis now the production read-side adapter: deployment injects the DB connection/pool boundary; the adapter enters an explicit read-only transaction, transaction-locally bindsorgmetra.tenant_record_id, uses parameterized fully-qualified SQL, and resolves canonicalcandidate_worker_conversion_record,person_record,person_name_record,employment_record, andemployment_record_versionusing current recorded-time truth plus the requested business date;LIMIT 1; missing workers returnNone, invalid direct requests fail before a connection is opened, and returned tenant/person identity is revalidated;.github/workflows/people-api-quality.ymlproves the exact candidate checkout, installs the reviewed SHA256-hashed test toolchain, enforces exact 100% owned statement and branch coverage, and proves a clean checkout;developintegration branch; the workflow was repaired accordingly;.github/workflows/foundation-ci.ymlnow also dispatches ondevelopwithout weakening any existing validation or PostgreSQL integrity contract;Deliberately not yet claimed
Keep this PR Draft. The tenant-bound production read adapter is complete, but the customer path is not: the HTTP route and atomic accepted-mutation + governed audit/outbox transaction are still outstanding on this canonical branch. The superseded persistence model must not be restored, and no direct cross-service application-table SQL is permitted.
Evidence and governance
Current exact head:
7d7a53d0a6643e558f545095d960a5e05862c4d1. Protected/default integration base:d531ba0fbb0d1cb70dbaa6b5c6b0431e59cc4c22.Exact-head People API Quality run
32038307062is terminal GREEN and includes the service's 100% owned statement/branch coverage gate and clean-checkout proof. Exact-head Foundation CI run32038307119is terminal GREEN, including Foundation validation and the PostgreSQL integrity matrix. Exact-head Security Scan, SAST Semgrep, Required OpenCode, Required Noema, PR Review Merge Scheduler, and Close Empty PR are also terminal GREEN.At this update, exact-head Required Strix run
32038305301and dynamic Code Quality are still in progress and therefore non-passing. There is no qualifying independent approval after the current last push; the only submitted review is historicalCOMMENTEDevidence and its sole thread is resolved/outdated. Predecessor evidence is not transferred.Remain Draft until the buyer path above is complete and every applicable exact-current-head gate is terminal GREEN. Any current-head failure is a repair trigger. Refetch live rules, reviews, threads, protected base, and exact-head evidence immediately before any ready/merge transition; never bypass protection or self-approve.