Skip to content

v3.7.0: Candidate Review and Promotion Workflow - #79

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

Alajmah merged 1 commit into
masterfrom
roadmap/v3.7.0-candidate-review-promotion

Conversation

@Alajmah

@Alajmah Alajmah commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds governed review of candidate findings with explicit decision recording. Review decisions are append-only records. Candidate artifacts are NOT mutated. Candidate acceptance is review-level only — it does NOT create accepted DebtFindings.

What's new

Component File Purpose
Candidate review core/connectors/candidate_review.py review_candidate() function
Lifecycle outcomes core/lifecycle.py CandidateAccepted/Rejected/Deferred (3 new states)
Status reader status_reader.py Shows candidate review state

Candidate review lifecycle

Candidate → CandidateAccepted   (review-level acceptance)
Candidate → CandidateRejected   (review-level rejection)
Candidate → CandidateDeferred   (review deferral)

CandidateAccepted ≠ Acknowledged. Accepted candidates remain candidates.

Four amendments implemented

Amendment Implementation
1. Review-level only terminology Summary says "not debt-register promotion"
2. Candidate-specific outcome states CandidateAccepted/Rejected/Deferred (not Acknowledged/Won't Fix)
3. Strict ID separation Candidate review rejects TD-; regular review ignores CAND-
4. One terminal decision per candidate Second terminal decision raises error

Tests: 3,324 passed, 7 skipped (+56 new)

Boundaries preserved

No auto-promotion. No DebtFinding creation.
No work packages. No tickets. No scanner execution.
No historical artifact mutation.
Candidate artifact NOT mutated by review.

Add governed review of candidate findings with explicit decision recording.
Review decisions are append-only records. Candidate artifacts are NOT mutated.
Candidate acceptance is review-level only — it does NOT create accepted findings.

New module: src/pharabius/core/connectors/candidate_review.py
- review_candidate(): records decision in review sidecar + lifecycle history
- summarize_candidate_reviews(): pending/accepted/rejected/deferred counts
- format_candidate_review_summary(): console output with 'review-level only' label

Candidate-specific lifecycle outcomes (amendment 2):
- CandidateAccepted: distinct from Acknowledged
- CandidateRejected: distinct from Won't Fix
- CandidateDeferred: distinct from Deferred
- All three are terminal in v3.7.0 (no supersession yet)

Decision-to-outcome mapping:
- accepted → CandidateAccepted
- rejected/risk-accepted/duplicate/already-fixed → CandidateRejected
- deferred → CandidateDeferred
- needs-investigation → INVALID for candidates

Terminal decision guard (amendment 4):
- One terminal decision per candidate
- Second terminal decision raises CandidateReviewError
- Deferred is also terminal in v3.7.0

ID space separation (amendment 3):
- Candidate review rejects TD-* IDs
- Regular review ignores CAND-* IDs

FindingStatus enum: 8 → 11 states

56 new tests. 3,324 total (was 3,268).

Amended acceptance criteria (21-27):
21. Candidate acceptance documented as review-level only
22. CandidateAccepted distinct from Acknowledged/Detected
23. Regular review path does not accept CAND-* IDs
24. Candidate review path does not accept TD-* IDs
25. One terminal decision per candidate
26. Candidate lifecycle entries use candidate-specific states
27. Candidate review summary distinguishes from finding reviews

Boundaries preserved:
- No auto-promotion
- No DebtFinding creation
- No work package generation
- No ticket creation
- No scanner execution
- No historical artifact mutation
- Candidate artifact NOT mutated by review

Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com>
@Alajmah
Alajmah merged commit 4ba6efc into master Jun 6, 2026
5 checks passed
@Alajmah
Alajmah deleted the roadmap/v3.7.0-candidate-review-promotion branch June 6, 2026 21:22
Alajmah added a commit that referenced this pull request Jun 13, 2026
Add governed review of candidate findings with explicit decision recording.
Review decisions are append-only records. Candidate artifacts are NOT mutated.
Candidate acceptance is review-level only — it does NOT create accepted findings.

New module: src/pharabius/core/connectors/candidate_review.py
- review_candidate(): records decision in review sidecar + lifecycle history
- summarize_candidate_reviews(): pending/accepted/rejected/deferred counts
- format_candidate_review_summary(): console output with 'review-level only' label

Candidate-specific lifecycle outcomes (amendment 2):
- CandidateAccepted: distinct from Acknowledged
- CandidateRejected: distinct from Won't Fix
- CandidateDeferred: distinct from Deferred
- All three are terminal in v3.7.0 (no supersession yet)

Decision-to-outcome mapping:
- accepted → CandidateAccepted
- rejected/risk-accepted/duplicate/already-fixed → CandidateRejected
- deferred → CandidateDeferred
- needs-investigation → INVALID for candidates

Terminal decision guard (amendment 4):
- One terminal decision per candidate
- Second terminal decision raises CandidateReviewError
- Deferred is also terminal in v3.7.0

ID space separation (amendment 3):
- Candidate review rejects TD-* IDs
- Regular review ignores CAND-* IDs

FindingStatus enum: 8 → 11 states

56 new tests. 3,324 total (was 3,268).

Amended acceptance criteria (21-27):
21. Candidate acceptance documented as review-level only
22. CandidateAccepted distinct from Acknowledged/Detected
23. Regular review path does not accept CAND-* IDs
24. Candidate review path does not accept TD-* IDs
25. One terminal decision per candidate
26. Candidate lifecycle entries use candidate-specific states
27. Candidate review summary distinguishes from finding reviews

Boundaries preserved:
- No auto-promotion
- No DebtFinding creation
- No work package generation
- No ticket creation
- No scanner execution
- No historical artifact mutation
- Candidate artifact NOT mutated by review

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