Skip to content

Stabilize provider telemetry polling (codex) - #2360

Merged
numnx merged 1 commit into
feature/CODUX-142-qs-code-quality-performance-audit-6from
task/feature-codux-142-qs-code-quality-performance-au-t05-codex-mr9j5ooy
Jul 6, 2026
Merged

Stabilize provider telemetry polling (codex)#2360
numnx merged 1 commit into
feature/CODUX-142-qs-code-quality-performance-audit-6from
task/feature-codux-142-qs-code-quality-performance-au-t05-codex-mr9j5ooy

Conversation

@numnx

@numnx numnx commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Stabilize provider telemetry polling

Automated task PR opened by Code UX for T05.

📋 Summary

Sprint: Sprint 142 · QS: Code Quality & Performance Audit · Task: T05

Audit and improve Code UX quality and performance by tightening existing hot-path contracts across live snapshots, execution projection, provider telemetry, dashboard render derivation, repository boundaries, MCP validation, guardrails, and documentation.

📝 Full Task Prompt
## Objective
Make `ProviderTelemetryWatcher` cheaper and more reliable during long-running CLI provider invocations by tightening metadata-first polling and failure handling.

## Scope
- Edit `src/infrastructure/providers/cli/provider-telemetry-watcher.ts`
- Edit `tests/backend/infrastructure/providers/cli/provider-telemetry-watcher.test.ts`
- Verify compatibility with `src/infrastructure/providers/cli/provider-runner.ts` read-only unless wiring tests require a small typed option adjustment
- Update `docs/architecture/code-quality-performance-contracts.md` provider telemetry section if the polling/backoff contract changes

## Implementation Requirements
1. Extract small private helpers inside `provider-telemetry-watcher.ts` for provider-specific pre-read metadata resolution, full-read input collection, and temporary Antigravity database lifecycle so the loop is easier to reason about and test.
2. Add a bounded failure backoff so repeated metadata/read failures do not warn every 1.5 seconds indefinitely, while still recovering immediately once source signatures change or reads succeed.
3. Ensure pre-read signatures prevent full transcript/database reads when stdout, stderr, native session id, and provider metadata are unchanged for Codex, Claude Code, Qwen Code, and Antigravity.
4. Extend tests to prove unchanged metadata skips full reads, repeated failures are rate-limited, success resets failure state, and `stop()` removes any temporary Antigravity DB path.

## Constraints
- Preserve final authoritative usage collection semantics outside the live watcher.
- Do not change normalized telemetry fields or persisted usage totals.
- Do not redact or drop structured telemetry log fields already used for diagnostics.
- Avoid changes to provider log parsers in this task unless a test exposes an incompatible watcher assumption.

## Verification
- Run `pnpm exec vitest run tests/backend/infrastructure/providers/cli/provider-telemetry-watcher.test.ts`.
- Run `pnpm run lint`.
- Success means tests demonstrate fewer unnecessary full reads and bounded warning behavior without changing emitted telemetry content.

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-06 18:05:05 UTC
Finished 2026-07-06 18:16:11 UTC
Duration 11m 6s

📊 Token Usage

Metric Value
Input tokens 152,663
Cached input tokens 2,357,376
Output tokens 23,464
Total tokens 2,533,503
Invocations 1
Tool calls 58
Active time 10m 5s

Included usage estimate (subscription/local login): $2.65

🌿 Branch Info

Base: feature/CODUX-142-qs-code-quality-performance-audit-6
Head: task/feature-codux-142-qs-code-quality-performance-au-t05-codex-mr9j5ooy


🤖 Generated by Code UX

@numnx
numnx merged commit 1488f4c into feature/CODUX-142-qs-code-quality-performance-audit-6 Jul 6, 2026
6 checks passed
@numnx
numnx deleted the task/feature-codux-142-qs-code-quality-performance-au-t05-codex-mr9j5ooy branch July 6, 2026 18:19
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