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:
wizardchen
2026-05-06 20:19:42 +08:00
committed by lyingbug
parent 2f86e5b13d
commit 6efe781a50
3 changed files with 13 additions and 11 deletions
@@ -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)
}
}