Skip to content

Log budget: declare and quiet the 4s /api/chat/revision poll (Chat UI extra red since #18143) - #18155

Merged
danielhanchen merged 1 commit into
mainfrom
ci-log-budget-chat-revision
Nov 17, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-log-budget-chat-revision

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

The Chat UI Tests (extra) declared-polls gate (tests/studio/playwright_declared_polls.py) fails on main since #18143 (seen on the staging run of #18075, an Ollama-only PR):

FAIL these paths are polled by the app but are not in the log budget:
  /api/chat/revision   8x within one dwell (~38.4/min)

Cause

#18143 added cross-device chat sync: remote-history-watch.ts polls GET /api/chat/revision every REMOTE_HISTORY_POLL_MS (4 s) while the page is visible. Every polled path has to be declared in the log budget and given a log class, otherwise each hit writes an access line (here about 15 lines a minute per open tab, also mirrored into the desktop log). The feature is right; the two declarations were missed.

Fix

  • studio/backend/tests/log_budget/session.py: "/api/chat/revision": (4.0, "declared") in IDLE_POLLS, with the call site named.
  • studio/backend/loggers/handlers.py: /api/chat/revision in _QUIET_SUCCESS_PATHS. A 2xx read only carries a revision number; when it changes, the thread fetch that follows still logs, and a failed read (non-2xx) still logs.

Verification

  • tests/test_log_budget.py plus the access-log handler tests: 83 passed.
  • The unit-side closure check holds both halves together: with the handler class but without the IDLE_POLLS entry, TestClassificationClosure::test_every_classified_path_is_in_a_scenario fails.
  • The Playwright gate reads IDLE_POLLS / BUSY_POLLS (declared = set(ALL_POLLS)), so the path it reported is now declared.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T14:14:28.127197Z 3f08928 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 3f0892897c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 09a9b97 into main Nov 17, 2026
@danielhanchen
danielhanchen deleted the ci-log-budget-chat-revision branch November 17, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant