Skip to content

test(macos): keep the rendered Quick Chat suite stable on hosted runners - #156134

Merged
steipete merged 1 commit into
mainfrom
fix/quickchat-catalog-test-ci
Sep 23, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/quickchat-catalog-test-ci

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

QuickChatCatalogPresentationTests › "rendered Quick Chat preserves catalog disclosure and shortcut behavior in order" fails intermittently in the hosted macos-swift (tests) job (Full Release Validation runs 35761278329 and 35802234377 for 2026.9.6; passes locally). The uploaded macos-native-test-logs artifacts show two failure shapes, both environmental:

  1. QuickChatPresentationTests.swift:304 Expectation failed: condition() with the diagnostic Quick Chat presented: visible=true, active=true, key=true, editorReady=true. The only wait that can fail with that state is waitUntil { !application.isActive } after application.deactivate(): the hosted runner never hands activation to another app, so the precondition for "presents without foreground ownership" is unattainable there, while the behavior itself (panel visible, editor focused, reopen, disable) is proven.
  2. On frozen release targets (HISTORICAL_TARGET=true) the rendered suite still runs in the parallel default lane. Parallel suites open key windows, Quick Chat dismisses on focus loss by design, and the test then reports windowVisible=false windowKey=false plus a reset model.speed (the 5-issue attempt). Current targets already isolate the suite into the default-rendered lane; frozen targets did not.

Changes

  • apps/macos/Tests/OpenClawIPCTests/QuickChatPresentationTests.swift: the activation hand-off before firing the shortcut is a bounded, non-asserting poll that prints whether the host yielded activation; every behavioral assertion after it is unchanged. waitUntil now delegates to poll.
  • .github/workflows/ci.yml: run the isolated default-rendered lane for frozen targets too whenever the suite exists in the checked-out tree; older tags without the suite keep the single default lane.

Proof

  • Local swift test --disable-sandbox --filter QuickChatCatalogPresentationTests (apps/macos): 5/5 passes.
  • One extra run with another application in the foreground (app deliberately not active) passes.
  • swiftformat --lint clean on the changed file.

The shortcut check asserted that the process yields activation after
NSApplication.deactivate(), which hosted macOS runners never do; the
behavior under test (presenting an editor, reopening, disabling) does not
depend on it. Poll the hand-off, report it, and keep every behavioral
assertion. Frozen release targets also ran the rendered suite in the
parallel default lane where other suites take key status and dismiss the
panel; give them the isolated lane whenever the suite exists.
@clawsweeper

clawsweeper Bot commented Sep 23, 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.

@steipete steipete self-assigned this Sep 23, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: XS maintainer Maintainer-authored PR labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 22, 2026, 11:21 PM ET / September 23, 2026, 03:21 UTC.

ClawSweeper review

What this changes

The PR makes macOS activation handoff diagnostic-only in the Quick Chat test and runs its rendered suite separately on compatible frozen release targets.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: current main still needs this focused test-isolation repair. No concrete patch defect was found, but the reported native runs need inspectable after-fix evidence.

Priority: P2
Reviewed head: 6107bc82dfbc7843fecb3d628b731d8bf1c7acc2

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and has no identified correctness defect, but its native execution evidence is not yet inspectable.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The body reports successful real AppKit test runs, including an inactive-app case, but provides no after-fix output showing the new activation diagnostic or frozen-target partition execution. The changed owners are test setup and CI dispatch; no stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The body reports successful real AppKit test runs, including an inactive-app case, but provides no after-fix output showing the new activation diagnostic or frozen-target partition execution. The changed owners are test setup and CI dispatch; no stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 7 items Pinned introduced change: The merge-base-to-head diff changes only CI partition selection and the native test's activation precondition; subsequent presentation, focus, reopening, and disabling assertions remain.
Current-main necessity: Comparison with fetched main shows both proposed changes remain outstanding: main asserts activation handoff and excludes historical targets from the separate rendered lane. No verified merged replacement was established.
Existing isolation owner: The workflow reuses the existing native launcher, with disjoint skip/filter selections and unchanged failure propagation. The launcher supplies private test state, manages child-process completion, and cleans up each invocation.
Findings None None.
Security None None.

How this fits together

macOS CI runs Quick Chat tests against real AppKit windows with fixture-backed application data. Test partitioning prevents other suites from taking window focus and invalidating those checks.

flowchart TD
  A[Checked-out release target] --> B{Rendered suite available?}
  B -->|Yes| C[Separate Quick Chat process]
  B -->|No| D[Existing default test lane]
  C --> E[Record activation handoff]
  E --> F[Assert presentation and shortcut behavior]
  F --> G[Native test logs and result]
  D --> G
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The body reports successful real AppKit test runs, including an inactive-app case, but provides no after-fix output showing the new activation diagnostic or frozen-target partition execution. The changed owners are test setup and CI dispatch; no stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Complete next step (P2) - Add inspectable after-fix native evidence to the PR body. Terminal output or redacted logs are sufficient; screenshots or recordings are welcome when they show the activation and panel behavior. Remove private details before posting. Updating the body should trigger review; otherwise ask a maintainer to comment @clawsweeper re-review.
Agent review details

Security

None.

PR surface

Config +1, Other +7. Total +8 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 1 5 4 +1
Generated 0 0 0 0
Other 1 9 2 +7
Total 2 14 6 +8

Review metrics

None.

Technical review

Best possible solution:

Keep native presentation assertions intact while isolating the rendered suite and explicitly recording whether each host exercised inactive-app presentation.

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

Unclear: source supports the activation-precondition and shared-window failure mechanisms, but this review did not replay the reported hosted failures.

Is this the best way to solve the issue?

Yes: reusing the existing isolated native-test lane and retaining behavioral assertions is a focused solution; inspectable native output is still needed to substantiate the reported result.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded repair to native release-validation reliability without a shipped application behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The body reports successful real AppKit test runs, including an inactive-app case, but provides no after-fix output showing the new activation diagnostic or frozen-target partition execution. The changed owners are test setup and CI dispatch; no stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is a bounded repair to native release-validation reliability without a shipped application behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The body reports successful real AppKit test runs, including an inactive-app case, but provides no after-fix output showing the new activation diagnostic or frozen-target partition execution. The changed owners are test setup and CI dispatch; no stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head diff changes only CI partition selection and the native test's activation precondition; subsequent presentation, focus, reopening, and disabling assertions remain. (apps/macos/Tests/OpenClawIPCTests/QuickChatPresentationTests.swift:262, 6107bc82dfbc)
  • Current-main necessity: Comparison with fetched main shows both proposed changes remain outstanding: main asserts activation handoff and excludes historical targets from the separate rendered lane. No verified merged replacement was established. (.github/workflows/ci.yml:5649, d5225dd9bdc0)
  • Existing isolation owner: The workflow reuses the existing native launcher, with disjoint skip/filter selections and unchanged failure propagation. The launcher supplies private test state, manages child-process completion, and cleans up each invocation. (scripts/test-macos-native.mts:9, 6107bc82dfbc)
  • Native behavior boundary: Quick Chat presents a nonactivating panel, permits editor focus, and dismisses after focus moves outside its owned windows. These existing behaviors explain why competing rendered suites require process isolation; no application runtime code changes. (apps/macos/Sources/OpenClaw/QuickChatController.swift:250, 6107bc82dfbc)
  • Contributor evidence and discussion: The complete supplied body reports five successful local rendered-suite runs, another run with a different foreground application, and Swift formatting validation. A REST reread matched that body; discussion contains only review-status messages. No after-fix diagnostic transcript or frozen-target execution artifact is supplied. (6107bc82dfbc)
  • Native validation status: Both macOS Swift checks were still running when inspected; no completed hosted after-fix result was available. No target code or tests were executed during this read-only review. (6107bc82dfbc)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Attach redacted native output showing activation state, presentation, reopening, and disabling, plus the frozen-target rendered-lane result; identify the disposable macOS environment and elapsed time.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete enabled auto-merge (squash) September 23, 2026 03:45
