Skip to content

feat(core): add governed Organization hierarchy-change review - #96

Draft
seonghobae wants to merge 67 commits into
developfrom
feat/organization-hierarchy-change-review
Draft

feat(core): add governed Organization hierarchy-change review#96
seonghobae wants to merge 67 commits into
developfrom
feat/organization-hierarchy-change-review

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible scope

This Orgmetra-only lane adds a value-minimized pre-mutation review boundary for Organization Unit parent changes. The packet binds tenant/Organization Unit/current-parent/proposed-parent scope, business effective_on, review-evidence recorded_at, reviewed snapshot digests, controlled reason, distinct requester/reviewer evidence and explicit evidence versioning. Root attach/detach uses None; self-parenting and no-op reparenting fail closed locally. Stale current-parent evidence, cycles, multiple visible parents, durable uniqueness and the actual hierarchy mutation remain authoritative HRIS responsibilities. The packet carries no Person PII, compensation, ratings or employment-decision authority.

recorded_at is invoking-boundary review evidence. The leaf API validates exact fixed-offset representation and rejects a future issuance value, but it does not prove which clock generated the timestamp. Issue #282 owns that provenance distinction; #119 must generate or attest authoritative system-recorded audit/outbox time at the mutation/persistence boundary after normal parent integration rather than promote packet recorded_at into transaction-time authority.

Live authority

No force-push, destructive rebase, self-approval, bypass, synthetic status, predecessor-check transfer or mutable-owner source copy is used.

Integrity and provenance repairs

Post-issuance representation/export integrity remains #279. f952154... exposed representation-preserving scalar substitution; 204695c... added export-time runtime-type validation; c8266fd... exposed export checked-versus-used rereads; a98066f... made runtime validation and canonicalization consume one captured export snapshot.

Issuance semantic checked-versus-used integrity remains #280. Regression 261a67d... demonstrates the predecessor gap; 08ff578... makes complete issuance validation, canonical creation bytes/digest and tenant-qualified live-reference key consume one identical captured snapshot.

Per-object issuance re-entry remains #281. 03fd2cb... requires manual reissuance to fail closed; 4fcf0c7... adds the identity-scoped issuance reservation; 6a8d5d8... adds deterministic concurrent re-entry coverage. Exact 85ba782... previously had Foundation/100% package coverage GREEN.

Timestamp provenance remains #282. ADR/README/TRACEABILITY/package CHANGELOG already distinguished caller-supplied review time from authoritative internal-clock time at a09d2eb..., but fresh review found two residual code-current naming defects. Ordinary-forward d1e57c2d14fc28309b51a3ddf7ec28d4a5726f02 changes _validate_issuance_timestamp(...)'s production docstring from “system-recorded evidence” to canonical review-evidence chronology; current f84dcb64b51dc492af938a4bdd0836354b1a4496 renames the future-time regression/module wording so the test no longer claims clock provenance. Runtime semantics and the future-time rejection assertion are unchanged. Historic fixed-offset values remain admissible if not future-dated; no arbitrary freshness window or caller-spoofable trusted-time token is introduced.

The in-process creation digest/live-reference registry and issuance reservation remain defense in depth only. They are not durable database uniqueness, distributed authorization, authoritative timestamp provenance, restart-stable identity, same-tenant bitemporal re-resolution, concurrency control or immutable audit/outbox authority.

Exact-head workflow and review evidence

The material terminology corrections advanced the head, so all a09d2eb... workflow results are predecessor evidence only. The old Strix run 34327470796 on a09d2eb... was cancelled as superseded after this new head advanced; its elapsed quick-scan state is not a vulnerability/provider verdict and is not transferred.

Fresh PR-triggered workflows on exact f84dcb... are currently nonterminal: Foundation 34338465752, Security 34338465711, SAST 34338465703, and CodeQL 34338465693 are newly queued at the latest read. Do not transfer predecessor Foundation/SAST/OpenCode/Noema GREEN or predecessor Security/CodeQL failure classifications to this head before the current jobs actually settle. Required-workflow admission for OpenCode/Noema/Strix/merge scheduler is likewise evaluated only on this exact head.

