feat(performance): add governed performance goal-plan evidence - #92
feat(performance): add governed performance goal-plan evidence#92seonghobae wants to merge 5 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성과 목표 계획 활성화 증거를 표현하는 Python 패키지를 추가했다. 패킷은 검토 상태, HR 참조, 출처 다이제스트와 피드백 주기를 검증한다. 정규 JSON, SHA-256 무결성, 재발행 충돌 방지와 전용 품질 검증 워크플로를 포함한다. Changes성과 목표 계획 활성화 증거
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to This change adds a bounded performance-goal evidence record without granting rating or employment-decision authority, and the supplied checks show no actionable implementation defect. It should not merge yet because the required independent approval and effective protected-branch enforcement are not currently in place. Sequence Diagram(s)sequenceDiagram
participant 호출자
participant build_performance_goal_plan_packet
participant PerformanceGoalPlanPacket
participant SHA-256
호출자->>build_performance_goal_plan_packet: 증거 필드 전달
build_performance_goal_plan_packet->>PerformanceGoalPlanPacket: 검증된 패킷 생성
PerformanceGoalPlanPacket->>SHA-256: canonical_json 해시 요청
SHA-256-->>PerformanceGoalPlanPacket: 다이제스트 반환
PerformanceGoalPlanPacket-->>호출자: 정규화된 패킷 반환
🚥 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_json = _canonical_payload_json(_payload(self)) | ||
| current_digest = sha256(payload_json.encode("utf-8")).hexdigest() | ||
| with _REGISTRY_LOCK: | ||
| creation_digest = _CREATION_DIGESTS[self] | ||
| if current_digest != creation_digest: | ||
| raise ValueError("performance goal-plan evidence changed after issuance") | ||
| return payload_json |
There was a problem hiding this comment.
📝 Info: Unpickled packet breaks canonical export
canonical_json reads _CREATION_DIGESTS[self], populated only by __post_init__. A packet rebuilt without it (unpickling a slotted frozen dataclass, copy.copy) is unregistered, so export raises KeyError rather than the intended ValueError. No caller exercises this today.
Was this helpful? React with 👍 or 👎 to provide feedback.
| key = (self.tenant_record_id, self.performance_goal_plan_reference) | ||
| with _REGISTRY_LOCK: | ||
| existing = _LIVE_REFERENCES.get(key) | ||
| if existing is not None and _CREATION_DIGESTS.get(existing) != creation_digest: | ||
| raise ValueError("performance goal-plan reference is bound to different live evidence") | ||
| _CREATION_DIGESTS[self] = creation_digest | ||
| _LIVE_REFERENCES[key] = self |
There was a problem hiding this comment.
📝 Info: Re-issuing evidence for a live plan reference fails closed
The registry keys on (tenant, plan reference) and its digest includes generated_at. Regenerating evidence for the same plan reference while an earlier packet is still reachable raises 'bound to different live evidence'. This is intended per ADR 0092, so callers must treat the plan reference as a per-evidence key, not a reused plan identifier.
Was this helpful? React with 👍 or 👎 to provide feedback.
| with _REGISTRY_LOCK: | ||
| existing = _LIVE_REFERENCES.get(key) | ||
| if existing is not None and _CREATION_DIGESTS.get(existing) != creation_digest: | ||
| raise ValueError("performance goal-plan reference is bound to different live evidence") | ||
| _CREATION_DIGESTS[self] = creation_digest | ||
| _LIVE_REFERENCES[key] = self |
There was a problem hiding this comment.
📝 Info: Reissuance guard scoped to object liveness
_LIVE_REFERENCES and _CREATION_DIGESTS are weak. After the original packet is garbage collected, a new packet reusing the same tenant/plan reference with different content is accepted, since existing resolves to None. The conflict guard holds only while the original is alive.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
@opencode-agent Please review the current unchanged head against protected |
Exact-current-head state
Current exact head:
141574958df2238d107121138c1ffb5f854126cc.Fresh live base:
develop@9e3e4847510e1e612b48474ba42b177b8ed824df.Buyer-visible gap closed
Protected
develophas performance cycles and criterion observations, but no governed performance-goal plan activation evidence. This PR adds a value-minimized, transport-neutral goal-plan boundary without writing another CWL repository and without granting autonomous rating or employment-decision authority.The packet binds tenant, Employment, Job, performance cycle, goal-set SHA-256, measurement-definition SHA-256, reviewed feedback cadence, distinct requester/reviewer, evidence version, and system-recorded time. Goal text, ratings, assessment scores, compensation values, and employment decisions remain outside durable governance evidence. The packet is fixed to
requires_human_review,not_authorized_for_performance_rating, andnot_authorized_for_employment_decision.RED → implementation evidence
b661446e30336a1f49371d5a7393e90e4ff6400432609564146, job97120230551, checked out the exact SHA and failed withModuleNotFoundErrorbecause the production boundary was deliberately absent.70c38abea15a7dae4401b6d35b951832a6a541c532609619875passed all 36 functional tests but correctly failed the exact coverage gate at 98%; this was non-passing evidence.f75aee51f1129c66c083411b853d8366c9cda58d32609675570reached exact 100% statement/branch coverage.Review-driven quality-trigger repair
Fresh Devin review found a real repository-quality defect: the dedicated workflow watched the package, doctoring, and traceability paths but omitted its own governed ADR
docs/adr/0092-governed-performance-goal-plan.md. An ADR-only edit could therefore avoidPerformance Goal Plan Quality.6c152093c891dbede556cd51307606d810164993addstest_quality_workflow_covers_governed_adr(). Its hosted runs materialized but were cancelled by the immediately following repair through the workflow concurrency policy; no cancelled result is claimed as passing or RED execution evidence.141574958df2238d107121138c1ffb5f854126ccadds the ADR path to the workflow trigger.32611929753, job97126268994, checked out the exact current head and ran 37 tests from the hash-bound installed wheel with owned production at 155 statements / 46 branches = exact 100% statement and branch coverage; clean checkout passed.Exact-head hosted gates
Every applicable current-head workflow is terminal GREEN:
3261192975332611929746326119297433261192976732611929785Merge policy
This PR is ready for qualifying independent review, not merge-authorized. No qualifying independent non-author
APPROVEexists. Orgmetra issue #89 also remains open because GitHub reportsdevelopasprotected: truewhile effective required-check enforcement is disabled/empty. Keep unmerged until independent approval and enforceable protected-branch policy are both present on fresh state. Immediately before any merge, refetch exact head, live base, rules/protection, reviews, threads, and checks and use expected-head protection. Do not self-approve, bypass protection, or transfer predecessor evidence.Summary by CodeRabbit
신규 기능
문서
품질