Skip to content

fix: bound diagnostics and stabilize large-history refreshes - #124

Merged
Carl723000 merged 24 commits into
mainfrom
codex/v2.4.1-performance-hotfix
Oct 3, 2026
Merged

Carl723000 merged 24 commits into
mainfrom
codex/v2.4.1-performance-hotfix

Conversation

@Carl723000

@Carl723000 Carl723000 commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Bound unknown-model warnings, diagnostics, pricing downloads, aggregation labels and background result queues; add explicit prices for Opus 5.5, Sonnet 5.5 and current GPT-6 models.
  • Reuse unchanged Claude/Codex dashboard data and accepted sharing previews. Today attribution has a single calendar-day cache: minute polls within an hour avoid repeated history scans, while hourly Content attribution still recomputes once.
  • Reject retired asynchronous results after source changes, price refresh, clear or disposal. Temporary failures retain verified data only for the same source.
  • Improve preview/export validation, paused refresh, work progress, directory recovery and ordinary defaults reset. Upgrades preserve legacy BYOK protocol semantics; ordinary defaults reset does not delete a key.
  • Preserve provider-specific token, cache, price and quota meanings. Collection remains read-only, with no new permissions or automatic AI traffic.

Related to #122 and #99. Builds on the merged #119, #120 and #121 contributions; thanks @rsyuzyov.

Validation

  • Node: 1,255 passed, 1 filesystem-fixture skip, 0 failures.
  • Full Chromium Webview suite: 194 passed.
  • Remote CI: Node Tests, UI Test and Release Package all pass on the exact PR head.
  • 120,000 synthetic records with default-on content analysis: minute polls read no log bodies, repeat no attribution, rebuild no hidden history and replace no document; accepted previews remain usable. The hour-crossing regression verifies one Content week computation, then reuse on the following minute.
  • The frozen candidate passes package safety checks. All 89 production JS files match the tested output and the runtime independently reviewed in Claude Desktop, byte for byte.
  • Failure-driven regressions cover source/pricing races, legacy-format migration and cache release.

Acceptance and limits

Native macOS installed-VSIX interaction and actual F5 Extension Development Host acceptance are still pending, so this PR starts as a draft.
Synthetic scale checks, Chromium and module tests do not establish that every instance of the reporter's native Windows OOM is eliminated.
Merge only after remote CI and native acceptance pass. This PR does not publish a release; the maintainer reviews the release draft and clicks Publish.


🤖 Generated with OpenAI Codex

rsyuzyov and others added 24 commits September 30, 2026 01:07
`getModelPricing` is called for every usage record, and a model missing from
the table printed its fallback warning on every call. On a live history with a
model newer than the table (`claude-opus-5-5`) that was ~91k console lines for
one full index build and ~27k for a refresh that re-read a few large files. In
the extension host the console write is the expensive part: in a CPU profile of
refreshes it cost more than the pricing lookup itself.

The fallback is deterministic per model name, so the first line says everything
the repeats did. A runtime override that later adds the model is checked before
the fallback is reached, so nothing needs resetting.

Test: `an unknown model is reported once, not once per priced record` — fails on
the parent commit (6 warnings instead of 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0ff1d30)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 4e8ade5)
…99)

Measured on a 979-file history with several agents appending: the append fast
path never ran. Every refresh reported 53 analysis payload rebases, and any
payload rebase disables `fastAppendAnalysis`, so each tick of a few kilobytes
paid the slow path — rebuilding the seen-UUID set over the whole history.

The 53 files are the ones whose every event is older than the window. On each
refresh the cutoff moves, `rebaseFileAnalysisCutoff` takes the "last event is
before the cutoff" branch and returns a fresh `newAnalysisAcc`. The payload is
empty before and after, but `sameAnalysisPayload` compares collections by
identity (by design: a metadata-only rebase keeps them), so every such file
reads as changed on every refresh, for good.

That branch is now taken only when the last event has just left the window
(`last >= prior.analysis.cutoffMs`). A file that was already past the previous
cutoff is empty already — `analyzeLine` ignores lines older than the cutoff —
and falls through to the metadata-only rebase, keeping its collections.

On the same history: `payloadRebases` 53 -> 0 on every refresh.

Test: `a file already outside the window keeps its empty contribution as the
window drifts` — it fails on the parent commit ("Values have same structure but
are not reference-equal") and asserts the analysis equals the full loader's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2eccff1)
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Use verified GPT-6.1 Sol, GPT-6 Sol/Luna and Sonnet 5.5 rates. Bound remote catalog bytes, entries, lifetime and concurrency; preserve the previous catalog on failure and reject prototype lookups.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Preserve numeric usage with unpriced malformed model labels, protect analysis maps against prototype keys, copy aggregate buckets once per transaction, and release Claude refresh gates after UI errors. Remove legacy per-line diagnostics and backpressure out-of-order Codex results.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Keep exact preview/export boundaries, preserve keys and verified usage, expose truthful backfill state, and cache unchanged panels with bounded lifetimes. Add host and Chromium regressions.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
…isions

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Preserve bounded per-host pricing warnings while incorporating #119, #120 and #121.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Preserve verified same-source index work across presentation changes without delivering a retired UI snapshot.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
… clocks

Document the reviewed migration, attribution cache, source and pricing fences in every README and bilingual architecture.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Keep calendar-day attribution separate from live countdown presentation and cover real clock advancement in coordinator and scale regressions.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the fix Patch — bug fix label Oct 2, 2026
@Carl723000
Carl723000 marked this pull request as ready for review October 3, 2026 06:23
@Carl723000
Carl723000 requested a review from jack21 as a code owner October 3, 2026 06:23
@Carl723000
Carl723000 merged commit 298b2e1 into main Oct 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Patch — bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants