Skip to content

v3.9.0: Candidate Promotion Gate - #81

Merged
Alajmah merged 1 commit into
masterfrom
roadmap/v3.9.0-candidate-promotion-gate
Jun 6, 2026
Merged

Alajmah merged 1 commit into
masterfrom
roadmap/v3.9.0-candidate-promotion-gate

Conversation

@Alajmah

@Alajmah Alajmah commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Defines eligibility rules for promoting candidate findings to accepted findings. Gate-only: checks eligibility without performing promotion.

What's new

Component File Purpose
Promotion gate core/connectors/candidate_gate.py 9 eligibility checks

9 Gate Checks

Check Requirement
candidate_exists Found in candidate-findings.json
has_accepted_decision Review decision is 'accepted'
has_reviewer Reviewer field non-empty
has_rationale Rationale field non-empty
has_evidence_ids At least one evidence ID
has_provenance Provenance metadata present
has_title Title non-empty
has_category Category non-empty
has_description Description non-empty

Key design

check_promotion_eligibility(root, candidate_id)
  → PromotionGateResult(eligible=True/False, checks=[...], blocking_reasons=[...])

Gate is strictly read-only. No artifact mutation.

Tests: 3,375 passed, 7 skipped (+28 new)

Boundaries preserved

No writing to debt-register.json.
No creating accepted DebtFinding.
No work package generation.
No ticket creation.
No mutation of any artifact.

Add eligibility rules for promoting candidate findings to accepted findings.
Gate-only: checks eligibility without performing promotion.

New module: src/pharabius/core/connectors/candidate_gate.py
- check_promotion_eligibility(): single candidate gate check
- check_all_promotion_eligibility(): batch gate check
- format_eligibility_report(): single report
- format_batch_eligibility_report(): batch report

9 gate checks:
1. candidate_exists — found in candidate-findings.json
2. has_accepted_decision — review decision is 'accepted'
3. has_reviewer — reviewer field non-empty
4. has_rationale — rationale field non-empty
5. has_evidence_ids — at least one evidence ID
6. has_provenance — provenance metadata present
7. has_title — title non-empty
8. has_category — category non-empty
9. has_description — description non-empty

Status reader: gate-ready count for accepted candidates

28 new tests. 3,375 total (was 3,347).

Boundaries preserved:
- Gate is read-only — no mutation of any artifact
- No writing to debt-register.json
- No creating accepted DebtFinding
- No work package generation
- No ticket creation

Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com>
@Alajmah
Alajmah merged commit dd07c51 into master Jun 6, 2026
5 checks passed
@Alajmah
Alajmah deleted the roadmap/v3.9.0-candidate-promotion-gate branch June 6, 2026 23:27
Alajmah added a commit that referenced this pull request Jun 13, 2026
Add eligibility rules for promoting candidate findings to accepted findings.
Gate-only: checks eligibility without performing promotion.

New module: src/pharabius/core/connectors/candidate_gate.py
- check_promotion_eligibility(): single candidate gate check
- check_all_promotion_eligibility(): batch gate check
- format_eligibility_report(): single report
- format_batch_eligibility_report(): batch report

9 gate checks:
1. candidate_exists — found in candidate-findings.json
2. has_accepted_decision — review decision is 'accepted'
3. has_reviewer — reviewer field non-empty
4. has_rationale — rationale field non-empty
5. has_evidence_ids — at least one evidence ID
6. has_provenance — provenance metadata present
7. has_title — title non-empty
8. has_category — category non-empty
9. has_description — description non-empty

Status reader: gate-ready count for accepted candidates

28 new tests. 3,375 total (was 3,347).

Boundaries preserved:
- Gate is read-only — no mutation of any artifact
- No writing to debt-register.json
- No creating accepted DebtFinding
- No work package generation
- No ticket creation

Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com>
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