Repository navigation
refactor(ui): remove duplicate progress Markdown cache - #174831
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1ad31c293
ℹ️ 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".
| if (!strict) { | ||
| prepareOpenAIFunctionTool(descriptor.name, descriptor.description, parameters, undefined); | ||
| } | ||
| normalizeOpenAIStrictToolParameters(descriptor.parameters, strict, compat); |
There was a problem hiding this comment.
Add benchmark evidence before removing agent caches
This performance-affecting refactor removes the cached OpenAI descriptor preparation here, as well as other agent-runtime result caches, without before/after timing and RSS measurements. Repeated tool preparation or transcript-policy resolution may therefore increase turn CPU or latency without evidence that the removed bookkeeping offsets it; benchmark a representative repeated-turn workload before accepting these removals.
AGENTS.md reference: src/agents/AGENTS.md:L5-L9
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR removes redundant result caches and their invalidation plumbing while retaining canonical file, schema, routing-index, pricing, and Markdown owners. Example: A session loads workspace AGENTS.md containing “Use concise replies” on consecutive turns.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored PR open: the cache removals form a coherent simplification, and source review found no concrete introduced bug; one CI failure still needs attribution. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherThese helpers turn workspace files, routing inputs, tool schemas, transcript records, and progress Markdown into agent context, provider requests, session routes, and rendered output. flowchart TD
A[Workspace and request inputs] --> B[Canonical readers and indexes]
B --> C[Direct result construction]
C --> D[Agent context and session routes]
C --> E[Provider request descriptors]
F[Progress Markdown] --> G[Canonical sanitizer and mounted memo]
Technical reviewBest possible solution: Retain the direct-result simplification and canonical caches, then settle the unrelated-versus-introduced CI attribution before landing. Do we have a high-confidence way to reproduce the issue? This PR reports redundant internal work rather than a product bug; source inspection confirms the duplicated cache layers, and no target code was executed. Is this the best way to solve the issue? Direct construction is a reasonable simplification because expensive canonical caches remain and the maintainer explicitly accepts the lost small-result reuse. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b461dc69d67d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -364, Tests -183, Other -2. Total -549 across 35 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 7:51 PM ET / 23:51 UTC. |
f1ad31c to
58cf0b2
Compare
|
@clawsweeper re-review The branch and proof are current at |
|
🦞👀 Re-review progress:
|
|
Landing evidence for exact reviewed head Exact-head CI run 38990792648 completed successfully. All check runs for this head were enumerated: no failing checks; the CI aggregate, security-fast, UI/E2E/performance, lint, types, architecture and baseline ratchets passed. Three cancelled auto-response jobs (117272712784, 117272709109, 117272698537) are superseded metadata automation, with successful same-head auto-response jobs including 117272864342. They contain no missing test suite. Other skips are scope-selected or nonapplicable automation. No CI rerun or green-chasing push was used. Focused proof: 58 passing UI/card/locale/sanitizer tests with serial workers and isolated state; original independent scoped-clean review reused for unchanged cache-removal hunks and mechanical forwarding-helper inline. Local lint/types/suppression/cycle attempts exhausted external host-load budgets without results and are not claimed as passes; exact-head hosted gates supply broad proof. The original wider candidate failed the prepared-owner LRU fork-count test. It was not attributed as inherited. Inconclusive serial replays led to campaign-rule-8 removal of the entire reachable core slice and its dependent companions. Those hunks remain on Coordinator-authorized rule-10 infrastructure fallback: the first native initialization refused materialized dependency-version drift. The supported separate tooling root resolved that prerequisite. The later native review-init lost its synchronous tool/controller session during an execution-service interruption; its supervisor disappeared and an orphaned wrapper/Git scan remained with no recoverable completion result. Those exact task-owned remnants were terminated and verified drained. Intentional earlier cancellations are not counted as failures. No retained native merge intent exists, and the PR remains OPEN/MERGEABLE at the exact head above. The native initialization/recovery artifacts are preserved rather than fabricated or cleared. Using the authorized SHA-guarded squash API after these two infrastructure failures. This bypasses broken native orchestration, not CI, security, or review gates. |
Problem and change
Progress cards kept a second 16-entry Markdown cache above the canonical sanitized-Markdown cache. Remove that Map, its locale/key/eviction plumbing, and the now-redundant forwarding helper. The mounted Solid memo calls the canonical sanitizer with the same progress-bar option. Sanitization, locale refresh, DOM retention, markup, and accessible output stay owned by their existing implementations.
Net production LOC: 20 removed across two production files (6 additions, 26 deletions). One test loses 24 lines that mocked renderer call counts for the removed mechanism; output/accessibility/locale coverage remains. Whole diff: 3 files, 6 additions, 50 deletions. No benchmark speedup claim or intended visual change.
Solid structure stays unchanged: one mounted memo and one effect; no added signals, listeners, controllers, or rendering owners. The outer Map goes from one to zero.
Best-effort tradeoffs accepted
CI-driven scope reduction
The original head f1ad31c removed 364 production lines. Run 38982034436 passed 72 jobs but failed
checks-node-changed-compact-small-1: unchangedruntime-llm.prepared-owner.test.ts,keeps completion ownership coherent: lru, expected two registry forks and observed three. The CI gate failed downstream. Registry-build reuse remained eleven before/after; this is not evidence of catalog rebuilding.No matching signature was established in the coordinator's main-flake ledger or six completed scheduled-main runs. Serial replay of the exact tested merge d8ee40ac42c1ce84b4138ab270d1164818a0cf2a and its main parent 2badc68 produced no test result during cold preparation under host load. Neither is a passing replay or inherited-failure attribution.
Following campaign rule 8, all 21 changed core production files reachable through the failing test's runtime-import graph, and their 12 test/support/baseline companions, have been removed from this PR. The independent UI slice remains. The original candidate is preserved on
deslop/z27-parked-lru-attribution-20261015(no PR); the parked core slice removes 346 production lines and needs conclusive fork-count proof before revival. No assertion, timeout, retry, skip, or suppression was weakened. The replacement starts from main b0ab440 for this named-gate narrowing, not merely to chase green.Proof
Fresh focused UI-card, locale/DOM-retention and sanitizer tests passed: 58 tests across three files, serial workers, isolated state. Wall time was 636.11 seconds on a host reporting load around475; the two test shards reported305.32 and162.44 seconds. No timeout, retry, skip, assertion, or fixture was loosened. Formatting passed. Correctly scoped lint and the suppression ratchet each reached a300-second external proof budget without diagnostics/case results: unfinished local proof, not passes or product attribution. UI-package types and cycle-check attempts remain serially active; exact replacement-head PR CI is the broad gate. The existing independent scoped-clean P2 review covers the unchanged cache-removal hunks; the sole forwarding helper was mechanically inlined and verified by source inspection and the fresh tests. No new review verdict is claimed for the cancelled duplicate capture. Original-head CI does not qualify the replacement head.
Exact replacement-head CI run 38990792648 completed successfully at
58cf0b2cd3c7a1aa4f180cff28eb2ee4970488d6, including UI tests, UI E2E, performance, lint, production/test types, architecture and baseline ratchets, andopenclaw/ci-gate. Local UI types and both cycle attempts also exhausted their external proof budgets without results; these are not claimed as passes. The hosted exact-head gates supply broad proof. Three cancelled auto-response jobs were superseded by successful same-head auto-response jobs; they are metadata automation, not missing test-suite proof. Scope-selected jobs were skipped as planned.The earlier local suppression-ratchet failure was unchanged at its baseline (
sqlite-memory-search-fragments.ts,oxc/no-map-spread); both original-head and replacement-head hosted baseline-ratchets passed. No new suppression or baseline allowance is introduced. Phase E standalone session memory and its factory, registry, expiry, federation, and tests remain untouched.