feat(core): persist bitemporal position reporting relationships - #106
Draft
seonghobae wants to merge 32 commits into
Draft
feat(core): persist bitemporal position reporting relationships#106seonghobae wants to merge 32 commits into
seonghobae wants to merge 32 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
marked this pull request as ready for review
August 25, 2026 23:30
seonghobae
marked this pull request as draft
August 26, 2026 18:05
This was referenced Aug 27, 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 gap
PR #94 defines governed Position→Position solid-line reporting snapshots but intentionally leaves durable persistence/mutation out of scope. This stacked Orgmetra-only lane adds normalized bitemporal persistence without deriving supervision from Person, Assignment, or organization-unit parentage.
Governed persistence contract
position_reporting_relationship_recordowns stable(tenant, subordinate Position, solid_line)identity andposition_reporting_relationship_versionowns manager Position plus effective/business time and PostgreSQL-owned system-recorded time. Persisted versions require same-tenant Position references, distinct human reviewer/applying actor, immutable review/application audit+outbox correlation, staffable PositionVersion coverage for both endpoints across the full effective interval, cycle-free graph state, immutable history/TRUNCATE resistance, and FORCE RLS. Person/Assignment/worker identity, compensation, ratings, assessment output, and free-form HR text are absent. RLS is defense in depth and does not replace purpose-bound application authorization.Repair sequence
78e092353be310f2bcefd30c1f7439b5ed1b235eestablished database-owned recorded time, one durable solid-line anchor per subordinate, same-tenant scope, self-report/cycle rejection, immutable history, audited human-reviewed application, and FORCE-RLS acceptance criteria.209259120d10b1cd18ab1e6184297f5af4730ffcadded the normalized relations and guards.2e421d8927516dd4b67e469c25ef9cf12107ca34made self-report/cycle regressions transaction-independent.566b74570e479735bbc2fedae7c6b56eb35ff3d9,fc1fb92ad208abdc895b1f94a8d637531e126d2b,affa260b1e94e0040fdfcc59f7bcdad5117bd9a4, andcfef3e27258104b2de448580777271e8ac7d16bf: the audit event'sorgmetraevidencemust equal the reviewed-evidence digest and stored application evidence must equal the immutable audit envelope digest exactly.69923053bb8f39fbe9ea876c33443c38b5ef4b63demonstrated that concurrent opposite edges need serialization;df13397ded4dfa6b605b7ded7cfb7e4468d3f0fcadded a transaction-scoped tenant graph advisory lock before graph reads.8f0a874761bcf1f84e7d0544fabf9394178773bashowed persistence accepted Position anchors with no staffable PositionVersion coverage. Root repairfacfff9d91243fe06639d60a978cb5072cfec64faddedposition_reporting_has_staffable_coverage(...), using PostgreSQL 16 multirange containment so same-tenantactive/openPositionVersion ranges must cover the relationship's entire effective interval.61611908b49a5ff74f2b7f10a2883a2572070b54added active PositionVersion fixtures for the X/Y race endpoints. Exact-head Position Reporting Persistence Quality run32688382859, job97317512146, completed GREEN and proved exact checkout, deterministic provenance, primary persistence regressions, immutable review binding, two-session cycle prevention, and a clean checkout.2af25408d95ac9bb362f318d218af507c0861f8badded a valid immutable audit/outbox event whose purpose/actor/evidence/subject/result/time all matched the requested mutation but whose governedorgmetrareasonwasunrelated_change. The RED-head hosted run32692438893was cancelled after the branch advanced and is not claimed as terminal RED evidence.ef8c7776b2520e6839c14da8122aacfe3f6ad1e4now requiresorgmetrareason = approved_reporting_line_changein the authoritative insert guard. ADR 0106 and traceability were aligned in8ede14cc7430d83955c38c867d1521989a557ea7and alignment headc35ad114edbce7a4ebafcea793748493f1346351.Exact-current-head evidence
Current exact head:
a367b4ea09f6abb4b6b8523c1e7726ee11bfc483.Fresh live base:
3f67182bb3065f2fc8fd974bfdd75a390d8a8fdc(PR #94 stack base).GitHub reports the PR open, draft, mergeable
MERGEABLE, merge stateCLEAN, review decisionNONE. The latest named check run on this exact head is terminal success or skipped. Current exact-head review state is 0 unresolved thread(s), with no APPROVED review record. Any predecessor-head run IDs and GREEN claims elsewhere in this body are historical and do not transfer.Stack and merge governance
This PR is intentionally stacked on #94. #94 must integrate first; its checks/reviews do not transfer. After #94 integrates, retarget #106 to fresh
develop, reconcile migration/document ordering, refetch exact head/base/rules/reviews/threads, and rerun all applicable Foundation/SAST/Security/Recovery/product evidence on the resulting head before review readiness.PR #95 remains the separate Orgmetra owner for the pre-mutation review packet; this branch consumes only reviewed-evidence digest plus immutable application audit correlation and does not rewrite #95. No dedicated-writer dependency repository or cross-service application table is modified.