Skip to content

fix(unix): Preserve AT-SPI cache signal structure arguments - #819

Merged
DataTriny merged 2 commits into
AccessKit:mainfrom
Yazelix:fix-atspi-cache-signal-arguments
Oct 11, 2026
Merged

DataTriny merged 2 commits into
AccessKit:mainfrom
Yazelix:fix-atspi-cache-signal-arguments

Conversation

@luccahuguet

@luccahuguet luccahuguet commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

The Unix adapter flattens the structure argument in Cache.AddAccessible and Cache.RemoveAccessible. GNOME AT-SPI rejects the resulting signatures, leaving clients with stale cache state that can disrupt Orca focus and selection reporting.

Wrap the body in a one-element tuple in the shared emit_cache_signal helper, and require Type for tuple serialization. Both signals then preserve their required structure:

Signal Before After
AddAccessible (so)(so)(so)iiassusau ((so)(so)(so)iiassusau)
RemoveAccessible so (so)

Only two production lines in adapters/unix/src/atspi/bus.rs differ from upstream 466e24e252103f4d82bd6fbab98141b551e46e0c. The standalone private-D-Bus test was removed at the maintainer's request pending a proper Unix test harness. No manifests, dependencies, lockfile, or generated changelogs change.

Validation on the revised candidate, x86_64 Linux:

  • cargo +1.87.0 test --locked -p accesskit_unix: 5 passed.
  • cargo fmt --all -- --check: passed.
  • git diff --check: passed.

Before test removal, the private D-Bus regression failed without the fix and passed with it, checking the encoded SIGNATURE headers and round-tripping both payloads. Removing the test does not change the verified production code. GNOME's AddAccessible handler and RemoveAccessible handler require the corrected signatures.

The same correction was separately verified downstream with Orca 49.4 and AT-SPI 2.58.1 on native Wayland using this backport. That run used accesskit_unix 0.22.1 / zbus 5.18.0 / zvariant 5.13.1. Current-upstream native Orca and non-Linux runtime checks were not run.

Closes #818.

@DataTriny

Copy link
Copy Markdown
Member

Hello @luccahuguet,

Thanks for the fix. As they stand, the tests are unfortunately not very useful. I would remove them until we have a proper test harness for Unix.

@luccahuguet

Copy link
Copy Markdown
Contributor Author

Hello @luccahuguet,

Thanks for the fix. As they stand, the tests are unfortunately not very useful. I would remove them until we have a proper test harness for Unix.

thanks! I'll remove them

@luccahuguet

Copy link
Copy Markdown
Contributor Author

(done) @DataTriny

@DataTriny DataTriny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@DataTriny
DataTriny merged commit bffadac into AccessKit:main Oct 11, 2026
26 checks passed
@DataTriny DataTriny mentioned this pull request Oct 11, 2026
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.

Unix cache signals lose their structure argument and are rejected by AT-SPI

2 participants