Skip to content

fix(ci): local model inventory test fails after native login recheck - #167165

Merged
steipete merged 1 commit into
mainfrom
fix/local-catalog-snapshot-spd9
Oct 8, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/local-catalog-snapshot-spd9

Conversation

@steipete

@steipete steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the known main CI failure in the local model-inventory test after #167008. This is a maintainer-requested repair; a remote proof capacity limit prevented the direct-push path.

User Impact

No production behavior changes. The local Gateway test continues to require a successful prepared response without starting a catalog load, and now explicitly checks the native-login recheck.

Why This Change Was Made

The handler already resolved an owner for lifecycle work before resolving the current prepared inventory after request preparation. #167008 switches the first resolution to the published-owner getter for native login, so both phases now reach the same spy. The later acquisition preserves the pending-runtime-replacement boundary; carrying the earlier owner would bypass it.

Expect two published-owner reads and one native-login recheck while retaining the existing result and no-load assertions.

Related: #167008.

Evidence

  • Linux reproduction at 5a060dd1e18e: the target file had 1 failed / 8 passed, matching hourly 37751789220, job 113226895303. Wrapper wall: 44.18 seconds.
  • After: the same file passed 9/9 in 42.50 seconds. The same nine test cases remain; no runtime code or CI jobs are added.
  • Type-aware oxlint and boundary lint passed. check-changed passed, including the gateway-root test type graph (72.4 seconds), formatting, guards, and all three Knip scans.
  • Independent P2 review: no actionable findings.
  • Blacksmith Testbox tbx_01m4ddcmtdgxm86cbqdq5vk1pc, environment run, verified source/tree and candidate file hash.

Proof gap: the whole gateway-database-workers configuration was attempted but interrupted with exit 255 after about 61 minutes, before completion. It logged roughly 4,000 passing cases and an unrelated session-activity-summaries.test.ts failure (expected two preparations, observed one; cleanup then timed out). The changed catalog test had not executed in that whole-config process when the unrelated failure occurred. AWS fallback was refused with cost_limit_exceeded: fleet active lease limit exceeded: 21/20. The completed focused/static/review proof is retained; no full-config pass is claimed. No CI dispatches or reruns were requested. Ready for the coordinator's landing decision; auto-merge is not armed.

After #167008, the native-login check and the later prepared inventory read
both use the published owner getter. These were already separate owner
lookups before that change, across the request preparation boundary.

Expect both reads and assert one native-login recheck while preserving the
successful response and the guarantee that no catalog load starts.
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 8, 2026
@steipete
steipete enabled auto-merge (squash) October 8, 2026 10:44
@clawsweeper

clawsweeper Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 6:45 AM ET / 10:45 UTC.

ClawSweeper review

What this changes

The branch updates the local model-list test to expect two published-owner reads and check that native login is rechecked.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The useful repair matches current source, but proof remains a focused harness run and the exact getter-count assertion adds avoidable coupling.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The supplied repository state identifies maintainer-authored test maintenance with no production change. Reported after-fix evidence covers the local dispatcher test with a mocked catalog owner; it does not establish real native-login behavior or a completed aggregate run.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes
Reason: Restoring a meaningful prepared-response/no-discovery test is useful maintenance, and the patch does not alter the accepted production contract.

Merge readiness

✅ Ready for maintainer review

This PR repairs a stale test expectation that remains on the pinned main revision. No blocking correctness or security finding was identified; the focused pass is reported separately from the interrupted broader run.

Priority: P3
Reviewed head: 44e836b9d9711b8b6499e859ee204c194d370e3b

Before merge

None.

Findings

None.

Tests

  • Low-value test src/gateway/local-request-context.test.ts: uses the prepared local owner without starting a catalog load: Remove the exact two-getter-call assertion: it pins implementation structure rather than independently proving freshness or replacement ordering. Retain the successful response and no-discovery assertions.
  • Missing end-to-end proof: The reported focused run exercises the local in-process dispatcher with a mocked catalog owner, not a shipped CLI or server entry point. No additional live-flow proof is necessary for this maintainer test-only repair; the broader configuration did not complete.
Agent review details

How this fits together

Local agent calls reuse Gateway request handlers without starting a server. Model-list requests consume the published model inventory while allowing the existing owner to recheck native login.

flowchart TD
 A[Local agent request] --> B[Local Gateway context]
 B --> C[Model list handler]
 C --> D[Native login recheck]
 C --> E[Published inventory read]
 E --> F[Model list response]
 G[Local request test] --> B
 G --> H[Response and discovery assertions]
Loading

Technical review

Best possible solution:

Keep the production lifecycle boundary and repair the stale test without making exact owner-read counts a permanent behavior contract.

Do we have a high-confidence way to reproduce the issue?

Yes: current source makes the stale one-read assertion clear, and the PR reports a matching focused failure and subsequent pass. This review did not execute tests.

Is this the best way to solve the issue?

Yes: updating the test preserves the intended production behavior and replacement boundary; exact getter counts remain unnecessarily implementation-coupled.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2049857a87b3.

Provenance checked

  • src/gateway/local-request-context.test.ts: prepared local owner test keeps the original intent (4561f85: Keep model-catalog reads responsive by consuming prepared owner facts without initiating provider discovery.)

Testing

Proof path: in-process harness. Added test files: 1.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit cd8b5d3 adds src/gateway/server-methods/models.ts:107 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cd8b5d37d591; files: src/gateway/server-methods/models.ts)
  • joshavant: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Tests +2. Total +2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 2 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 2 +2

Labels

Label changes:

  • add P3: This is a focused test-maintenance repair with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.

Label justifications:

  • P3: This is a focused test-maintenance repair with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Remove the exact getter-count assertion while preserving the prepared response and no-discovery checks.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

@steipete
steipete merged commit 839ad94 into main Oct 8, 2026
99 checks passed
@steipete
steipete deleted the fix/local-catalog-snapshot-spd9 branch October 8, 2026 10:48
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…claw#167165)

After openclaw#167008, the native-login check and the later prepared inventory read
both use the published owner getter. These were already separate owner
lookups before that change, across the request preparation boundary.

Expect both reads and assert one native-login recheck while preserving the
successful response and the guarantee that no catalog load starts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant