Repository navigation
fix: keep environment inventory responsive during pairing cleanup - #148988
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 maintainer review before merge. Reviewed September 15, 2026, 10:51 PM ET / September 16, 2026, 02:51 UTC (Revision 12). ClawSweeper reviewWhat this changesThe PR builds environment inventory from one committed pairing snapshot, adds a blocked-writer regression, and updates Gateway, Codex, and PR-tooling test fixtures. Merge readiness✅ Ready for maintainer review The fix remains useful: current main still waits on the second, lock-taking pairing read. No actionable introduced defect remains, and the prior fixture findings should not be re-raised. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway combines paired-device records, connected nodes, and worker records into environment inventory. Clients and automatic session placement consume that inventory to discover available hosts and their capabilities. flowchart TD
A[Committed device records] --> B[Single pairing snapshot]
B --> C[Existing node projector]
B --> D[Connection and ownership filtering]
C --> D
E[Connected nodes and workers] --> D
D --> F[Environment inventory]
F --> G[Clients and session placement]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +86. Total +87 across 13 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the existing canonical projector over one committed snapshot while preserving live connection filtering and mutation-time authorization. Do we have a high-confidence way to reproduce the issue? Yes, from source: hold withPairedDeviceRecords open and request environment inventory; current main's second read waits on the same lock. This review did not execute the regression. Is this the best way to solve the issue? Yes. Reusing the existing node projector removes the redundant serialized read without introducing a cache, new API, or competing pairing implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a76f27589c03. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
Keep alias delegation cases on their intended supervisor boundary after code-only linked checkouts gained dependency materialization. Preserve exact arguments, exit status, and trust refusals; retain separate materializer coverage.
Canonical main already owns linked dependency setup before checkout. Remove the branch-local later setup so the merged fixture matches #149477 exactly, without changing the inventory or lifecycle implementation.
|
Merged via squash.
|
…enclaw#148988) * fix: keep environment inventory responsive during pairing cleanup * test: include pairing snapshot in isolated gateway expectations * fix: let profiler help drain pending cleanup * test: preserve process events in runtime identity fixtures * test: avoid loading QA runtime in receipt producers * fix: repair native PR repository identity fixtures (openclaw#149294) (cherry picked from commit 3df0afa) * fix: keep Codex model attribution fixture focused (openclaw#149301) (cherry picked from commit f778132) * test: align canonical model attribution fixture Adopt the complete fixture from openclaw#149349 and openclaw#149261 so merging the inventory branch retains one terminal-list response. Preserve the controlled completion/timeout cases and the original runtime budget. * test: provide dependencies for PR alias fixtures Keep alias delegation cases on their intended supervisor boundary after code-only linked checkouts gained dependency materialization. Preserve exact arguments, exit status, and trust refusals; retain separate materializer coverage. * test: retire superseded PR alias fixture setup Canonical main already owns linked dependency setup before checkout. Remove the branch-local later setup so the merged fixture matches openclaw#149477 exactly, without changing the inventory or lifecycle implementation.
What Problem This Solves
Fixes device inventory waiting behind a pairing update even when committed pairing data is available.
User Impact
Inventory can return committed node state while a pairing update awaits cleanup, then show updated state after the update commits. Existing node ownership and command authorization filtering remain intact.
Why This Change Was Made
Read device pairing once and derive node pairing with the existing canonical projector. Both inventory views use one committed snapshot, removing the duplicate store read and pairing-lock wait. The real-store regression remains registered in the isolated Gateway-methods project, with its independent expected-list fixture aligned.
Evidence
The original-base benchmark is synthetic warm local
environments.listevidence: 1,000 nodes, 50 samples per version. Median latency fell from 11.622 ms to 8.083 ms and SQLite calls from 8 to 4 per request; observed maximum increased from 15.789 ms to 23.613 ms. It does not establish tail-latency, fleet, or provider speed improvements. Live candidate comparison remains pending.Published head
b53d2dcc1b29e0bf1e14d8a4adfe1fd50184ae12has current CI 35046642476 completed successfully. The separate proof sets are not a fresh aggregate suite. The earlier benchmark does not establish live fleet performance.