Repository navigation
fix(models): select authored rows before applying defaults - #144034
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 10, 2026, 10:18 AM ET / 14:18 UTC (Revision 3). ClawSweeper reviewWhat this changesSelects configured model rows before filling omitted capabilities and costs, sharing the existing selection algorithm between config loading and catalog planning. Merge readiness✅ Ready for maintainer review This focused fix remains necessary: current main still fills defaults before selecting competing authored rows. No blocking correctness findings were identified, and the rebased files match the previous reviewed revision. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw turns operator-authored provider and model configuration into runtime model definitions. Row selection determines which model supplies capabilities, limits, and pricing before those definitions reach agent execution. flowchart LR
A[Authored model rows] --> C[Select exact destination]
B[Provider alias policies] --> C
C --> D[Fill omitted model defaults]
D --> E[Inline runtime models]
E --> F[Prepared agent models]
C --> G[Provider catalog planning]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +16, Tests +165. Total +181 across 4 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep authored-row selection in one shared owner before default materialization, preserving explicit values and leaving sparse catalog inheritance to its separately tracked work. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: configure an alias alongside its sparse exact destination, apply defaults, then build inline runtime models. Current main loses row distinctions before selection; this review did not execute the reproduction. Is this the best way to solve the issue? Yes. Reusing the planner's existing selection algorithm at the config producer repairs the ordering defect without creating competing selection policy or changing stored configuration formats. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d9f1f50e074b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
0ffd387 to
5b6b4ff
Compare
Wait for each session fixture's native transcript reconciliation and state cleanup before deleting its temporary directory. Attempt all owned roots, retain failed cleanup state, and preserve the existing test assertions. Related: #144034 Preserves the session regression coverage from #137381 by @jalehman.
Reuse one pure row materializer for config defaults and catalog planning. Select the exact destination before generic defaults obscure omissions, so aliases cannot donate capabilities, names, or limits to a sparse row. Preserve same-spelling cost merges and each caller's bound normalizer. Validation: 132 focused tests, six fixture cases after a type-only fix, full check:changed, and managed P2 review of the prerequisite composition.
5b6b4ff to
eb90eba
Compare
|
Merged via squash.
|
) Wait for each session fixture's native transcript reconciliation and state cleanup before deleting its temporary directory. Attempt all owned roots, retain failed cleanup state, and preserve the existing test assertions. Related: openclaw#144034 Preserves the session regression coverage from openclaw#137381 by @jalehman.
) Reuse one pure row materializer for config defaults and catalog planning. Select the exact destination before generic defaults obscure omissions, so aliases cannot donate capabilities, names, or limits to a sparse row. Preserve same-spelling cost merges and each caller's bound normalizer. Validation: 132 focused tests, six fixture cases after a type-only fix, full check:changed, and managed P2 review of the prerequisite composition.
Related: #130706, #142100. Follows #143967.
What Problem This Solves
Config defaults can collapse an alias into an exact destination after filling its omitted capabilities, allowing the alias row to contaminate the selected row. Later planning cannot recover which fields were authored.
Why This Change Was Made
Reuse the planner's existing row-selection algorithm in the config owner, before capability defaults. Remove the later repeated ID normalization and let the planner delegate to the shared pure helper. Exact destinations retain their omissions and same-spelling duplicate costs retain their existing merge semantics. This adds 16 production lines; sparse capability inheritance and runtime pricing remain separate follow-ups.
User Impact
The intended authored model row determines which fields are explicit before defaults or prepared runtime metadata are added.
Evidence
Five baseline failures and one control established the producer defect. The fresh-main replay passed 132 focused tests, six final fixture rechecks, independent P2 review with unchanged production context, and the full changed gate. A test-table type correction produced byte-identical JavaScript and unchanged assertions.
One normal full build at the tested commit and 18 compiled cases passed: six config/defaults-to-inline/runtime cases and 12 planner/registry controls. All 11,929 root/workspace output files remained unchanged; the proof loaded no checkout TypeScript and made no HTTP or catalog rediscovery calls. All owned processes joined. This is compiled producer/planner proof, not an upstream-provider request.
Tested commit:
0ffd387049b04c07dda65f61f68684548105ca36.CI refresh: the unchanged authored-row patch is replayed onto main
eb9f4ff537c01eed0596bf0949f40be0d5b16e9f, including the separate session-fixture cleanup in #144087 identified during the TaskFlow CI investigation. Every changed-file postimage and the stable task patch match5b6b4ffc04f538feb334186e54aac03eab375fa6. Original exact-commit runtime proof is preserved without restamping; fresh CI is required foreb90eba9303c5eae8e7d1972bbb21a600077934a. #144087 documents the historical causal limit.