Skip to content

v3.10.0: Candidate Promotion Execution - #82

Merged
Alajmah merged 1 commit into
masterfrom
roadmap/v3.10.0-candidate-promotion-execution
Jun 7, 2026
Merged

Alajmah merged 1 commit into
masterfrom
roadmap/v3.10.0-candidate-promotion-execution

Conversation

@Alajmah

@Alajmah Alajmah commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

First mutation wave: promotes eligible candidates to accepted DebtFindings. Requires v3.9.0 gate pass. Preserves candidate lineage. Append-only audit.

What's new

Component File Purpose
Promotion execution core/connectors/candidate_promotion.py promote_candidate()

Promotion flow

1. Check v3.9.0 gate (9 checks) — must all pass
2. Verify not already promoted (duplicate guard)
3. Convert CandidateFinding → DebtFinding with lineage
4. Append to existing debt-register.json
5. Recalculate register summary
6. Append lifecycle entry (CandidateAccepted → Detected)

Lineage metadata

Every promoted finding carries _promotion_lineage in risk_breakdown:

  • candidate_id, connector_name, promoted_at
  • original_evidence_ids, reviewer, review_rationale

Non-mutation guarantees

candidate-findings.json NOT deleted or rewritten
Review decisions NOT rewritten
No auto-generated work packages or tickets
No auto-promotion (explicit only)

Tests: 3,400 passed, 7 skipped (+25 new)

Boundaries preserved

Promotion is explicit.
Promotion requires gate pass.
Candidate artifacts are preserved.
No work packages, tickets, or remediation auto-generated.

First mutation wave: promotes eligible candidates to accepted findings.
Requires v3.9.0 gate pass. Preserves candidate lineage. Append-only audit.

New module: src/pharabius/core/connectors/candidate_promotion.py
- promote_candidate(): explicit promotion with gate validation
- Lineage metadata in risk_breakdown (_promotion_lineage)
- Duplicate promotion guard (one promotion per candidate)
- Existing register preserved (appends, doesn't overwrite)
- Lifecycle history appended (CandidateAccepted → Detected)
- Summary recalculation after promotion

Promotion flow:
1. Check v3.9.0 gate (9 checks) — must all pass
2. Verify not already promoted
3. Convert CandidateFinding → DebtFinding with lineage
4. Append to existing debt-register.json
5. Recalculate register summary
6. Append lifecycle entry

Non-mutation guarantees:
- candidate-findings.json NOT deleted or rewritten
- Review decisions NOT rewritten
- No auto-generated work packages, tickets, or remediation
- No auto-promotion (explicit only)

25 new tests. 3,400 total (was 3,375).

Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com>
@gitwire-hq gitwire-hq Bot added the size/XL label Jun 7, 2026
@Alajmah
Alajmah merged commit 6cda842 into master Jun 7, 2026
5 checks passed
@Alajmah
Alajmah deleted the roadmap/v3.10.0-candidate-promotion-execution branch June 7, 2026 01:09
Alajmah added a commit that referenced this pull request Jun 13, 2026
First mutation wave: promotes eligible candidates to accepted findings.
Requires v3.9.0 gate pass. Preserves candidate lineage. Append-only audit.

New module: src/pharabius/core/connectors/candidate_promotion.py
- promote_candidate(): explicit promotion with gate validation
- Lineage metadata in risk_breakdown (_promotion_lineage)
- Duplicate promotion guard (one promotion per candidate)
- Existing register preserved (appends, doesn't overwrite)
- Lifecycle history appended (CandidateAccepted → Detected)
- Summary recalculation after promotion

Promotion flow:
1. Check v3.9.0 gate (9 checks) — must all pass
2. Verify not already promoted
3. Convert CandidateFinding → DebtFinding with lineage
4. Append to existing debt-register.json
5. Recalculate register summary
6. Append lifecycle entry

Non-mutation guarantees:
- candidate-findings.json NOT deleted or rewritten
- Review decisions NOT rewritten
- No auto-generated work packages, tickets, or remediation
- No auto-promotion (explicit only)

25 new tests. 3,400 total (was 3,375).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant