feat(core): add governed Position reporting-change review - #95
feat(core): add governed Position reporting-change review#95seonghobae wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
Changes포지션 보고 변경 검토
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to The change adds a bounded pre-mutation review boundary without changing reporting-line data, and no user-facing or production defect is identified. The current head should not merge yet because the required independent non-author approval is still missing. Sequence Diagram(s)sequenceDiagram
participant Caller
participant build_position_reporting_change_review_packet
participant PositionReportingChangeReviewPacket
participant QualityWorkflow
Caller->>build_position_reporting_change_review_packet: reporting-change 입력 전달
build_position_reporting_change_review_packet->>PositionReportingChangeReviewPacket: 검증된 패킷 생성
PositionReportingChangeReviewPacket-->>Caller: canonical evidence와 SHA-256 digest 제공
QualityWorkflow->>PositionReportingChangeReviewPacket: 설치된 wheel 테스트 실행
QualityWorkflow-->>Caller: 커버리지와 checkout 검증 결과 반환
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
| def canonical_json(self) -> str: | ||
| """Return one verified snapshot of deterministic canonical audit evidence.""" | ||
| payload = _payload(self) | ||
| payload_json = _canonical_payload_json(payload) | ||
| current_digest = sha256(payload_json.encode("utf-8")).hexdigest() | ||
| with _REGISTRY_LOCK: | ||
| creation_digest = _CREATION_DIGESTS.get(self) | ||
| if current_digest != creation_digest: | ||
| raise ValueError("position reporting-change evidence changed after issuance") | ||
| return payload_json |
There was a problem hiding this comment.
📝 Info: Tamper detection is process-local
canonical_json (review.py) matches the payload against a digest stored in a module-global WeakKeyDictionary keyed by object identity. A packet reconstructed without __post_init__ (pickle, copy.deepcopy of a frozen-slots dataclass) has no entry, so the lookup returns None and a valid packet raises "changed after issuance". No pickle/copy path exists here and the PR states this is deliberately process-local. Relevant only for future callers that serialize via pickle rather than canonical_json.
Was this helpful? React with 👍 or 👎 to provide feedback.
Scope
Adds one bounded, transport-neutral pre-mutation governance boundary for reviewing a solid-line Position-to-Position reporting reassignment. It binds reviewed organizational scope and accountable human review without copying Person PII, worker values, compensation, ratings, free-form personal reasons, or employment decisions into the evidence envelope.
This slice deliberately does not persist or mutate reporting-line truth. It is independent of active PR #94 and requires authoritative Position/reporting resolution before any later mutation. No cross-service application-table SQL or foreign CWL repository write is included.
Test-first repair sequence
69c4baaacd3dc2851fa9f3ae6d7a0e068bf1d466added the package/workflow/regressions while imported production modulereviewwas intentionally absent. No terminal hosted RED run materialized before subsequent repair commits superseded that head, so absent/cancelled evidence is not presented as terminal RED proof.8d28a7eadc238658c9f37becee5c11f468167148implementedPositionReportingChangeReviewPacket, buyer docs, ADR 0095, traceability and current primary-source doctoring.af6a915132254ec1088329bb4009b024daedfdcbremoved the unused adversarial-test import; current headadf055d79d188ba18d06ecf80dc1117858c987f4completed the adversarial integer ordering surface after the valid GitHub Code Quality finding. Only addressed threads are resolved.Governed contract
The packet keeps subordinate/current-manager/proposed-manager Position references separate; rejects self-reporting/no-op proposals; preserves authoritative tenant/Position operational UUID interoperability while leaf-owned change/actor correlations require UUIDv4; separates business
effective_onfrom system-recorded evidencerecorded_at; binds Position/organization scope using lowercase SHA-256 digests and a controlled reason vocabulary; and requires requester/reviewer separation plus authoritative actor re-resolution before mutation.It fixes
review_state=requires_human_review,scope_verification_state=requires_authoritative_resolution,mutation_state=not_authorized_to_apply, anddecision_authority=human_review_only. Exact built-in trust primitives, a redacted repr, deterministic canonical JSON/SHA-256 and process-local post-construction tamper detection are enforced. The next action requires same-tenant bitemporal Position/reporting resolution, Position validity/staffability, authoritative actor separation, cycle/multiple-manager rejection, scope-evidence verification and immutable audit/outbox before any later mutation.NIST SP 800-53 Rev. 5 Release 5.2.0, final NIST Privacy Framework 1.0, and RFC 9562 are recorded under
docs/doctoring; no certification or universal legal-compliance claim is made.Exact-current-head evidence
Head:
adf055d79d188ba18d06ecf80dc1117858c987f4Base:
develop@9e3e4847510e1e612b48474ba42b177b8ed824dfTerminal GREEN on the unchanged exact head:
3262216183632622161826326221618313262216182932622161830Focused job
97151830119checked out exactlyadf055d79d188ba18d06ecf80dc1117858c987f4, used CPython 3.14.7, built one wheel, installed it through a computed SHA-256 requirement, ran the installed artifact, passed 45 tests, and achieved 160/160 statements plus 52/52 branches = 100% owned statement/branch coverage with a clean checkout.Fresh review state has no unresolved defect thread and no
CHANGES_REQUESTED. Qualifying independent non-authorAPPROVEis still absent.Merge policy
This PR is ready for independent review but is intentionally unmerged. Do not reuse predecessor evidence. Merge only if the unchanged head still satisfies all live gates, a qualifying independent non-author approval exists, and
develophas real enforceable protection. Issue #89 currently tracks the repository-level protection defect.Summary by CodeRabbit
새 기능
문서
품질 개선