Repository navigation
test(cron): give PR automation and running-disable fixtures real human owners - #208619
Merged
Merged
Conversation
…n owners #201287 refuses scheduled runs whose recorded human owner is not a profile. These fixtures used the synthetic ids fixture-operator, alice and bob, so every occurrence was refused. Back them with real profiles, as #201287 did for its own fixtures; the shared requester hook takes an email for that.
Contributor
|
🦞👀 ClawSweeper review completeClawSweeper finished reviewing this revision. |
Collaborator
Author
|
Landed as d9e60c1. This clears the scheduled cron red from #201287: fixtures recorded human owners that were never profiles, so every scheduled occurrence was refused. Main failed 30/42 in these files and #201287's parent passed 42/42; with this change they pass 42/42 (78/78 with the migrated operator-continuation test). |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 30, 2026
…n owners (openclaw#208619) ## Problem Scheduled CI on main went from 7 to 39 failing tests (run 46306448253). Most are in `src/cron/service.pr-automation-feedback.test.ts` and `src/cron/service.pr-automation.test.ts`; `src/cron/service/ops.disable-running.test.ts` times out after 120 s. The PR automation tests fail with: ``` I did not run this automation. The automation's human owner no longer exists. Ask an administrator to select a new owner on the Automations page before running it again. ``` openclaw#201287 checks, before each scheduled occurrence, that the job's recorded human owner still exists as a profile (`assertCronOccurrenceHumanOwner`). That is intended: a removed person's automation must not keep running. These fixtures record owners that were never profiles: - `installRequesterCronAuthorityTestHooks()` seeds the session creator `fixture-operator` by default, and PR automation jobs inherit that owner. - `ops.disable-running.test.ts` sets `ownerProfileId` to `"alice"` and transfers to `"bob"`. The refused occurrence never reaches the held runner, so the test waits until it times out. openclaw#201287 already moved its own fixtures to real profiles with `ensureProfileForEmail`; these consumers were missed. ## Fix Test-only: - `installRequesterCronAuthorityTestHooks` also takes an email, which seeds the creator as a real profile. The PR automation support uses it. `run.operator-continuation.test.ts`, which built the same profile-backed creator by hand, now uses it too. - `ops.disable-running.test.ts` creates a minimal test state with real `alice` and `bob` profiles and uses their ids for the owner and the transfer. No product code changes. ## Evidence `service.pr-automation-feedback`, `service.pr-automation` and `ops.disable-running` together (42 tests): - main `d8928067e615`: 30 failed, 12 passed (14 owner refusals in the log); - `fe502c60154b` (parent of `fdba661837c8`, openclaw#201287): 42 passed; - `fdba661837c8`: 30 failed, 12 passed; - main with this change: 42 passed, 0 owner refusals. With `run.operator-continuation.test.ts` included: 78 passed. ## Merge danger Two-way door: test-only, a revert fully undoes it. Blast radius: four test files. Co-authored-by: Ayaan Zaidi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Scheduled CI on main went from 7 to 39 failing tests (run 46306448253). Most are in
src/cron/service.pr-automation-feedback.test.tsandsrc/cron/service.pr-automation.test.ts;src/cron/service/ops.disable-running.test.tstimes out after 120 s. The PR automation tests fail with:#201287 checks, before each scheduled occurrence, that the job's recorded human owner still exists as a profile (
assertCronOccurrenceHumanOwner). That is intended: a removed person's automation must not keep running. These fixtures record owners that were never profiles:installRequesterCronAuthorityTestHooks()seeds the session creatorfixture-operatorby default, and PR automation jobs inherit that owner.ops.disable-running.test.tssetsownerProfileIdto"alice"and transfers to"bob". The refused occurrence never reaches the held runner, so the test waits until it times out.#201287 already moved its own fixtures to real profiles with
ensureProfileForEmail; these consumers were missed.Fix
Test-only:
installRequesterCronAuthorityTestHooksalso takes an email, which seeds the creator as a real profile. The PR automation support uses it.run.operator-continuation.test.ts, which built the same profile-backed creator by hand, now uses it too.ops.disable-running.test.tscreates a minimal test state with realaliceandbobprofiles and uses their ids for the owner and the transfer.No product code changes.
Evidence
service.pr-automation-feedback,service.pr-automationandops.disable-runningtogether (42 tests):d47333a1d3c3: 30 failed, 12 passed (14 owner refusals in the log);a2eb1512da0e(parent ofbf2c75eb7eb6, fix: check recorded automation owners before running #201287): 42 passed;bf2c75eb7eb6: 30 failed, 12 passed;run.operator-continuation.test.tsincluded: 78 passed.Merge danger
Two-way door: test-only, a revert fully undoes it. Blast radius: four test files.