Skip to content

feat: add governed selection outcome monitoring plan - #42

Draft
seonghobae wants to merge 107 commits into
developfrom
feat/selection-outcome-monitoring-plan
Draft

feat: add governed selection outcome monitoring plan#42
seonghobae wants to merge 107 commits into
developfrom
feat/selection-outcome-monitoring-plan

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible outcome

Adds a governed, aggregate-only selection-outcome monitoring plan for post-hire criterion evidence while keeping high-impact employment decisions human-controlled. The packet binds tenant and Job scope, exact population/outcome snapshot evidence, monitoring window, protected-attribute/small-sample/statistical-plan provenance, accountable actor/reviewer/purpose/reason, evidence version, and opaque governed references into deterministic canonical evidence. LLM/model output is not an employment decision authority.

Current authority — 2026-09-07

Exact head is ec35dc87d6be4f44a2c7b44311fa8c89bb080fb3 on current protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f. The preceding b357adee... was already an ordinary two-parent, non-force adoption of the valid feature head plus protected #161; this successor is a normal fast-forward commit on that adopted history.

The retired .github/workflows/selection-monitoring-quality.yml stays deleted. Canonical .github/workflows/foundation-ci.yml remains byte-for-byte identical to protected #161 (Git blob 6b475d6f2022a3ccb791d6355e50542e237e57c0), so its existing manifest entry remains valid and no Foundation-manifest churn is required.

Shared-dispatcher repair

The first reconciliation head made tests/test_foundation_ci_dependency_hygiene.sh know Selection Monitoring by name. That solved the immediate leaf-workflow resurrection, but it would force every later package reconciliation to edit the same shared dispatcher and create avoidable sibling-PR conflicts. The current head replaces that package-specific hook with a stable discovery contract: Foundation-owned dependency hygiene discovers tests/test_foundation_ci_*_artifact.sh and executes each delegated artifact contract. Selection Monitoring now owns tests/test_foundation_ci_selection_monitoring_artifact.sh; adding another package proof no longer requires another edit to the shared Foundation workflow or another package-specific variable in the dispatcher.

The delegated contract keeps the retired leaf absent, creates an isolated virtual environment, installs the existing hash-locked reviewed Foundation test toolchain, compiles the package and its tests, runs the package pytest configuration with its existing --cov-fail-under=100 and --cov-branch thresholds, and removes the temporary environment on exit. test_quality_workflow_trigger.py now fails if the retired leaf reappears, the discovery convention disappears, or the Selection Monitoring artifact contract is detached. TRACEABILITY describes the same owner path. Product runtime/scientific semantics are unchanged.

Canonical Foundation dependency

Structured Interview reconciliation exposed a broader Foundation contract that this product branch must not silently become the owner of. PR #40 declares Python >=3.12 and has executable 3.12/3.13/3.14 compatibility evidence; its protected-parent synthetic merge resurrects a retired leaf to preserve that contract. Deleting that leaf without a canonical replacement would weaken supported-runtime acceptance.

Issue #258 / Draft PR #259 is the canonical repository-level solution: package-neutral compatibility under Foundation, exact ubuntu-24.04, actual-interpreter-patch PEP 440 selection, malformed metadata/layout fail-closed behavior, reviewed hash-locked tooling, complete dependency-file provenance binding, one Foundation job with sequential compatibility execution, no package-name switchboard, retired-leaf non-resurrection, and deterministic manifest resealing.

The generic dispatcher on this branch is valid feature-branch evidence but is not protected shared-kernel truth. Do not copy this mutable source into sibling product branches. Required owner order is #258/#259 normal protected integration first, then #42 non-force adoption of that protected Foundation truth while preserving the complete Selection Monitoring delta and helper semantics.

Exact-head acceptance

Fresh terminal evidence on unchanged ec35dc87... is now:

  • Foundation CI 34039596182SUCCESS.
  • SAST Semgrep 34039596135SUCCESS.
  • Security Scan 34039596128FAILURE only at the central Dependency Review support boundary. Exact-head checkout succeeds; Scorecard, OSV and Trivy complete successfully. Dependency-review job 101509102356 fails at Check dependency review support, so the authoritative Dependency Review action is skipped. This does not establish a Selection Monitoring source vulnerability.
  • CodeQL PR 34039596118FAILURE only at the central verdict handoff. Language detection succeeds; Python job 101509421619 and Actions job 101509421633 both successfully request current-head CodeQL scan dispatch, then fail only at Release runner or enforce current-head CodeQL verdict. No source/SARIF defect is established by that wrapper failure.

Historical package GREEN and predecessor results remain causal evidence only. Fresh review enumeration remains COMMENTED-only; no qualifying independent APPROVED review exists. Every currently returned inline review thread is resolved. No leaf fallback, synthetic security/CodeQL verdict, or no-op retrigger is introduced for central-owner failures.

Live protection / next transition

Ruleset 18156473 remains the merge authority. Keep this PR Draft. #258/#259 must become protected Foundation truth before this branch's shared-dispatcher delta can be treated as canonical owner behavior. After that integration, non-force adopt protected truth and reacquire exact-head evidence. If a real RED appears, repair its causal owner.

Do not restore package-local CI, transfer predecessor checks, copy mutable sibling Foundation source, self-approve, fabricate reviewer/verdict evidence, force-push/destructively rebase, weaken a gate, or Close the valid monitoring delta.

@coderabbitai

coderabbitai Bot commented Aug 18, 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: 1791dcc7-645c-4cd2-96c8-fcdcd628be71

📥 Commits

Reviewing files that changed from the base of the PR and between fca4041 and fb03c08.

📒 Files selected for processing (8)
  • .github/workflows/selection-monitoring-quality.yml
  • docs/adr/0016-governed-selection-outcome-monitoring-plan.md
  • docs/traceability/selection-outcome-monitoring.md
  • packages/selection-monitoring/CHANGELOG.md
  • packages/selection-monitoring/README.md
  • packages/selection-monitoring/src/orgmetra_selection_monitoring/plan.py
  • packages/selection-monitoring/tests/test_issuance_integrity.py
  • packages/selection-monitoring/tests/test_quality_workflow_trigger.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/selection-monitoring/CHANGELOG.md

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


📝 Walkthrough

Walkthrough

SelectionOutcomeMonitoringPlan 계약과 Python 패키지를 추가했다. 테넌트 범위, UUID 참조, 증거 버전, canonical JSON, SHA-256 다이제스트, 발행 시각 및 인간 검토 상태를 검증한다. 테스트와 GitHub Actions 품질 검사를 추가했다.

Changes

선택 결과 모니터링

