Skip to content

fix(test): match database ownership CLI error envelope - #184188

Merged
fuller-stack-dev merged 2 commits into
mainfrom
openclaw/pr154067-ci-prereq-tests
Oct 26, 2026
Merged

fuller-stack-dev merged 2 commits into
mainfrom
openclaw/pr154067-ci-prereq-tests

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes the external-state ownership E2E failure after #183393 changed database CLI JSON errors to the canonical envelope. This is a CI prerequisite identified while preparing #154067.

User Impact

No production behavior change. The test continues checking rejected ownership replacement and supervisor-only Gateway startup.

Why This Change Was Made

Assert ok: false, error.type: "cli_error", and the original conflict message rather than treating error as a string. This matches formatCliJsonFailure and the neighboring CLI process test.

Evidence

Published head: 5d786ed5fd5c3149d2d52d1fd3f251cba3fd15d3 (empty publication commit; tree identical to validated 31aad4bc4b52c37f2df50fd3b6697a3fc0900a28); base: 4d26a4aad96b456a32429ad4e670ba4522abbc70.

  • Before: full ownership file failed only the conflicting claim assertion (6 passed, 1 failed; 100.43s). Actual output had the expected cli_error object/message.
  • After: pnpm test test/gateway-external-state-ownership.e2e.test.ts src/cli/database-ownership.process.test.ts src/cli/failure-output.test.ts src/agents/subagents/announce/subagent-announce-direct-delivery.test.ts --maxWorkers=1 passed all 73 tests; total wrapper 155.89s, ownership file 102.04s. Commit hook only wrapped the message literal afterward; candidate changed-file formatting/typecheck/lint passed.
  • Full touched-file audit: all seven real-process cases retained; dead/live/recent update-driver reconciliation, explicit repair/dry-run cleanup, deferred-schema readers/timer, and supervisor ownership protect distinct boundaries. Both JSON error assertions now use the canonical envelope. No dead fixtures, duplicate cases, skipped tests, or assertions removed. Slow E2E coverage is retained because it proves cross-process ownership and schema-publication behavior; no cheaper helper test covers that boundary. Simplification: no new helper or production code; test delta +7/-1.
  • pnpm check:changed: 18 checks passed, including all four root test typecheck shards and changed-file lint/format. The unrelated repository-wide dead-export scan failed on pre-existing exports outside this diff; this is not a clean overall gate.
  • API-only odin-autoreview attempted once and failed authentication (provider diagnostics suppressed). No subscription fallback; independent review remains blocked.
  • Tests used sanitized OpenClaw environment, private temp/state, and a verified private managed-handoff database path. A private dependency graph was required by the declaration-boundary guard. No live service changes.

The second reported CI failure is already fixed by merged #184145 (419616fac38): current-main full settle-replay harness passed all 23 cases (110.55s), including private completion recovery. No duplicate repair is included.

Hosted exact-head CI completed successfully: run 40268624090, including required openclaw/ci-gate, security-fast, changed tests/boundaries, baseline ratchets, architecture/other guards, lint, and test types. The Linux/Bun ownership E2E passed all seven cases in 89.62s (84.821s test time). No CI retries. Independent API review is still unavailable as noted above; this PR has not been merged.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review October 26, 2026 04:21
@fuller-stack-dev
fuller-stack-dev merged commit 592df0b into main Oct 26, 2026
147 of 148 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the openclaw/pr154067-ci-prereq-tests branch October 26, 2026 04:32
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
* fix(test): match database ownership CLI error envelope

* fix(test): match database ownership CLI error envelope

OpenClaw-Publication: 3625b1b7-5214-499c-a744-614ce8df2038
RomneyDa added a commit that referenced this pull request Oct 30, 2026
* fix(test): match database ownership CLI error envelope (#184188)

* fix(test): match database ownership CLI error envelope

* fix(test): match database ownership CLI error envelope

OpenClaw-Publication: 3625b1b7-5214-499c-a744-614ce8df2038
(cherry picked from commit 592df0b)
Co-authored-by: RomneyDa <[email protected]>

* fix(gateway): restore hook and cron capacity validation (#177400)

* test(gateway): align hook capacity proof with bounded priority

Observe inner-lane queueing instead of sleeping, retain exact provider and terminal completion proof, and cover the normal/background aging boundary with the existing controlled-clock group fixture.

Co-authored-by: vincentkoc <[email protected]>

* fix(gateway): restore hook and cron capacity validation

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: d64434ff-49f6-4ce0-824b-a4ee23a27421

---------

Co-authored-by: vincentkoc <[email protected]>
(cherry picked from commit 0cd30da)
Co-authored-by: RomneyDa <[email protected]>

* fix(gateway): shutdown validation kills a pending session-end hook (#177243)

* test(gateway): use native SIGTERM for session-end shutdown proof

Select the existing graceful test-process signal path and shared custody safety net so the real session_end hook can drain. Keep cleanup and test deadlines, hook delay, and exit/trace assertions unchanged.

The original Node E2E reproduces SIGKILL with only the started trace; the fixed entrypoint exits cleanly and records completed. The 89 helper tests pass. The unchanged restart-handoff sibling timed out at 180 seconds and remains an unresolved proof gap.

Co-authored-by: vincentkoc <[email protected]>

* fix(gateway): shutdown validation kills a pending session-end hook

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 1274106f-0856-4536-989c-d943300695b3

---------

Co-authored-by: vincentkoc <[email protected]>
(cherry picked from commit de89889)
Co-authored-by: RomneyDa <[email protected]>

* fix(ci): restore cron provider preparation coverage (#173741)

(cherry picked from commit 07e427e)
Co-authored-by: RomneyDa <[email protected]>

* test(qa): use a stored account in memory provenance proof

The account-binding contract introduced in d25a316 (#172590)
rejects isolated cron jobs backed only by a provider-config API key.
The memory provenance fixture still selected mock-openai, while the QA
harness stages stored accounts for openai and anthropic.

Select the openai alias backed by the existing synthetic QA account.
Keep the same mock endpoint, restricted client, restart, cron execution,
and all provenance assertions unchanged. No production behavior changes.

Verified the unchanged test passes on c645438 and fails at cron.add
on d25a316; git bisect identifies d25a316 as the first bad commit.
The repaired case passed three consecutive Node runs; the final run also
passed the explicit-owner sibling (2/2 in the file). Root-test typecheck,
scoped oxlint, oxfmt, and git diff --check passed.

(cherry picked from commit 7f8d68d)
Co-authored-by: RomneyDa <[email protected]>

* fix(test): stop report fixtures clearing shared Vitest caches (#188130)

* fix(test): keep the native clear-cache fixture off the shared Vitest cache

* fix(test): isolate report fixture caches across project roots

---------

Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 60fb2e5)
Co-authored-by: RomneyDa <[email protected]>

* test(gateway): await placement admission before fixture clients

Focused backport of 47bd0f3 for the exact FRV placement-scope failure.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RoboClaw <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Ayaan Gazali <[email protected]>
Co-authored-by: roboclaw-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant