Skip to content

feat(hris): add governed Employment work-capacity review - #103

Open
seonghobae wants to merge 9 commits into
developfrom
feat/employment-work-capacity-review
Open

feat(hris): add governed Employment work-capacity review#103
seonghobae wants to merge 9 commits into
developfrom
feat/employment-work-capacity-review

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible gap

develop@9e3e4847510e1e612b48474ba42b177b8ed824df has authoritative Employment and Assignment truth, but no bounded review evidence for a proposed change in one Employment's contracted work capacity before downstream bitemporal mutation. This Orgmetra-only lane adds that boundary without changing compensation, payroll, leave, scheduling, Assignment, or any foreign CWL repository.

Current contract and test-first repairs

EmploymentWorkCapacityReviewPacket binds authoritative tenant/Employment scope, exact finite four-decimal current/proposed capacity ratios, business effective date, human review time, owner-generated system-recorded time, exact SHA-256 employment-terms/capacity-policy/reviewer-identity evidence, distinct requester/reviewer correlations, controlled non-sensitive reason, and evidence version.

The packet remains PII/value-minimized and fixed to employment_work_capacity_review, reviewed_for_authoritative_resolution, not_authorized_to_change_employment_or_compensation, and mandatory human review. It does not classify legal employment status, infer suitability or availability for work, or authorize Employment, Assignment, compensation, payroll, leave, or scheduling mutation.

Test-first repairs canonicalize zero capacity to 0.0000, reject signed negative zero, and remove caller authority over system-recorded time: Orgmetra generates UTC recorded_at inside the constructor, independently from business effective_on and human reviewed_at. Nil/Max UUID sentinels, malformed digests, runtime subclasses, noncanonical Decimal scale, actor overlap, review time after issuance, governance mutation, and post-issuance field mutation fail closed.

Exact-current-head evidence — 2026-09-02

  • Current exact head: 267d9d5bc58d2e951fe3e428876682c8a5e1daa5; protected base: develop@9e3e4847510e1e612b48474ba42b177b8ed824df.
  • GitHub reports the PR open, non-draft and mechanically mergeable. That is not merge authorization.
  • Employment Work Capacity Review Quality, Foundation CI, Recovery Rehearsal and SAST are terminal success on this exact head.
  • The previously recorded Security Scan success is not authoritative Dependency Review proof: inspection of that exact run shows dependency-review concluded success while the actual Dependency review action step was skipped. It predates the central fail-closed repair tracked by .github#810 and must not be promoted as clean dependency evidence.
  • A fresh rerun of that exact-head Security workflow has therefore been requested without changing the branch. It is currently queued; queued is not passing evidence and predecessor success does not transfer to the rerun.
  • Fresh review state contains COMMENTED reviews only; all currently returned review threads are resolved. No qualifying independent human approval exists.

Downstream ownership

PR #128 is the dependency-first child that persists reviewed work-capacity truth. It must not inherit this PR's checks or reviews. #103 must integrate first; then #128 must retarget to fresh develop and rerun every applicable local and central gate on its new exact head.

Merge governance

Effective organization ruleset 18156473 — CWL Central required workflows remains active on the default branch and still requires one unavailable generic approval plus routine OrganizationAdmin/always bypass. Issue #89 and central .github#772/#1351/#1176 own the satisfiable solo-maintainer contract: approval count zero while no genuinely independent human reviewer exists, last-push approval disabled, no synthetic required reviewers, review-thread resolution and exact-head deterministic workflows retained, deletion/non-fast-forward protection retained, and routine admin bypass removed in favor of separately governed break-glass operation.

This lane is therefore not merge-authorized. Refetch the rerun, exact head/base, reviews, unresolved threads, effective rules and checks before any future merge. Do not self-approve, use routine administrator bypass, transfer predecessor evidence, weaken/simulate protection, or treat a skipped Dependency Review action as successful evidence.

@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: 4e943dd8-538b-407f-a49f-d052334c2c43

📥 Commits

Reviewing files that changed from the base of the PR and between 645d2f3 and 267d9d5.

📒 Files selected for processing (2)
  • packages/employment-work-capacity-review/src/orgmetra_employment_work_capacity_review/review.py
  • packages/employment-work-capacity-review/tests/test_review.py

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


📝 Walkthrough

Walkthrough

Employment work-capacity review 패킷 패키지와 관련 문서, 테스트, GitHub Actions 품질 워크플로를 추가했다. 패킷은 입력 검증, canonical 증거, SHA-256 무결성, 시스템 기록 시각을 지원하며 운영 데이터를 변경하지 않는다.

Changes

Employment work-capacity review

Layer / File(s) Summary
검토 계약과 패키지 설정
docs/adr/0103-..., docs/doctoring/..., docs/traceability/..., packages/employment-work-capacity-review/{README.md,CHANGELOG.md,pyproject.toml}
패킷의 비권위 범위, 권한 경계, 증거 요구사항, 기록 규칙과 테스트·커버리지 설정을 정의한다.
패킷 생성과 증거 무결성
packages/employment-work-capacity-review/src/...
입력 형식과 검토 상태를 검증한다. 패킷을 생성하고, canonical 증거와 SHA-256 digest를 관리한다. 시스템이 recorded_at을 생성한다.
패킷 계약 테스트
packages/employment-work-capacity-review/tests/*
유효한 생성, 입력 오류, actor 분리, 시간 검증, 직렬화, 발행 후 변조 탐지, digest 재생성과 시스템 기록 시각을 검증한다.
격리 빌드와 품질 게이트
.github/workflows/employment-work-capacity-review-quality.yml
고정된 Python 환경에서 wheel을 빌드한다. 격리된 virtualenv에 설치한 뒤 의존성, import 경계, test extra, 테스트, 커버리지와 clean checkout 상태를 검사한다.

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

Merge Risk: ⚪ Minimal · up to 267d9

This PR adds a bounded, non-authoritative Employment work-capacity review evidence contract without changing authoritative employment or compensation state. No actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant 호출자
  participant 패킷빌더 as build_employment_work_capacity_review_packet
  participant 패킷 as EmploymentWorkCapacityReviewPacket
  participant 증거 as Canonical 증거

  호출자->>패킷빌더: 검토 입력 전달
  패킷빌더->>패킷: 시스템 recorded_at으로 생성
  패킷->>증거: 정규화 및 SHA-256 digest 생성
  증거-->>패킷: canonical 문서와 digest 반환
  패킷-->>호출자: 검증된 패킷 반환
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 72.73% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 제목은 Employment work-capacity review 패킷을 추가하는 주요 변경을 정확하고 간결하게 설명합니다.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ 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/employment-work-capacity-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 23, 2026 23:06
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 24, 2026 15:41
@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 15:41
@seonghobae seonghobae closed this Aug 24, 2026
@seonghobae seonghobae reopened this Aug 24, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review the current unchanged head against protected develop. Local exact-head verification: all owned package suites pass at 100% statement/branch coverage.

@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.

Devin Review

seonghobae added a commit that referenced this pull request Sep 1, 2026
Preserve parent #103 exact head 267d9d5 while retaining the disjoint #128 persistence paths. This is a non-destructive two-parent integration; exact-head review and checks must regenerate.
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