Skip to content

Add managed enterprise config#70

Open
jmcte wants to merge 4 commits into
mainfrom
codex/issue-51-managed-config
Open

Add managed enterprise config#70
jmcte wants to merge 4 commits into
mainfrom
codex/issue-51-managed-config

Conversation

@jmcte
Copy link
Copy Markdown
Contributor

@jmcte jmcte commented May 23, 2026

Summary

  • Closes Roadmap: MDM-friendly managed config for enterprise rollouts #51 by adding managed macOS preference support for the dev.omt.apw domain before ~/.apw/config.json.
  • Adds managed/user/default provenance to apw doctor --json through a managed-config check.
  • Adds enterprise deployment docs with a sample .mobileconfig payload and links it from the docs index.
  • Extends config/runtime schema for managed supportedDomains and disableDemo, and lets associated-domain doctor checks consume configured domains.
  • Preserves invalid user-config failures under MDM so managed preferences do not silently bypass malformed or unsafe local config files.
  • Keeps the associated-domain doctor probe non-destructive: malformed user config is preserved while supportedDomains are read from managed preferences or a best-effort user-config parse.

Verification

  • cargo fmt --manifest-path rust/Cargo.toml -- --check
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path rust/Cargo.toml utils::tests::supported_domain_probe_read -- --nocapture
  • cargo test --manifest-path rust/Cargo.toml doctor::tests::associated_domains_check_skipped_when_env_unset -- --nocapture
  • cargo test --manifest-path rust/Cargo.toml read_config_applies_managed_preferences_before_user_config -- --nocapture
  • cargo test --manifest-path rust/Cargo.toml config_provenance_reports_specific_setting_sources -- --nocapture
  • cargo test --manifest-path rust/Cargo.toml managed_config_check_reports_setting_provenance_in_json -- --nocapture
  • cargo test --manifest-path rust/Cargo.toml managed_preferences_do_not_mask_invalid_user_config -- --nocapture
  • bash scripts/ci/run-fast-checks.sh
  • git diff --check
  • cargo test --manifest-path rust/Cargo.toml (outside sandbox; sandboxed local sockets fail with Operation not permitted)

Notes

Close #51 by reading managed macOS preferences from the dev.omt.apw domain before user config, surfacing per-setting provenance in doctor JSON, and documenting the MDM mobileconfig payload.

Tests cover managed-over-user precedence and doctor provenance.
@jmcte jmcte requested a review from pheidon as a code owner May 23, 2026 22:19
@athena-omt athena-omt added area:infra Infrastructure, CI, release, governance, scripts, or repo setup. lane:daedalus Daedalus implementation/forge lane. review:athena Athena review governance requested. risk:medium Medium-risk change; normal care required. state:waiting-checks Waiting for CI/check status to settle. status:needs-review PR is ready for Athena review. labels May 23, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 755627de56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/src/doctor.rs Outdated
Comment on lines +295 to +297
crate::utils::read_config_file()
.map(|config| config.supported_domains)
.unwrap_or_default()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Prevent doctor from mutating config on read failures

When APW_AASA_DOMAINS is unset, this check now calls read_config_file(), which can invoke clear_config() on malformed/unsupported user config and delete ~/.apw/config.json. That makes apw doctor destructive: simply running diagnostics can erase operator state instead of just reporting it. This is reproducible with an invalid JSON config file and no env override, and should be avoided by using a non-destructive read path for supportedDomains.

Useful? React with 👍 / 👎.

@pheidon pheidon added state:needs-repair PR needs repair before review can proceed. codex:P1 Codex Connector P1 finding. priority:P1 Codex Connector P1; blocks execution until Athena and Ares validate. risk:high High-risk change; validation required. and removed state:waiting-checks Waiting for CI/check status to settle. labels May 24, 2026
@athena-omt athena-omt added the state:waiting-checks Waiting for CI/check status to settle. label May 24, 2026
@jmcte jmcte removed state:waiting-checks Waiting for CI/check status to settle. state:needs-repair PR needs repair before review can proceed. labels May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:infra Infrastructure, CI, release, governance, scripts, or repo setup. codex:P1 Codex Connector P1 finding. lane:daedalus Daedalus implementation/forge lane. priority:P1 Codex Connector P1; blocks execution until Athena and Ares validate. review:athena Athena review governance requested. risk:high High-risk change; validation required. risk:medium Medium-risk change; normal care required. status:needs-review PR is ready for Athena review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Roadmap: MDM-friendly managed config for enterprise rollouts

3 participants