Skip to content

feat(workforce): add same-cutoff composition change evidence - #54

Draft
seonghobae wants to merge 63 commits into
developfrom
feat/workforce-composition-change
Draft

feat(workforce): add same-cutoff composition change evidence#54
seonghobae wants to merge 63 commits into
developfrom
feat/workforce-composition-change

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Current authority — 2026-09-06

Current exact head is 90e2cffdafb2ca385359068b53f5ca1dc437a5af. Live protected truth is develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f; this PR still carries the older base snapshot 9e3e4847510e1e612b48474ba42b177b8ed824df. GitHub currently reports it open · Draft · non-mergeable. Earlier non-draft · mergeable wording was stale lifecycle metadata and is not acceptance evidence.

The valid Workforce Intelligence delta remains retained: same-recorded-cutoff workforce-composition comparison with deterministic evidence, bitemporal tenant scope, employment/assignment/FTE/status aggregates, and exact 100% owned statement/branch coverage on its historical head. Do not Close or discard that delta merely because protected repository-quality ownership advanced independently.

Historical exact-head evidence

On unchanged feature head 90e2cff..., Workforce Intelligence Quality 33329979690 passed 232/232 HRIS-kernel tests; 876/876 statements and 360/360 branches = 100.00%. Recovery 33329979684 passed exact-head repository validation and real cross-cluster dump/restore. Foundation, Job-Analysis API, People API, Requisition Review, Selection Review, and SAST were also terminal GREEN on that old-base head. Existing inline review threads are resolved.

Those results remain useful predecessor evidence but do not transfer across the required protected-parent reconciliation.

The same historical head also had required control-plane failures that were not Orgmetra source verdicts: Security 33329979836 reached exact checkout but Dependency Review support failed on the central HTTP 403 boundary tracked by .github#810; OpenCode verifier 99307012940 lacked an authenticated formal verdict bound to this exact head, with owner path .github#624; Noema skipped substantive review because that primary verdict was absent; Strix 33329978855 materially reached the scanner but the contextual-orchestrator route rejected Strix's multi-tool request shape, leaving provider-unavailable evidence owned by .github#798. No qualifying independent non-author APPROVED review is current.

Required repair path

This is a protected-parent repair lane, not a merge candidate in its current form. Semantically adopt current develop@eb9757f... without force/destructive rebase, preserve #161's canonical Foundation/recovery ownership and all valid Workforce Intelligence code/tests/ADR/traceability, resolve real file/provenance conflicts, and regenerate deterministic manifest evidence from the final bytes. Any retired package-local workflow present in the old feature ancestry must remain retired; useful package-specific coverage or artifact contracts belong in the canonical Foundation owner path rather than being resurrected.

Only the reconciled successor may receive fresh current-head Foundation/PostgreSQL/recovery/security/OpenCode/Noema/Strix evidence and any then-required qualifying approval. Do not self-approve, use routine administrator bypass, weaken/simulate gates, transfer predecessor GREEN, manufacture reviewer identity, mutate a dedicated-writer dependency, force-push, or simply Close the valid workforce delta.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 0c4e3ad4-585b-489f-a1e2-6bc0fd0232eb

📥 Commits

Reviewing files that changed from the base of the PR and between 1fedd6c and d6233a7.

📒 Files selected for processing (2)
  • docs/adr/0011-bitemporal-workforce-composition.md
  • manifest.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • manifest.json
  • docs/adr/0011-bitemporal-workforce-composition.md

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


📝 Walkthrough

Walkthrough

동일한 known_at 기준으로 두 유효일의 workforce composition을 비교하는 스냅샷 검증과 canonical evidence 생성을 강화했습니다. 집계 무결성, 정확한 Decimal 산술, 테넌트·날짜·시간 검증, 상태별 델타, canonical JSON 및 SHA-256 digest를 지원합니다.

Changes

Workforce composition 변경 비교

Layer / File(s) Summary
스냅샷 무결성과 정확한 집계
packages/hris-kernel/src/orgmetra_hris_kernel/workforce.py, packages/hris-kernel/src/orgmetra_hris_kernel/assignment.py, packages/hris-kernel/tests/*
UTC 시간 좌표, 테넌트 식별자, 집계 관계, 상태 행 및 FTE 표현을 검증합니다. 할당 비율과 FTE 합계를 Decimal 컨텍스트와 무관하게 계산합니다. 생성 후 canonical export에서도 불변식을 재검증합니다.
변경 스냅샷 검증
packages/hris-kernel/src/orgmetra_hris_kernel/workforce_change.py, packages/hris-kernel/src/orgmetra_hris_kernel/__init__.py, packages/hris-kernel/tests/test_workforce_composition_change.py, packages/hris-kernel/tests/test_workforce_composition_change_evidence_types.py
동일 테넌트와 동일한 known_at에서 두 유효일을 비교합니다. endpoint 유형, 테넌트, 날짜 순서, 지식 기준시각 및 endpoint 무결성을 검증합니다. 집계 델타, canonical JSON 및 SHA-256 digest를 제공합니다.
계약 및 추적성 문서화
docs/adr/*, docs/traceability/*, docs/doctoring/*, packages/hris-kernel/README.md, packages/hris-kernel/CHANGELOG.md, CHANGELOG.md, manifest.json
비교 계약, 산술 규칙, 추적성, 참고문헌, 변경 기록 및 비해석 범위를 문서화했습니다. 매니페스트 무결성 메타데이터를 갱신했습니다.

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

Merge Risk: 🟡 Moderate · up to d6233

The change adds same-cutoff workforce composition evidence, but the current commit is not merge-ready because one check is failing and no approving review is recorded. Merge should wait for a passing current-head check and fresh approval.

Sequence Diagram(s)

sequenceDiagram
  participant 호출자
  participant build_workforce_composition_change_snapshot
  participant build_workforce_composition_snapshot
  participant WorkforceCompositionChangeSnapshot
  호출자->>build_workforce_composition_change_snapshot: 두 effective_on과 known_at 전달
  build_workforce_composition_change_snapshot->>build_workforce_composition_snapshot: 동일 cutoff으로 각 유효일 스냅샷 생성
  build_workforce_composition_snapshot-->>build_workforce_composition_change_snapshot: 검증된 WorkforceCompositionSnapshot 반환
  build_workforce_composition_change_snapshot->>WorkforceCompositionChangeSnapshot: 집계 차이와 식별 정보 결합
  WorkforceCompositionChangeSnapshot-->>호출자: canonical JSON 및 SHA-256 digest 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 90.43% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 115 functions across 12 files. (2 skipped: …
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 제목은 동일한 known_at 컷오프를 사용하는 workforce composition change evidence 추가라는 PR의 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/workforce-composition-change

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.

@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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Verified against exact head 4184e927f808f184dc52b2ffc6ba9c380337f915: the aggregate-type finding is fixed with exact Decimal FTE and non-boolean, non-negative integer status-count validation, including regression coverage. The three Devin findings about logical_id, unscoped integrity calls, and allocation_fraction were valid against the transient predecessor tree but are outdated after the exact-head repair: current code uses the existing identity_of/identity_value resolution contract, restores coordinate-scoped integrity checks, and sums AssignmentFact.allocation_ratio. Fresh uv run --extra test --directory packages/hris-kernel pytest -q passed 185 tests with 100% statement and branch coverage. The PR remains subject to fresh hosted Checks and independent approval; this comment is not approval evidence.

Copy link
Copy Markdown
Contributor Author

Exact-current-head local refresh: remote head is now 7d50e77d55bd908975754739f7f5f7e9422334c5 after the protected-develop integration commit. On that exact tree, HRIS kernel tests pass 185 passed with 100% statement and branch coverage. All four historical review threads remain resolved and outdated; hosted checks for this exact head are still queued, and no qualifying independent approval is present.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 30, 2026 19:08

Dismissed as stale predecessor evidence only. This REQUEST_CHANGES review is explicitly bound to head cc6784ec33b1145c342bbbb99ebece1d37aeec80 and workflow run 32790319079. The current PR head is 90e2cffdafb2ca385359068b53f5ca1dc437a5af; predecessor checks/reviews do not transfer. Dismissal is not approval and does not satisfy any current-head gate. A fresh authenticated formal OpenCode verdict and all other current-head required evidence remain mandatory.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review exact current head 90e2cffdafb2ca385359068b53f5ca1dc437a5af against live protected develop@9e3e4847510e1e612b48474ba42b177b8ed824df. Same-head coverage-source-tree and coverage-evidence are now terminal SUCCESS; Workforce Intelligence Quality checked out this exact SHA and passed 232/232 HRIS-kernel tests with 876/876 statements and 360/360 branches (100.00%), and Recovery Rehearsal passed repository validation plus real cross-cluster dump/restore. The predecessor REQUEST_CHANGES bound to cc6784ec... was dismissed as non-transferable evidence only. Please publish a formal authenticated APPROVED or CHANGES_REQUESTED review bound to 90e2cff... only if an actual current-head review executes; fallback, summary-only, model-only, or predecessor evidence must remain non-passing.

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