Two rustdoc comments misdescribe Seatbelt's UI enforcement and the FFI's one-shot path

Open Beginner friendly
#1,642 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
documentation

Research direction

Start with the ui_specified rustdoc in src/mxc-sdk/src/core/mxc_common/models.rs, then check write_ui_rules in src/mxc-sdk/src/backends/seatbelt/common/profile_builder.rs to confirm which UI fields Seatbelt enforces. Next, read the module comment in src/mxc-sdk/src/core/mxc_engine/run.rs and trace __ffi::run_json to execute_one_shot_json to confirm it does not call run. Done when both comments match the code and no other text in those files claims otherwise.

Written by the indexing model from the issue text.

Description

Backend-Seatbelt Issue-Docs
Brief description of your issue

Two rustdoc comments describe behavior the code does not have:

  • ContainerPolicy::ui_specified in src/mxc-sdk/src/core/mxc_common/models.rs lists Seatbelt among the backends that "still accept and ignore" policy.ui. Seatbelt enforces it: write_ui_rules in src/mxc-sdk/src/backends/seatbelt/common/profile_builder.rs denies WindowServer and LaunchServices when ui.disable is set, the pasteboard when ui.clipboard is none, and HID access when ui.injection is false.
  • The module comment of src/mxc-sdk/src/core/mxc_engine/run.rs names the FFI layer among the callers of run. Only lxc-exec and mxc-exec-mac call it; the FFI's one-shot entry, mxc_sdk::__ffi::run_json, goes through mxc_engine::execute_one_shot_json, which does not call run.
Dominant language
Rust
Stars
3.1k
Forks
171
Avg merge
2d 10h
Merged PRs (30d)
111

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/mxc

All issues in microsoft/mxc

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.