Bind runner assessment and propagate fallback reuse eligibility

This commit is contained in:
2026-11-21 23:48:51 +00:00
parent 44e4fb92c2
commit 923cbe594f
19 changed files with 852 additions and 902 deletions

View File

@@ -191,9 +191,11 @@ type ChunkRequest struct {
}
type ChunkPlanResult struct {
Outcome ProducerOutcome `json:"outcome"`
Plan source.ChunkPlan `json:"plan"`
Diagnostics []ProducerDiagnostic `json:"diagnostics,omitempty"`
// Fallback is an optional module-owned algorithm for deterministic rejection.
Fallback func(context.Context) (source.ChunkPlan, error) `json:"-"`
Outcome ProducerOutcome `json:"outcome"`
Plan source.ChunkPlan `json:"plan"`
Diagnostics []ProducerDiagnostic `json:"diagnostics,omitempty"`
}
type Chunker interface {

View File

@@ -46,6 +46,8 @@ type TypedExtractionRequest[T any] struct {
}
type TypedExtractionResult[T any] struct {
// Fallback is an optional module-owned algorithm for deterministic rejection.
Fallback func(context.Context) (T, error) `json:"-"`
Outcome ProducerOutcome
Value T
Diagnostics []ProducerDiagnostic
@@ -70,6 +72,7 @@ type TypedMergeRequest[T any] struct {
}
type TypedMergeResult[T any] struct {
Fallback func(context.Context) (T, error) `json:"-"`
Outcome ProducerOutcome
Value T
Diagnostics []ProducerDiagnostic
@@ -93,6 +96,7 @@ type TypedNormalizeRequest[T any] struct {
}
type TypedNormalizeResult[T any] struct {
Fallback func(context.Context) (T, error) `json:"-"`
Outcome ProducerOutcome
Value T
Diagnostics []ProducerDiagnostic