@steipete
steipete merged commit 35fd3b1 into main Sep 23, 2026
306 of 308 checks passed
@steipete
steipete deleted the fix/quickchat-catalog-test-ci branch September 23, 2026 04:04
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 23, 2026
…ers (openclaw#156134)

## Summary

`QuickChatCatalogPresentationTests` › "rendered Quick Chat preserves catalog disclosure and shortcut behavior in order" fails intermittently in the hosted `macos-swift (tests)` job (Full Release Validation runs 35761278329 and 35802234377 for 2026.9.6; passes locally). The uploaded `macos-native-test-logs` artifacts show two failure shapes, both environmental:

1. `QuickChatPresentationTests.swift:304` `Expectation failed: condition()` with the diagnostic `Quick Chat presented: visible=true, active=true, key=true, editorReady=true`. The only wait that can fail with that state is `waitUntil { !application.isActive }` after `application.deactivate()`: the hosted runner never hands activation to another app, so the *precondition* for "presents without foreground ownership" is unattainable there, while the behavior itself (panel visible, editor focused, reopen, disable) is proven.
2. On frozen release targets (`HISTORICAL_TARGET=true`) the rendered suite still runs in the parallel default lane. Parallel suites open key windows, Quick Chat dismisses on focus loss by design, and the test then reports `windowVisible=false windowKey=false` plus a reset `model.speed` (the 5-issue attempt). Current targets already isolate the suite into the `default-rendered` lane; frozen targets did not.

## Changes

- `apps/macos/Tests/OpenClawIPCTests/QuickChatPresentationTests.swift`: the activation hand-off before firing the shortcut is a bounded, non-asserting `poll` that prints whether the host yielded activation; every behavioral assertion after it is unchanged. `waitUntil` now delegates to `poll`.
- `.github/workflows/ci.yml`: run the isolated `default-rendered` lane for frozen targets too whenever the suite exists in the checked-out tree; older tags without the suite keep the single default lane.

## Proof

- Local `swift test --disable-sandbox --filter QuickChatCatalogPresentationTests` (apps/macos): 5/5 passes.
- One extra run with another application in the foreground (app deliberately not active) passes.
- `swiftformat --lint` clean on the changed file.
steipete added a commit that referenced this pull request Sep 23, 2026
…ers (#156134)

## Summary

`QuickChatCatalogPresentationTests` › "rendered Quick Chat preserves catalog disclosure and shortcut behavior in order" fails intermittently in the hosted `macos-swift (tests)` job (Full Release Validation runs 35761278329 and 35802234377 for 2026.9.6; passes locally). The uploaded `macos-native-test-logs` artifacts show two failure shapes, both environmental:

1. `QuickChatPresentationTests.swift:304` `Expectation failed: condition()` with the diagnostic `Quick Chat presented: visible=true, active=true, key=true, editorReady=true`. The only wait that can fail with that state is `waitUntil { !application.isActive }` after `application.deactivate()`: the hosted runner never hands activation to another app, so the *precondition* for "presents without foreground ownership" is unattainable there, while the behavior itself (panel visible, editor focused, reopen, disable) is proven.
2. On frozen release targets (`HISTORICAL_TARGET=true`) the rendered suite still runs in the parallel default lane. Parallel suites open key windows, Quick Chat dismisses on focus loss by design, and the test then reports `windowVisible=false windowKey=false` plus a reset `model.speed` (the 5-issue attempt). Current targets already isolate the suite into the `default-rendered` lane; frozen targets did not.

## Changes

- `apps/macos/Tests/OpenClawIPCTests/QuickChatPresentationTests.swift`: the activation hand-off before firing the shortcut is a bounded, non-asserting `poll` that prints whether the host yielded activation; every behavioral assertion after it is unchanged. `waitUntil` now delegates to `poll`.
- `.github/workflows/ci.yml`: run the isolated `default-rendered` lane for frozen targets too whenever the suite exists in the checked-out tree; older tags without the suite keep the single default lane.

## Proof

- Local `swift test --disable-sandbox --filter QuickChatCatalogPresentationTests` (apps/macos): 5/5 passes.
- One extra run with another application in the foreground (app deliberately not active) passes.
- `swiftformat --lint` clean on the changed file.
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant