refactor(chunker): drop redundant TierRecursive
TierRecursive and TierLegacy both invoked SplitText with identical output, but only TierLegacy got the "always-return-on-validation-failure" safety-net behavior. Auto chains thus ran SplitText twice on the fallback path and produced two-line debug rejection traces with the same reason. Inline TierRecursive into TierLegacy: SelectStrategy and the explicit StrategyRecursive entry point now emit single-legacy chains. The StrategyRecursive public constant stays so existing ChunkingConfig rows keep parsing — it's just an alias for legacy now. No user-visible behavior change; one fewer SplitText call per failed auto fallback.
This commit is contained in:
@@ -144,8 +144,8 @@ func TestSelectStrategy_PlainDoc(t *testing.T) {
|
||||
doc := "just a paragraph of plain text without any structure indicators at all here"
|
||||
p := ProfileDocument(doc)
|
||||
chain := SelectStrategy(p)
|
||||
if chain[0] != TierRecursive {
|
||||
t.Errorf("expected recursive tier first for unstructured doc, got %v", chain)
|
||||
if chain[0] != TierLegacy {
|
||||
t.Errorf("expected legacy tier first for unstructured doc, got %v", chain)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user