feat(performance): add governed work-context evidence - #93
Conversation
📝 WalkthroughWalkthrough성과 맥락 증거 패킷 패키지를 추가했습니다. 패킷은 제한된 참조, 시간 범위, 출처 다이제스트와 인간 검토 상태를 보존합니다. 입력 검증, 런타임 무결성, 설치 휠 테스트와 100% 커버리지 품질 게이트를 구성했습니다. Changes성과 맥락 증거 패킷
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🔵 Low · up to The PR adds governed work-context evidence without changing ratings or employment decisions. It is mergeable with explicit owner awareness for a bounded edge-case correctness issue affecting copied or deserialized evidence objects, plus minor documentation and workflow follow-up. Sequence Diagram(s)sequenceDiagram
participant Caller as 호출자
participant Builder as build_performance_context_evidence
participant Packet as PerformanceContextEvidencePacket
participant Quality as 품질 워크플로
Caller->>Builder: 맥락과 출처 입력 전달
Builder->>Packet: 검증된 패킷 생성
Packet-->>Caller: 정규 JSON과 SHA-256 다이제스트 반환
Quality->>Packet: 설치 휠에서 테스트와 커버리지 실행
🚥 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 |
|
@opencode-agent Please review the current unchanged head against protected |
… exports canonical_json now raises the governed ValueError when a packet was restored without __post_init__ (copy/pickle path) instead of leaking KeyError, and the traceability label names the protected branch accurately. Regression simulates the slots-restored off-lifecycle instance; suite stays at 100% statement+branch coverage (45 tests). Addresses Devin and CodeRabbit findings on PR #93.
| _REGISTRY_LOCK = RLock() | ||
| _CREATION_DIGESTS: WeakKeyDictionary[PerformanceContextEvidencePacket, str] = WeakKeyDictionary() | ||
| _PACKET_BINDINGS: WeakKeyDictionary[ | ||
| PerformanceContextEvidencePacket, _LiveReferenceBinding | ||
| ] = WeakKeyDictionary() | ||
| _LIVE_REFERENCES: WeakValueDictionary[ | ||
| tuple[str, str], _LiveReferenceBinding | ||
| ] = WeakValueDictionary() |
There was a problem hiding this comment.
📝 Info: Registry uniqueness is process-local only
_LIVE_REFERENCES/_CREATION_DIGESTS/_PACKET_BINDINGS are module-global weak maps, so conflict detection holds only within one process and depends on GC timing to release bindings. Durable cross-process uniqueness must come from authoritative persistence, as the ADR states.
Was this helpful? React with 👍 or 👎 to provide feedback.
Buyer-visible gap
develop@9e3e4847510e1e612b48474ba42b177b8ed824dfhas performance cycles and criterion observations but no governed evidence boundary for the work context in which criterion outcomes were observed. This Orgmetra-only lane adds value-minimized context provenance for later human-reviewed validation and workforce interpretation without changing ratings, criterion values, compensation, or employment decisions.PerformanceContextEvidencePacketbinds tenant, Employment, Job, performance cycle, a nonempty half-open business-time context window, sorted/unique Assignment and Organization memberships, reviewed SHA-256 provenance, distinct requester/reviewer, purpose/reason, evidence version, and system-recorded time. Canonical evidence excludes performance ratings, manager identity, raw HR values and free-form context values, and remainscontext_covariate_evidence_only,requires_human_review,not_authorized_for_performance_rating, andnot_authorized_for_employment_decision.Test-first integrity and review repair
The live-reference repair remains intact: RED
530bc5f19e436403748ca2f246893a0eeae16bddproved an idempotent duplicate could erase a still-live conflict binding after GC; root repair132ebf0edaba9b4939e86843a3ad01a4fbadbcb6introduced one shared weak-referenceable binding per tenant-qualified reference/digest.A later review wave identified additional valid repository/package-boundary issues on predecessor head
bbb106aceeda3a3ac2ebf5caead9e174a9dbe21f:0163d9ab5064deaf0fae57e5d6928ff384def639makes copied/restored off-lifecycle packets fail closed with the governedValueErrorinstead of leakingKeyError, adds the exact regression, and corrects the protected-developtraceability label.da9de6f98c099aa16ad651b9adf0ebd590507c15requires a reviewed build-lock path and exact no-extra wheel install.49041318ec8ffc2daad53400bf14cb96eb2c1b6badds.github/requirements/performance-context-evidence-build.txt;dc254fb7257c7901be9ea2c1d9a6830637081c96makes the workflow consume that reviewed hash lock, watches the lock path, and removes the misleading[test]extra.951167e58a5a1f97254c290ae77354e5a0faeaeeassigns each test a deterministic UUIDv4 packet reference derived from its node id while preserving same-reference behavior inside tests that intentionally verify conflict detection.The one current unresolved Devin thread is informational: the weak registries are process-local defense-in-depth only; durable cross-process uniqueness belongs to authoritative persistence, as already documented.
Exact-current-head evidence
Current exact head:
951167e58a5a1f97254c290ae77354e5a0faeaeeFresh live base:
develop@9e3e4847510e1e612b48474ba42b177b8ed824dfGitHub reports open, Draft, and mergeable.
Fresh exact-head hosted workflows are terminal GREEN:
32876393426— success32876393333— success32876393398— success32876393476— success32876393382— successSubmitted reviews are COMMENTED/analysis only; there is no qualifying independent non-author
APPROVEorCHANGES_REQUESTED. Review threads are resolved except the documented process-local-registry informational observation.The live Draft lifecycle state is intentional for this loop: GitHub event history records
ready_for_reviewon 2026-08-23 followed byconvert_to_drafton 2026-08-25 under a separate same-repository lifecycle writer. Under SINGLE-WRITER, this loop records the exact-head GREEN evidence but does not race that lifecycle writer by toggling Draft/Ready again.Scientific and ownership boundary
The packet preserves opportunity-to-perform, work-context, manager-context and multiple-membership provenance so later governed analysis can represent scientifically relevant multilevel, cross-classified, multiple-membership and temporal structure. It does not estimate a context effect, claim causality, adjust a worker rating, or duplicate Psychometrics Commons/fast-mlsirm/TEPP numerical kernels. Write scope is Orgmetra only.
Merge governance
Effective organization ruleset 18156473 —
CWL Central required workflowsis active on~DEFAULT_BRANCHand requires PR integration, 2 approving reviews, stale-review dismissal, last-push approval, review-thread resolution, central required workflows, and deletion/non-fast-forward protection. Issue #89 tracks the narrower remaining commercial-control gaps: routineOrganizationAdminbypass_mode=always/current_user_can_bypass=always, executable proof that every applicable Orgmetra-local gate is fail-closed required, and lifecycle-writer collisions where evidenced.Do not merge until the live lifecycle owner advances the PR, two qualifying independent non-author approvals exist on the unchanged head, every applicable local/central gate is freshly terminal GREEN, and the effective ruleset is re-fetched. Do not self-approve, use routine administrator bypass, transfer predecessor evidence, weaken/simulate protection, or mutate a dedicated-writer dependency.