Skip to content

test(cron): give PR automation and running-disable fixtures real human owners - #208619

Merged
obviyus merged 1 commit into
mainfrom
test/cron-owner-fixtures
Nov 29, 2026
Merged

obviyus merged 1 commit into
mainfrom
test/cron-owner-fixtures

Conversation

@obviyus

@obviyus obviyus commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

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.

#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.

#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 d47333a1d3c3: 30 failed, 12 passed (14 owner refusals in the log);
  • a2eb1512da0e (parent of bf2c75eb7eb6, fix: check recorded automation owners before running #201287): 42 passed;
  • bf2c75eb7eb6: 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.

…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.
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Nov 29, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 29, 2026
@obviyus
obviyus merged commit d9e60c1 into main Nov 29, 2026
114 checks passed
@obviyus
obviyus deleted the test/cron-owner-fixtures branch November 29, 2026 22:18
@obviyus

obviyus commented Nov 29, 2026

Copy link
Copy Markdown
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant