Skip to content

feat: add governed employment separation review packet - #46

Draft
seonghobae wants to merge 74 commits into
developfrom
feat/governed-employment-separation-review
Draft

feat: add governed employment separation review packet#46
seonghobae wants to merge 74 commits into
developfrom
feat/governed-employment-separation-review

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Current governed contract

This Orgmetra-only lane provides a value-minimized, human-reviewed Employment separation packet. It binds tenant/Person/Employment/separation-process scope, reviewed evidence, controlled governance metadata, distinct requester/reviewer evidence, explicit evidence versioning, and system-recorded time without carrying HR payload values or granting mutation authority. Before consequential mutation, the authoritative Orgmetra host must re-resolve every packet reference within tenant_record_id, prove requester/reviewer resolve to distinct actor identities, re-establish Person→Employment and active Assignment/Job/Position scope, verify reviewed evidence and human authority, and persist immutable audit/outbox evidence atomically.

Current integrity boundary

The branch includes the completed test-first runtime/evidence repairs: exact built-in validation, bounded governance vocabulary, fail-closed timezone normalization, fixed UTC recorded evidence, actor-separation semantics, repr/privacy hardening, complete canonical field coverage, and a creation-bound process-local HMAC seal outside packet-writable slots. Low-level post-construction mutation or missing issuance evidence causes canonical export to fail closed.

The process-local seal is defense-in-depth only. It is not durable uniqueness/audit evidence, a portable signature, a rehydration credential, or cross-process issuance authority; authoritative persistence owns those contracts.

Current exact state

  • exact head: 96fe0b69e8e1bc3caa0fa206146a87c6e5027746
  • independently resolved live base: develop@9e3e4847510e1e612b48474ba42b177b8ed824df
  • state: open · Draft · mergeable
  • Employment Separation Review Quality run 32984491785: terminal CANCELLED on this exact head. The original attempt did not acquire a runner/checkout. A fresh supported retry attempt was made again and GitHub rejected it with HTTP 403 This workflow run cannot be retried; no product/test result exists.
  • Foundation CI 32984493884: terminal CANCELLED on this exact head.
  • Recovery Rehearsal Quality 32984413441: terminal CANCELLED on this exact head.
  • Exact-head check-run inventory is empty (0 check-runs), so Required OpenCode/Noema/Strix/SAST/Security/coverage evidence is absent. Absence/cancellation/pre-checkout infrastructure state is non-passing and is not evidence of either product failure or success.
  • Current submitted reviews are COMMENTED only; there is no qualifying independent current-head non-author approval or current CHANGES_REQUESTED. All current inline review threads are resolved.

No no-op/source commit is permitted merely to manufacture a fresh workflow attempt. This Draft lane therefore remains locally waiting until an authorized execution path can produce exact-current-head evidence or a genuine source/review defect independently requires a branch change.

Stack impact

Child #129 has now been adapted onto this exact parent: its live base is feat/governed-employment-separation-review@96fe0b69e8e1bc3caa0fa206146a87c6e5027746, and its current child head is 4c377a35055e126a5e2435ec36bd9ac1e593456e. The child remains Draft and dependency-blocked. Do not transfer #46 checks/reviews or any predecessor child evidence. Process #46 dependency-first; only after #46 integrates may #129 be retargeted/revalidated against the then-current protected develop.

Merge governance

This PR is not merge-ready and remains intentionally Draft. Do not mark it Ready or merge it without terminal exact-current-head local/central evidence and qualifying independent non-author approval under Orgmetra's stricter commercial acceptance policy.

Do not self-approve, use routine administrator bypass, weaken/simulate protection, create a no-op evidence commit, race another lifecycle writer, or reuse predecessor/cancelled/absent evidence.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

고용 분리 사전 검토를 위한 불변 EmploymentSeparationReviewPacket과 builder를 추가했다. 참조, 증거 digest, 인간 검토, 테넌트 범위를 fail-closed로 검증한다. 결정론적 직렬화, 무결성 테스트, 품질 게이트 및 관련 문서를 추가했다.

Changes

고용 분리 검토

Layer / File(s) Summary
거버넌스 계약과 문서
docs/adr/0020-governed-employment-separation-review.md, docs/doctoring/employment-separation-review-references.md, docs/traceability/employment-separation-review.md, packages/employment-separation-review/README.md, packages/employment-separation-review/CHANGELOG.md
테넌트 UUID와 UUIDv4 참조 계약, 민감정보 제외, 인간 승인, 범위 재검증 및 실행 경계를 정의했다.
패킷 구현과 공개 API
packages/employment-separation-review/src/orgmetra_employment_separation_review/packet.py, packages/employment-separation-review/src/orgmetra_employment_separation_review/__init__.py
불변 패킷과 builder를 추가했다. 입력을 검증하고 UTC timestamp, canonical JSON 및 SHA-256 digest를 제공한다.
계약 및 무결성 검증
packages/employment-separation-review/tests/test_packet.py, packages/employment-separation-review/tests/test_evidence_version.py, packages/employment-separation-review/tests/test_tenant_scope_resolution.py, packages/employment-separation-review/tests/test_string_runtime_evidence_integrity.py, packages/employment-separation-review/tests/test_temporal_evidence_integrity.py, packages/employment-separation-review/tests/test_tenant_uuid_privacy.py
참조 형식, 증거 버전, 시간 무결성, UUIDv7 테넌트 식별자, 센티넬 거부, 행위자 분리, 거버넌스 상태 및 문자열 위조 방어를 검증한다.
패키지 품질 게이트
packages/employment-separation-review/pyproject.toml, .github/workflows/employment-separation-review-quality.yml
Python 환경과 해시 고정 테스트 도구체인을 설정한다. 컴파일, pytest, 100% 브랜치 커버리지 및 작업 트리 상태를 검사한다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to 595c1

The packet still needs to ensure requester and reviewer references resolve to distinct identities before any consequential employment change, otherwise separation-of-duties controls could be bypassed. The README also describes tenant_record_id as UUIDv4 even though valid tenant identifiers may use UUIDv7, which could cause integration rejection. Keep unmerged until the identity check is enforced or explicitly accepted.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant ReviewBuilder
  participant ReviewPacket
  participant QualityWorkflow
  Caller->>ReviewBuilder: 고용 분리 검토 입력 전달
  ReviewBuilder->>ReviewPacket: 검증된 패킷 생성
  ReviewPacket-->>Caller: canonical JSON 및 SHA-256 digest 제공
  QualityWorkflow->>ReviewPacket: pytest 및 커버리지 실행
  ReviewPacket-->>QualityWorkflow: 검증 결과 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 고용 분리 검토 패킷을 추가하는 PR의 주요 변경 사항을 간결하고 정확하게 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/governed-employment-separation-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.

@seonghobae
seonghobae marked this pull request as ready for review August 19, 2026 01:58

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please independently review exact current head aee6350396d910d8f69b82c194fa54f4ae917de4 against protected develop f815feedcb0bac264d9814b2932338c512276110. Re-read the current diff and verify the employment-separation scope-resolution, value-minimization, human-only authority, evidence-version, canonical-digest and tenant-scoped re-resolution contracts. Exact-head Employment Separation Review Quality 32203465477, Foundation CI 32203465532, Security Scan 32203465482, and SAST Semgrep 32203465451 are terminal GREEN; there are no current review threads. If this unchanged head meets the repository standard, submit a qualifying independent APPROVE review; otherwise leave only exact, reproducible source-backed findings. Do not modify the branch, reuse predecessor-head evidence, weaken gates, or merge.

coderabbitai[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 19, 2026 02:03
@seonghobae
seonghobae marked this pull request as draft August 23, 2026 08:24
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 23, 2026 15:21
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as ready for review August 23, 2026 16:20
_validate_digest now enforces the exact built-in str contract the rest
of the packet boundary uses, closing the last isinstance-based gap; a
regression rejects a hostile digest subclass whose forged equality would
otherwise pass pattern matching. Suite stays at 100% statement+branch
coverage (107 tests). Addresses Devin review observation on PR #46.
devin-ai-integration[bot]

This comment was marked as resolved.

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 2 new potential issues.

Open in Devin Review

@seonghobae
seonghobae marked this pull request as draft August 26, 2026 15:13

@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

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