From 20c2705623363de0fb02c32b71074ac8ebf34b23 Mon Sep 17 00:00:00 2001 From: esengine <359807859@qq.com> Date: Fri, 6 Nov 2026 22:49:20 -0800 Subject: [PATCH] chore: clear the unused agent symbols and the two lines App.tsx is over its ceiling These block every push through lint and make check; none of them changes behaviour. --- desktop/frontend-next/src/ui/App.tsx | 2 -- .../runtime/agent/compact_longhorizon_test.go | 8 -------- .../runtime/agent/compaction_budgets_test.go | 8 -------- internal/runtime/agent/kept_projection_test.go | 2 -- internal/runtime/agent/output_budget.go | 10 ---------- internal/runtime/agent/projection_test.go | 17 ----------------- 6 files changed, 47 deletions(-) diff --git a/desktop/frontend-next/src/ui/App.tsx b/desktop/frontend-next/src/ui/App.tsx index 6948d260cf..fcc80a96ad 100644 --- a/desktop/frontend-next/src/ui/App.tsx +++ b/desktop/frontend-next/src/ui/App.tsx @@ -171,7 +171,6 @@ export function App({ hub }: { hub: HubPort }) { // on every usage round, and handing the sidebar that would rebuild a tree of // a few hundred sessions each frame — which is what its memo is there for. const liveIds = useCallback((ids: string[]) => ids.filter((id) => runsRef.current[id]?.live), []); - const { listedIds, noteReport } = useLiveGrace(runsRef, runs); const onReport = useCallback((id: string, next: PaneReport) => { @@ -195,7 +194,6 @@ export function App({ hub }: { hub: HubPort }) { useEffect(() => { setReport(reportsRef.current[active] ?? NO_REPORT); }, [active]); - const paging = useMemo( () => ({ more: (root) => treeWindow.grow(root, readTree), diff --git a/internal/runtime/agent/compact_longhorizon_test.go b/internal/runtime/agent/compact_longhorizon_test.go index 948005cacc..903adec021 100644 --- a/internal/runtime/agent/compact_longhorizon_test.go +++ b/internal/runtime/agent/compact_longhorizon_test.go @@ -107,14 +107,6 @@ func horizonSession(c retrievalCarrier, turns int) (*sessionstore.Session, int) return &sessionstore.Session{Messages: msgs}, at } -// growSession adds another generation's worth of foldable work. -func growSession(a *Agent, gen int) { - for i := range 6 { - a.sess.conversation.Add(provider.Message{Role: provider.RoleAssistant, Content: strings.Repeat("word ", 400)}) - a.sess.conversation.Add(provider.Message{Role: provider.RoleUser, Content: fmt.Sprintf("gen %d step %d", gen, i)}) - } -} - func hitRank(res tool.RecallResult, want int) int { for i, h := range res.Hits { if h.Position == want { diff --git a/internal/runtime/agent/compaction_budgets_test.go b/internal/runtime/agent/compaction_budgets_test.go index b2a8ffb5a9..4a0f5bdbe2 100644 --- a/internal/runtime/agent/compaction_budgets_test.go +++ b/internal/runtime/agent/compaction_budgets_test.go @@ -36,11 +36,3 @@ func TestLargeFixedPrefixDoesNotRefuseCompaction(t *testing.T) { t.Fatalf("compaction refused a prefix that fits: %v", err) } } - -func shortText(chars int) string { - b := make([]byte, chars) - for i := range b { - b[i] = 'x' - } - return string(b) -} diff --git a/internal/runtime/agent/kept_projection_test.go b/internal/runtime/agent/kept_projection_test.go index fd227eeebb..aadac6c666 100644 --- a/internal/runtime/agent/kept_projection_test.go +++ b/internal/runtime/agent/kept_projection_test.go @@ -8,8 +8,6 @@ import ( "reasonix/internal/contract/provider" ) -const testGoalBlock = "\nship the parser\n\nGoal mode: pursue this goal autonomously.\n" - // The newest block of each variant survives; older ones of that same variant go. // A short reminder and the full statement it points at are different variants, // so the reminder must never displace the contract. diff --git a/internal/runtime/agent/output_budget.go b/internal/runtime/agent/output_budget.go index ca47677dab..097e654481 100644 --- a/internal/runtime/agent/output_budget.go +++ b/internal/runtime/agent/output_budget.go @@ -176,16 +176,6 @@ func (s requestCalibrationShape) plus(o requestCalibrationShape) requestCalibrat } } -func (s requestCalibrationShape) minus(o requestCalibrationShape) requestCalibrationShape { - return requestCalibrationShape{ - requestChars: s.requestChars - o.requestChars, - compactChars: s.compactChars - o.compactChars, - cjkRunes: s.cjkRunes - o.cjkRunes, - cjkBytes: s.cjkBytes - o.cjkBytes, - imageTokens: s.imageTokens - o.imageTokens, - } -} - // messageCalibrationShape counts one message's shared-window text plus only the // replay fields the active provider declares, keeping omitted bytes out of the // ratio. It is additive: requestCalibrationShapeWithPolicy is this sum over a diff --git a/internal/runtime/agent/projection_test.go b/internal/runtime/agent/projection_test.go index 5486f61119..00aa4da717 100644 --- a/internal/runtime/agent/projection_test.go +++ b/internal/runtime/agent/projection_test.go @@ -193,23 +193,6 @@ func TestCompactToProjectionLeavesCanonicalIntact(t *testing.T) { } } -func earlyUserPrefix(msgs []provider.Message) string { - var b strings.Builder - for _, m := range msgs { - if m.Role == provider.RoleSystem { - continue - } - if isCompactionSummary(m) { - break - } - if m.Role == provider.RoleUser { - b.WriteString(m.Content) - b.WriteByte('\n') - } - } - return b.String() -} - // Checkpoint installation no longer writes archive copies — the canonical // transcript is the lossless store. ArchiveDir misconfiguration must not block // a successful summary install.