Fresh submitted-review enumeration on the predecessor material tree contained COMMENTED reviews only and no qualifying independent APPROVED; no approval is inferred after these new material commits. Historical review observations about process-local/GC-dependent live-reference uniqueness remain explicitly documented defense-in-depth limitations rather than durable database authority.

Keep this PR Draft until every required current-head workflow is terminal/admissible, no unresolved applicable review finding remains, and protected integration is permitted by the then-live central governance policy.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fe71c1e8-b896-45a6-b208-b277bc4e5852

📥 Commits

Reviewing files that changed from the base of the PR and between 311077a and 9d5d701.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • docs/traceability/organization-hierarchy-change-review.md
  • manifest.json
  • packages/organization-hierarchy-change-review/CHANGELOG.md
  • packages/organization-hierarchy-change-review/README.md
  • packages/organization-hierarchy-change-review/src/orgmetra_organization_hierarchy_change_review/review.py
  • packages/organization-hierarchy-change-review/tests/test_recorded_at_freshness.py
  • packages/organization-hierarchy-change-review/tests/test_review.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/organization-hierarchy-change-review/CHANGELOG.md
  • docs/traceability/organization-hierarchy-change-review.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

조직 계층 부모 변경을 위한 OrganizationHierarchyChangeReviewPacket 패키지를 추가했습니다. 입력 검증, 결정적 증거 직렬화, SHA-256 무결성, 계약 테스트, 거버넌스 문서 및 GitHub Actions 품질 게이트를 포함합니다.

Changes

조직 계층 변경 검토

Layer / File(s) Summary
패킷 계약 및 공개 API
packages/organization-hierarchy-change-review/pyproject.toml, packages/organization-hierarchy-change-review/src/..., packages/organization-hierarchy-change-review/README.md, packages/organization-hierarchy-change-review/CHANGELOG.md, CHANGELOG.md
패키지 설정과 OrganizationHierarchyChangeReviewPacket, build_organization_hierarchy_change_review_packet 공개 API를 추가했습니다. 패킷의 필드와 인간 검토 전용 상태를 문서화했습니다.
검증 및 증거 무결성
packages/organization-hierarchy-change-review/src/.../review.py
UUID, 부모 관계, 시간, 코드 및 다이제스트를 검증합니다. 결정적 JSON과 SHA-256 증거를 생성합니다. 사후 변조와 충돌하는 참조 재발행을 거부합니다.
실행 가능한 계약 검증
packages/organization-hierarchy-change-review/tests/*, docs/traceability/...
정상 입력, 루트 전환, 잘못된 입력, 행위자 분리, 시간 정규화, 미래 recorded_at, 변조 방지 및 권한 경계를 검증하고 요구사항과 테스트를 연결합니다.
거버넌스 및 추적성 문서
docs/adr/..., docs/doctoring/..., docs/traceability/..., packages/organization-hierarchy-change-review/README.md
패킷의 책임 범위, HRIS 재검증 경계, 개인정보 제한, 참고 기준 및 요구사항 추적성을 문서화했습니다.
패키지 빌드 및 품질 게이트
.github/workflows/organization-hierarchy-change-review-quality.yml
Python 3.14.7 환경에서 해시가 고정된 wheel을 빌드하고 설치합니다. pip check, 컴파일, 테스트 커버리지 및 깨끗한 작업 트리를 검사합니다.

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

Merge Risk: ⚪ Minimal · up to 9d5d7

This PR adds a non-authorizing review packet for Organization hierarchy changes without mutating hierarchy state. No actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant PacketBuilder
  participant ReviewPacket
  participant CanonicalEvidence
  Caller->>PacketBuilder: 계층 변경 정보와 recorded_at 전달
  PacketBuilder->>ReviewPacket: 입력 및 거버넌스 상태 검증
  ReviewPacket->>CanonicalEvidence: canonical JSON 생성
  CanonicalEvidence-->>ReviewPacket: SHA-256 증거 다이제스트 반환
  ReviewPacket-->>Caller: 검토 패킷 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 3 files. (5 skipped: 5…
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 제목은 governed Organization hierarchy-change review 기능 추가라는 주요 변경 사항을 정확하게 설명하며, 간결하고 구체적입니다.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/organization-hierarchy-change-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 draft August 23, 2026 08:02
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as ready for review August 23, 2026 08:21
devin-ai-integration[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant