fix: Jev legs no longer take stage headlines
Merged
BE
2mo ago+115+115+012345678901234567890123456789-50-50-01234567890123456789
Summary
foldAuxTokenslet a Jev leg claim the bucketModel/Provider— the UI labeled a mostly-LLM stagejev-1.13.0.- Non-Jev legs now take the headline from a Jev holder; Jev labels a bucket only when it did all the work.
- Same rule applied to the
MergeStageTokenEntrySQL merge and therecordIntentTokens/recordConventionTokensrestamps.
Test plan
-
TestFoldAuxTokens_MixedBucketSemanticsupdated: non-Jev leg auto-promotes over Jev headline; Jev cannot steal it back -
go build ./... && go vet ./... && go test ./internal/pipeline/ ./internal/store/...green
Summary by cubic
Jev legs no longer take stage headline labels when a bucket also carries LLM spend; Jev labels a bucket only when it did all the work.
- Non-Jev legs now take the headline from a Jev holder across
foldAuxTokens, theMergeStageTokenEntrySQL merge, and therecordIntentTokens/recordConventionTokensrestamps. - The SQL merge only promotes the incoming model when the entry carries model-bearing spend, matching the zero-spend early return in
foldAuxTokens. - Updates
TestFoldAuxTokens_MixedBucketSemanticsto cover auto-promotion, prevent Jev from reclaiming the headline, and check Provider alongside Model.