Repository navigation
fix(models): keep status plugin metadata isolated - #140506
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 6, 2026, 7:20 PM ET / 23:20 UTC. ClawSweeper reviewWhat this changesKeep model-status plugin metadata inside its asynchronous operation, remove temporary global publication helpers, and migrate affected test fixtures to scoped metadata. Merge readiness✅ Ready for maintainer review This remains a useful fix for a current-main metadata isolation defect. The pinned diff introduces no actionable correctness findings, and the maintainer-authored PR is protected from cleanup closure. Priority: P2 Review scores
Verification
How this fits togetherModel status combines workspace plugin metadata, model catalogs, and credential availability into a diagnostic report. Metadata scopes let its nested lookups share one inventory without exposing that inventory to concurrent operations. flowchart TD
A[Workspace configuration] --> B[Prepared plugin metadata]
B --> C[Asynchronous status scope]
C --> D[Model and credential lookups]
D --> E[Status report]
F[Concurrent operations] --> G[Their own metadata context]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -162, Tests +58, Other -1. Total -105 across 29 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the existing asynchronous metadata owner consistently while preserving Gateway publication guards, CLI revision fencing, and model-status output. Do we have a high-confidence way to reproduce the issue? Yes, from source: pause model-status catalog loading and read metadata from an unrelated asynchronous operation; current main publishes the command's snapshot globally. The regression test encodes that ordering, but this review did not execute it. Is this the best way to solve the issue? Yes. Reusing the existing asynchronous scope repairs the ownership boundary and permits removal of the global lease machinery without adding another metadata path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 422b8c0ec786. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Keep command-specific plugin metadata inside the existing async scope so concurrent readers cannot inherit the status command's workspace inventory. Remove the temporary global lease stack, its capture/restore helpers and normalization-policy state stored only for lease restoration. Preserve Gateway startup publication restrictions and CLI revision invalidation. Migrate fixtures to operation scopes and retain behavioral coverage. Production code shrinks by 162 lines.
da764f8 to
ba9a387
Compare
|
Merged via squash.
|
Keep command-specific plugin metadata inside the existing async scope so concurrent readers cannot inherit the status command's workspace inventory. Remove the temporary global lease stack, its capture/restore helpers and normalization-policy state stored only for lease restoration. Preserve Gateway startup publication restrictions and CLI revision invalidation. Migrate fixtures to operation scopes and retain behavioral coverage. Production code shrinks by 162 lines.
What Problem This Solves
Fixes an issue where running
models statuscould cause concurrent operations to read plugin metadata from that command's workspace while it waited for model information.Why This Change Was Made
Run the status operation inside the existing asynchronous metadata scope. Remove the temporary process-global lease stack, its capture/restore helpers, and the policy state stored only for lease restoration. Gateway startup publication restrictions and CLI metadata revision checks remain intact.
Migrate fixture consumers to operation scopes while retaining their behavioral assertions. Production code shrinks by 162 lines; tests and support grow by 58 lines, with one obsolete assertion-baseline entry removed.
User Impact
Concurrent operations keep their own plugin metadata. The status command's model selection, output and CLI options are preserved. This is an independent cleanup of the existing metadata API, with no new configuration or persistence changes.
Evidence
pnpm openclaw models status --json: a synthetic plugin's alias resolves correctly, its default utility model is reported, and its runtime entry is never imported.No live provider credentials or operator Gateway were used.