Hardened the proposal modules to skip malformed proposals rather than hard failing the entire run
All checks were successful
ci/woodpecker/tag/release Pipeline was successful

This commit is contained in:
2026-05-17 07:19:24 -05:00
parent a84941d681
commit 9c2d8338d7
17 changed files with 436 additions and 137 deletions

View File

@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
LLMClient: req.LLMClient,
Scheduler: req.LLMScheduler,
DiagnosticsDir: req.DiagnosticsDir,
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
if req.OnDroppedCandidate == nil {
return
}
req.OnDroppedCandidate(
dropped.ProposalIndex,
dropped.TargetSegmentID,
dropped.OriginalText,
dropped.CorrectedText,
dropped.Confidence,
dropped.ReasonCode,
dropped.Message,
)
},
})
if err != nil {
return nil, err

View File

@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
LLMClient: req.LLMClient,
Scheduler: req.LLMScheduler,
DiagnosticsDir: req.DiagnosticsDir,
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
if req.OnDroppedCandidate == nil {
return
}
req.OnDroppedCandidate(
dropped.ProposalIndex,
dropped.TargetSegmentID,
dropped.OriginalText,
dropped.CorrectedText,
dropped.Confidence,
dropped.ReasonCode,
dropped.Message,
)
},
})
if err != nil {
return nil, err

View File

@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
LLMClient: req.LLMClient,
Scheduler: req.LLMScheduler,
DiagnosticsDir: req.DiagnosticsDir,
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
if req.OnDroppedCandidate == nil {
return
}
req.OnDroppedCandidate(
dropped.ProposalIndex,
dropped.TargetSegmentID,
dropped.OriginalText,
dropped.CorrectedText,
dropped.Confidence,
dropped.ReasonCode,
dropped.Message,
)
},
})
if err != nil {
return nil, err

View File

@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
LLMClient: req.LLMClient,
Scheduler: req.LLMScheduler,
DiagnosticsDir: req.DiagnosticsDir,
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
if req.OnDroppedCandidate == nil {
return
}
req.OnDroppedCandidate(
dropped.ProposalIndex,
dropped.TargetSegmentID,
dropped.OriginalText,
dropped.CorrectedText,
dropped.Confidence,
dropped.ReasonCode,
dropped.Message,
)
},
})
if err != nil {
return nil, err