Repository navigation
refactor: remove inert lifetime and metadata plumbing - #177294
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. |
|
Codex review: needs changes before merge. What this changesThis PR removes redundant cancellation, cleanup, admission, and metadata-publication plumbing across core, plugins, and the Control UI. Example: The Gateway rebuilds its catalog after signing out of the provider serving openai/gpt-5.4.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-authored cleanup preserves the active lifecycle owners and explicitly accepts descriptive metadata staleness; no actionable introduced defect was found, but the draft has confirmed merge conflicts. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin workers, provider transports, and Gateway catalog services consume requests and lifecycle signals; their existing owners retain execution, cancellation, authorization, and settlement while UI stores cache descriptive results. flowchart TD
A[User requests and change events] --> B[Gateway authorization]
B --> C[Catalog and session owners]
C --> D[Control UI display caches]
A --> E[Plugin and transport lifecycle owners]
E --> F[Network and worker operations]
F --> G[Owned cleanup and settlement]
Technical reviewBest possible solution: Keep active cancellation, FIFO admission, settlement, and authorization with their existing owners while removing redundant plumbing under the documented best-effort display policy. Do we have a high-confidence way to reproduce the issue? This is a cleanup proposal rather than a bug report; source inspection confirms the inert worker signal and redundant owners, and no target code was executed. Is this the best way to solve the issue? The simplification uses existing lifecycle and cache owners without adding parallel production machinery; the changed display chronology is expressly accepted by the maintainer author. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 55bc065d06fb. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -505, Tests +29. Total -476 across 58 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 19, 2026, 8:06 AM ET / 12:06 UTC. |
4025fee to
36c1c17
Compare
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36c1c17cbd
ℹ️ 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".
| publishModelCatalogResult(read, params, result); | ||
| } | ||
| // Catalog changes during a read are best effort until the next refresh. | ||
| publishModelCatalogResult(read, params, result); |
There was a problem hiding this comment.
Prevent older catalog reads from overwriting a refresh
When a normal catalog request is in flight and a forced refresh starts, the two requests use different keys and may complete out of order. If the refresh publishes first, this unconditional publication lets the older normal request publish afterward and replace the refreshed models indefinitely; the previous retirement check prevented that. Preserve a request generation/retirement fence so a pre-refresh response can settle its callers without overwriting the newer result.
AGENTS.md reference: ui/AGENTS.md:L16-L19
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is the best-effort display-freshness tradeoff explicitly accepted in this cleanup, rather than an unintentional lost fence. A same-client ordinary metadata response can overwrite a newer forced response until the next refresh or restart. The original fence's #174812 evidence is held mock replies and intermittent CI; no human actual-use incident requiring that chronology guard was identified. Forced discovery remains a separate real request, connection clearing still cancels pending intents, and account/session partitioning plus current disclosure/execution authority remain enforced. Reintroducing the generation/retirement machinery would restore the exact speculative display-only protocol this PR intentionally removes. No change is planned for this finding.
|
Merged via squash.
|
Keep configured model refs owned by model visibility policy after #177294 removed the separate metadata fingerprint. Keep the internal Doctor advisory fixture and Telegram assertions private, and remove the orphaned inspection table from #177279. Production advisory publication and display remain intact.
Follow the best-effort metadata contract from #177294 while retaining exact request-sharing, completion-order, follower-publication, and subsequent-refresh assertions.
* refactor: remove inert lifetime and metadata plumbing * test(ui): await search config fixture readiness
Keep configured model refs owned by model visibility policy after openclaw#177294 removed the separate metadata fingerprint. Keep the internal Doctor advisory fixture and Telegram assertions private, and remove the orphaned inspection table from openclaw#177279. Production advisory publication and display remain intact.
Follow the best-effort metadata contract from openclaw#177294 while retaining exact request-sharing, completion-order, follower-publication, and subsequent-refresh assertions.
What Problem This Solves
Several independent internal paths carry inert cancellation signals, duplicate cleanup or read-only publication custody beyond the owner that does the real work. The extra state makes native cancellation, FIFO admission and physical settlement harder to see.
User Impact
No features, DOM/CSS, config keys or command surfaces change. Descriptive model metadata can remain stale during catalog/config churn until refresh or restart; current execution and disclosure authority remain enforced.
Why This Change Was Made
Remove the never-aborted Team Reports collection signal tree while preserving the native runner's actual stop/deadline and admitted SQLite/LLM settlement. Remove duplicate Nextcloud staged-media cleanup, an unused injection early-release latch, inert lane/compaction controllers, and manual parent-signal relays already expressible with native composition. Discord keeps physical listener capacity/settlement without an unobserved observer deadline. WebSocket insertion uses one empty-cache check; catalog admission uses the existing FIFO permit owner.
Read-only model metadata now follows the campaign's explicit best-effort policy during catalog/config churn. Remove request retirement/transport barriers in the UI and captured config/auth/plugin identity comparisons around a rendered Gateway fallback. Keep exact request/account/session partitioning, real forced discovery, connection-clear cancellation, bounded caches, and current requester/operator/effect authority. Reuse the shared avatar Blob reader and mutate only the captured slash-command cache entry.
Net production LOC: 503 removed across 32 production files, against merge base 13d2ead after conflict-only rebase; tests, fixtures, test support, generated files and declarations excluded. No config keys, persisted shapes, protocol, dependencies or public SDK contract changes. The standalone Phase E session-memory backend, its factory/registry/expiry/federation machinery and tests are untouched.
Best-effort tradeoffs accepted
Evidence
Independent review of the complete final candidate was scoped-clean through P2. Core focused proof completed339 passing/1 failing across24 files, with completed compiled generation verified. Extension focused proof passed568tests/23files across6 selected shards, with completed generation verified. The first UI batch passed286tests and failed6 across18files (both browser files/27tests passed). Three test expectations retained removed display-transport barriers; three fixture migrations awaited catalog delivery instead of the model-control's applied preference/runtime/hosted state. Updated only those observation expectations/waits, preserving all kept result/authority assertions. Focused rerun of all six failing owners and two direct model-control sibling suites passed206tests/8files; these overlap the initial batch and are not additional unique coverage.
All three targeted production-root typechecks passed. Core type-aware lint, extension focused lint/boundary guards and UI lint passed. Runtime cycles:0; Madge cycles:0. PR-wrapper/eager-runtime closure checks passed. Formatting completed after a test-only import-layout correction; diff whitespace check passed.
Conflict-only rebase retained main's shared Search fixtures and moved the removed catalog-settlement await into that shared owner. The configuration fixture uses its existing waitForRefresh option to await rendered readiness, preserving every assertion. Rebased UI production-root types passed; affected four unit files passed102tests, general Search browser passed16tests, and the repaired configuration browser passed9tests. No production hunk changed during conflict resolution. Final rebase focused lint and formatting passed; runtime and Madge cycle counts are both0; the full suppression audit passed all14tests (34.1seconds wrapper wall time).
Historical pre-rebase proof encountered an unchanged production-suppression baseline mismatch: ui/src/e2e/chat-managed-media-order.test-support.ts typescript/unbound-method count2 was absent from the97-entry allowlist. The exact98-versus97 signature was recorded open in the coordinator main-flakes ledger and scheduled-main runs39232001367 and39238273501 (the latest six completed scheduled runs were inspected). Neither source nor allowlist is changed by this PR. The final rebased audit now passes all14tests; no current suppression failure, added suppression or baseline exception is claimed. Hosted exact-head CI remains the gate.
Investigated local failure: the unchanged cached-WebSocket caller-retention test at line144 retained
{turn:1}after its unowned control was collected. One serial two-file head/exact-clean-b8 baseline comparison reproduced the identical failure on BOTH sides, each45PASS/1FAIL, using the same pinned runtime, one worker and isolated state. The underlying cause remains unknown; no GC limitation or fix is claimed. Pair-only runs requested no compiled subprocess generation; the baseline invokes its own checkout-local workspace aliases while sharing only immutable installed dependencies. An ignored helper's inapplicable manifest postcondition failed after collecting both results; corrected the helper without rerunning tests. No kept assertion was changed.Local tests use one worker, nice priority and isolated HOME/OpenClaw/XDG state. The changed real-Gateway E2E is not run locally under the campaign's host budget; exact-head PR CI owns broad/E2E proof. No retries, skips, higher timeouts or weaker kept-behavior assertions were introduced.