Layer / File(s) Summary
거버넌스 계약 및 패키지 공개
docs/adr/0016-governed-selection-outcome-monitoring-plan.md, docs/doctoring/selection-outcome-monitoring-references.md, docs/traceability/selection-outcome-monitoring.md, packages/selection-monitoring/README.md, packages/selection-monitoring/CHANGELOG.md, packages/selection-monitoring/pyproject.toml, packages/selection-monitoring/src/orgmetra_selection_monitoring/__init__.py
집계 전용 모니터링 계획의 필드와 거버넌스 제약을 정의했다. 테넌트 범위 재확인, actor 분리, 발행 시각 증거 및 공개 API를 문서화했다.
계획 검증 및 증거 직렬화
packages/selection-monitoring/src/orgmetra_selection_monitoring/plan.py
운영 UUID, UUIDv4 참조, 다이제스트, 시간, 기간, actor 분리와 고정 상태를 검증한다. 비노출 repr, canonical JSON, SHA-256 다이제스트, HMAC 봉인 및 검증 빌더를 제공한다.
계약 테스트 및 품질 워크플로
packages/selection-monitoring/tests/*, .github/workflows/selection-monitoring-quality.yml
계획 생성·대체·불변성·개인정보·참조 무결성·증거 버전·고정 거버넌스·시간 정규화·발행 무결성을 검증한다. 고정 해시 도구, 컴파일, 전체 커버리지, 정확한 체크아웃 및 clean tree 검사를 실행한다.

Estimated code review effort: 4 (복잡) | ~45분

Merge Risk: 🟡 Moderate · up to fb03c

This PR adds aggregate-only monitoring evidence with deterministic integrity checks and human-controlled employment decisions, but it should not merge until all required current-head reviews, validations, and independent approval pass; integrating hosts must also enforce tenant ownership, actor separation, purpose authorization, and durable audit to prevent evidence from being attributed to the wrong tenant or unauthorized purpose.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant build_selection_outcome_monitoring_plan
  participant SelectionOutcomeMonitoringPlan
  Caller->>build_selection_outcome_monitoring_plan: 계획 입력 전달
  build_selection_outcome_monitoring_plan->>SelectionOutcomeMonitoringPlan: 입력 검증 및 계획 생성
  SelectionOutcomeMonitoringPlan-->>Caller: HMAC 봉인된 계획 반환
  Caller->>SelectionOutcomeMonitoringPlan: canonical_json() 호출
  SelectionOutcomeMonitoringPlan-->>Caller: 검증된 canonical JSON 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 96.74% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 92 functions across 12 files. (5 skipped: 5…
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 제목은 거버넌스가 적용된 선택 결과 모니터링 계획 추가라는 PR의 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/selection-outcome-monitoring-plan

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 18, 2026 19:00

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please independently review exact current head 0aea81f768235d62974686f02b9b0a93a30266be against protected develop f815feedcb0bac264d9814b2932338c512276110. Re-read the full diff and current thread state rather than predecessor evidence. Verify the aggregate-only selection-outcome monitoring boundary, protected-attribute minimization, human-review-only authority, deterministic evidence, exact 100% owned coverage evidence, and security/governance claims. If this unchanged head satisfies the repository review standard, submit a formal APPROVE; otherwise leave only source-backed actionable findings tied to this exact head. Do not modify or merge the PR.

@seonghobae
seonghobae marked this pull request as draft August 19, 2026 02:12
@seonghobae
seonghobae marked this pull request as ready for review August 19, 2026 06:35
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please independently review exact current head fb03c0837b38424412fa774576a8ded0f9847896 against live protected develop@9e3e4847510e1e612b48474ba42b177b8ed824df. Treat every predecessor request, check, status, and review as stale. Re-read the current diff and resolved thread state. Verify the aggregate-only Job-scoped selection-outcome monitoring contract, exact population/outcome/protected-attribute-handling/small-sample/statistical-plan provenance, tenant-scoped authoritative reference re-resolution, distinct accountable requester/reviewer identities, bounded true-integer evidence versioning, creation-bound integrity, PII/value minimization, deterministic canonical evidence, and human-review-only/non-legal-decision authority. Current exact-head Orgmetra quality/Foundation/Recovery/SAST and material Strix scan are GREEN, while Dependency Review and Noema remain independently non-passing foreign-owner gates; do not treat those as source findings. Submit an authenticated formal APPROVED only if this unchanged head satisfies the review standard, otherwise CHANGES_REQUESTED with the narrowest source-backed finding tied to this SHA. Do not modify or merge the branch and do not use author approval.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Re-review the unchanged exact current head after the central review-dispatch/scheduler repairs now integrated on .github/main@1cf2f9120a2cd494ed5079135bb10822c27b5947. Consumer ContextualWisdomLab/Orgmetra#42; head fb03c0837b38424412fa774576a8ded0f9847896; live base develop@9e3e4847510e1e612b48474ba42b177b8ed824df. Re-read current source and resolved threads from zero. Same-head owned quality/coverage/Foundation/Recovery/SAST are GREEN and material Strix is GREEN; Dependency Review and Noema remain separate fail-closed owner boundaries and must not be converted into source findings. Publish only a genuine authenticated formal APPROVED or CHANGES_REQUESTED review bound to this exact head; predecessor/status/model-only/verifier-only evidence does not transfer.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • .github/workflows/selection-monitoring-quality.yml — GitHub Actions review job
  • docs/adr/0016-governed-selection-outcome-monitoring-plan.md — operator or user guidance
  • docs/doctoring/selection-outcome-monitoring-references.md — operator or user guidance
  • docs/traceability/selection-outcome-monitoring.md — operator or user guidance
  • packages/selection-monitoring/CHANGELOG.md — repository behavior
  • packages/selection-monitoring/README.md — repository behavior
  • packages/selection-monitoring/pyproject.toml — repository behavior
  • packages/selection-monitoring/src/orgmetra_selection_monitoring/__init__.py — Python module behavior
  • packages/selection-monitoring/src/orgmetra_selection_monitoring/plan.py — Python module behavior
  • packages/selection-monitoring/tests/test_actor_separation.py — regression suite
  • packages/selection-monitoring/tests/test_evidence_version.py — regression suite
  • packages/selection-monitoring/tests/test_fixed_governance_runtime_integrity.py — regression suite
  • packages/selection-monitoring/tests/test_issuance_integrity.py — regression suite
  • packages/selection-monitoring/tests/test_plan.py — regression suite
  • packages/selection-monitoring/tests/test_privacy.py — regression suite
  • packages/selection-monitoring/tests/test_quality_workflow_trigger.py — regression suite
  • packages/selection-monitoring/tests/test_reference_privacy.py — regression suite
  • packages/selection-monitoring/tests/test_string_runtime_evidence_integrity.py — regression suite
  • packages/selection-monitoring/tests/test_temporal_evidence_integrity.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: selection-monitoring-quality.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: selection-monitoring-quality.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Docs: 0016-governed-selection-outcome-monitoring-plan.md (3 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0016-governed-selection-outcome-monitoring-plan.md (3 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["Repository file: CHANGELOG.md"]
  S3 --> I3["repository behavior"]
  I3 --> R3["Review risk: Repository file: CHANGELOG.md"]
  R3 --> V3["required checks"]
  Evidence --> S4["Repository file: README.md"]
  S4 --> I4["repository behavior"]
  I4 --> R4["Review risk: Repository file: README.md"]
  R4 --> V4["required checks"]
  Evidence --> S5["Repository file: pyproject.toml"]
  S5 --> I5["repository behavior"]
  I5 --> R5["Review risk: Repository file: pyproject.toml"]
  R5 --> V5["required checks"]
  Evidence --> S6["Python: __init__.py (2 files)"]
  S6 --> I6["Python module behavior"]
  I6 --> R6["Review risk: Python: __init__.py (2 files)"]
  R6 --> V6["pytest plus coverage"]
  Evidence --> S7["Test: test_actor_separation.py (10 files)"]
  S7 --> I7["regression suite"]
  I7 --> R7["Review risk: Test: test_actor_separation.py (10 files)"]
  R7 --> V7["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: fb03c0837b38424412fa774576a8ded0f9847896
  • Workflow run: 33371635973
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: selection-monitoring-quality.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: selection-monitoring-quality.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Docs: 0016-governed-selection-outcome-monitoring-plan.md (3 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: 0016-governed-selection-outcome-monitoring-plan.md (3 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["Repository file: CHANGELOG.md"]
  S3 --> I3["repository behavior"]
  I3 --> R3["Review risk: Repository file: CHANGELOG.md"]
  R3 --> V3["required checks"]
  Evidence --> S4["Repository file: README.md"]
  S4 --> I4["repository behavior"]
  I4 --> R4["Review risk: Repository file: README.md"]
  R4 --> V4["required checks"]
  Evidence --> S5["Repository file: pyproject.toml"]
  S5 --> I5["repository behavior"]
  I5 --> R5["Review risk: Repository file: pyproject.toml"]
  R5 --> V5["required checks"]
  Evidence --> S6["Python: __init__.py (2 files)"]
  S6 --> I6["Python module behavior"]
  I6 --> R6["Review risk: Python: __init__.py (2 files)"]
  R6 --> V6["pytest plus coverage"]
  Evidence --> S7["Test: test_actor_separation.py (10 files)"]
  S7 --> I7["regression suite"]
  I7 --> R7["Review risk: Test: test_actor_separation.py (10 files)"]
  R7 --> V7["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Re-run the substantive review on exact current head fb03c0837b38424412fa774576a8ded0f9847896 against live develop@9e3e4847510e1e612b48474ba42b177b8ed824df. Do not reuse predecessor verdicts. The historical required OpenCode verifier failed only because no authenticated exact-head formal verdict existed and predates the protected central dispatch repair merged through .github#1497; publish only an authenticated exact-head formal verdict after current evidence validation.

Copy link
Copy Markdown
Contributor Author

Current-head control-evidence correction for fb03c0837b38424412fa774576a8ded0f9847896 against develop@9e3e4847510e1e612b48474ba42b177b8ed824df:

The PR body’s statement that no authenticated exact-head OpenCode review exists is stale. A post-.github#1497 exact-head review does exist: review 5087978427, submitted 2026-08-31T08:18:17Z, state COMMENTED, verdict COVERAGE_BLOCKED. Central run 33371635973 materialized the exact head/base; dispatch and review publication succeeded.

The first current OpenCode boundary is central coverage double-instrumentation, not missing dispatch and not uncovered Orgmetra code. In coverage-source-tree job 99424380243, the conventional detector runs this exact HRIS kernel source/tests and gets 119 passed, 397/397 statements, 224/224 branches = 100%. The config-root detector then wraps the same pytest suite in outer coverage run while packages/hris-kernel/pyproject.toml already enables pytest-cov. That nested instrumentation produces module-not-measured / no-data-collected, artificial 0% pytest-cov, then outer module-not-imported / No data to report; coverage-evidence job 99424380250 consequently fails. The final OpenCode verifier correctly remains non-passing.

The exact RED/GREEN acceptance canary has been routed through the existing central owner path .github#624, comment 5481179472: keep the 100% threshold, ensure exactly one coverage controller, and require unchanged-head conventional/config-root evidence to agree before treating OpenCode as substantive. Until then this PR remains not merge-ready; no predecessor verdict, self-approval, bypass, or synthetic no-op retrigger is acceptable.

@opencode-agent

opencode-agent Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: fb03c0837b38424412fa774576a8ded0f9847896

@opencode-agent

opencode-agent Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: fb03c0837b38424412fa774576a8ded0f9847896

@opencode-agent

opencode-agent Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: fb03c0837b38424412fa774576a8ded0f9847896

@opencode-agent

opencode-agent Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: fb03c0837b38424412fa774576a8ded0f9847896

@seonghobae
seonghobae marked this pull request as draft September 5, 2026 20:59
Adopt protected develop without resurrecting the retired package-local workflow. Preserve selection-monitoring 100% statement/branch coverage through a hash-locked Foundation-owned contract and add executable non-resurrection/ownership regression.

Signed-off-by: Seongho Bae <me@seonghobae.me>
Replace the selection-monitoring-specific dispatcher edit with a stable Foundation-owned discovery convention so later package artifact contracts can be added without competing edits to the shared dependency-hygiene script. Keep the retired leaf workflow deleted, preserve hash-locked 100% coverage, compile before tests, and clean the isolated venv on exit.

Signed-off-by: Seongho Bae <me@seonghobae.me>

Copy link
Copy Markdown
Contributor Author

Canonical prerequisite #258 now has an active protected-parent implementation in Draft PR #259 at exact head bde2bd5472175ab7263ff27ff56a09c9d619e0c5 (parent develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f). #259 moves package-neutral execution and declared-Python compatibility into Foundation itself, so this branch's mutable shared-dispatcher implementation must remain feature-branch evidence rather than become a sibling dependency. Keep #42 Draft and unchanged until #259 is normally integrated; then non-force adopt protected Foundation truth, preserve the Selection Monitoring domain/scientific delta, drop any now-redundant shared-owner implementation, and reacquire exact-head evidence. Current #259 gates are fresh and queued; no predecessor GREEN transfers.

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