diff --git a/apps/edge/internal/openai/hot_path_light.go b/apps/edge/internal/openai/hot_path_light.go index 7c63117e..d510ca56 100644 --- a/apps/edge/internal/openai/hot_path_light.go +++ b/apps/edge/internal/openai/hot_path_light.go @@ -800,19 +800,13 @@ func (s *hotPathLightStore) matchRecordLocked(ownerEdgeID, principalRef, protoco var candidates []*hotPathLightRecord for _, record := range s.records { pendingRelated := record.pending != nil && (record.pendingHash == lineage.IssuedCallHash || hotPathPendingIDsIntersect(record, lineage.ResultIDs) || record.lineage == lineage.Prefix) - _, consumedHash := record.consumedHashes[lineage.IssuedCallHash] - if pendingRelated || consumedHash || hotPathConsumedIDsIntersect(record, lineage.ResultIDs) { + if pendingRelated { candidates = append(candidates, record) } } if len(candidates) == 0 { return nil, false, nil } - for _, record := range candidates { - if _, replay := record.consumedHashes[lineage.IssuedCallHash]; replay { - return nil, true, fmt.Errorf("light tool frontier replay rejected") - } - } for _, record := range candidates { if record.phase != hotPathPhaseCleanupPending || record.pendingKind != hotPathPendingCleanup || !hotPathPendingIDsIntersect(record, lineage.ResultIDs) { continue @@ -869,15 +863,6 @@ func hotPathPendingIDsIntersect(record *hotPathLightRecord, ids []string) bool { return false } -func hotPathConsumedIDsIntersect(record *hotPathLightRecord, ids []string) bool { - for _, id := range ids { - if _, ok := record.consumedIDs[id]; ok { - return true - } - } - return false -} - func (s *hotPathLightStore) commitLocal(requestID, ownerEdgeID string, output normalizedStageOutput, correlation hotPathStageCorrelation, coordinator *logicalRequestCoordinator) (hotPathLightDisposition, error) { if s == nil || coordinator == nil { return hotPathLightDisposition{}, fmt.Errorf("light flow is unavailable")