Skip to content

fix: verify COSMIC focus and release v0.7.14 - #245

Merged
avifenesh merged 5 commits into
agent-sh:mainfrom
totosiu:fix/cosmic-focus-verification
Oct 10, 2026
Merged

avifenesh merged 5 commits into
agent-sh:mainfrom
totosiu:fix/cosmic-focus-verification

Conversation

@totosiu

@totosiu totosiu commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

COSMIC can send initial toplevel state after sync callbacks. The helper now waits up to 800 ms for state and verifies activation on the same connection for up to 800 ms. It reports ok: false when activation is not observed.

Follow-up validation also found incomplete snapshots still succeeded after a timeout, closed windows remained listed, and monitor queries could return before output-manager done. The patch now rejects missing initial state, filters closed windows, waits for atomic output layouts and handles spurious nonblocking read readiness. It preserves the existing four setup roundtrips.

Validation:

  • Full local Rust suite: 438 tests passed.
  • Eight real-helper Wayland wire scenarios pass: delayed focus, empty desktop, missing state, closure, delayed activation, refused activation, already-focused activation and delayed monitor layout. Missing-state, closed-window and output-layout cases failed against the initial PR.
  • Formatting, all-target Clippy and diff checks passed.
  • Local doctor identifies GNOME Shell 50.1 on Wayland. This machine has no live COSMIC compositor; local COSMIC evidence uses an isolated protocol peer.
  • The contributor reports live validation on Arch + cosmic-comp 1.9.0: focused editor listing, minimized window state and terminal-to-editor activation.

Fixes #244.

This PR also prepares v0.7.14 after merging #243: Cargo, npm, MCP handshake, Pi catalog, plugin manifests and launcher are aligned. Both fixes are recorded in the release changelog. The combined source passed all 33 Pi tests, catalog freshness, plugin checks and npm package checks.

Final review: fresh-context subagent reviewed the complete final source, independently passed all eight wire scenarios, and found one changelog-link issue. Fixed and re-reviewed in e8623a5; no remaining findings. Revuto approved runtime head581c364 but its final-head review is capped at two rounds. The owner requested this manual review fallback without changing the cap.

cosmic-comp delivers zcosmic_toplevel_handle_v1 State ~90ms after
the sync roundtrip completes, so a fixed 4-roundtrip snapshot always
exits before focus state arrives and every window reads focused:false.

- prime(): wait (poll on queue fd, 800ms budget) for initial State
  on every cosmic handle instead of blind roundtrips
- activate(): verify Activated on the same connection post-activate
  and report the verified result instead of fire-and-forget ok:true

Tested on Arch + cosmic-comp 1.9.0: list-windows now reports the
focused editor, activate-window returns verified focus.
@totosiu
totosiu requested a review from avifenesh as a code owner October 10, 2026 10:36

@revuto-review revuto-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an auto review done by revuto.


Revuto completed the review and found no evidence-backed concerns.

Signed-off-by: Avi Fenesh <aviarchi1994@gmail.com>
@avifenesh

Copy link
Copy Markdown
Collaborator

Self-review at 581c364: I validated the actual helper with a delayed Wayland protocol peer and fixed incomplete-state success, stale closed windows and early monitor-layout reads on this contributor branch. The event loop also retries spurious nonblocking reads.

All 438 local Rust tests passed. The eight protocol scenarios now pass; missing-state, closed-window and output-layout checks failed on the initial patch. Formatting and all-target Clippy passed. I reviewed read-guard cancellation, finite deadlines, initial-state readiness and activation verification. No remaining findings.

Local doctor reports GNOME 50.1 on Wayland. This is protocol-level COSMIC validation, not a new live COSMIC session measurement.

@avifenesh avifenesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the final patch and validated the helper locally. Initial-state and activation waits now have regression coverage.

@revuto-review revuto-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an auto review done by revuto.


Revuto completed the review and found no evidence-backed concerns.

Signed-off-by: Avi Fenesh <aviarchi1994@gmail.com>
@avifenesh avifenesh changed the title fix: verify COSMIC focus via bounded state wait fix: verify COSMIC focus and release v0.7.14 Oct 10, 2026
@avifenesh

Copy link
Copy Markdown
Collaborator

Self-review at 1173853: merged the validated Pi fix from main and prepared v0.7.14 in this existing PR. Both changelog entries are retained. Cargo, npm, MCP handshake, generated catalog, plugin manifests and launcher versions agree. Combined Pi tests: 33 passed. Catalog, plugin synchronization, npm package and diff checks passed. The COSMIC runtime code is unchanged from the previously reviewed and validated 581c364. No remaining findings.

@avifenesh avifenesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the final combined source and v0.7.14 metadata. Local validation passed.

Signed-off-by: Avi Fenesh <aviarchi1994@gmail.com>
@avifenesh

Copy link
Copy Markdown
Collaborator

Fresh-context subagent self-review of e8623a5: no remaining actionable findings. The reviewer found missing changelog comparison links; fixed in e8623a5 and independently re-reviewed.

Scope: COSMIC runtime and protocol fixture, packaging/release metadata, and the merged Pi fix from #243. The reviewer independently ran all eight COSMIC wire scenarios against the existing debug helper and checked the diff. All passed. No independent rebuild, full-suite rerun or live COSMIC session was performed. My separate local validation passed all 438 Rust tests and 33 Pi tests, all-target Clippy, MCP safety/plugin/packaging checks and cargo publish --dry-run.

Revuto approved the runtime fix at 581c364. Its final-head check is capped at the configured two review rounds, not a code verdict. The owner requested keeping that cap and using this subagent self-review for the final release changes. The cap remains unchanged.

@avifenesh avifenesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fresh-context subagent review complete. Its changelog finding was fixed and re-reviewed. No remaining actionable findings; local validation passed.

@avifenesh
avifenesh merged commit d35e354 into agent-sh:main Oct 10, 2026
17 of 18 checks passed
@avifenesh

Copy link
Copy Markdown
Collaborator

Merged after local validation, green code CI and fresh-context subagent review. Thanks for the COSMIC trace and live validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COSMIC: focused always false, activate-window unverified — compositor state arrives after snapshot exits

2 participants