Skip to content

refactor(mdm): organize client commands and reply ownership - #1049

Closed
Gajesh2007 wants to merge 9 commits into
refactor/coordinator-wire-protocolfrom
refactor/coordinator-mdm-client
Closed

Gajesh2007 wants to merge 9 commits into
refactor/coordinator-wire-protocolfrom
refactor/coordinator-mdm-client

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

The 983-line MicroMDM client file mixed transport setup, device lookup, outbound policy, command correlation, two waiter lifecycles, webhook delivery and plist parsing. These operations now have named files within the existing mdm package, with doc.go mapping the exchange. Three test filenames describe command security, command delivery and waiter ownership.

The client keeps the same state and locks. Exact command UUID checks, bounded early SecurityInfo replies, cancellation, late callbacks, read-only allowlist, transport requests and push order are preserved. Maintained source maps follow the new files, and the existing MDM security-review patterns cover the whole package. Documentation now names the actual error return, early-reply binding and DevicePropertiesAttestation query. Stacked on #1042.

Before:

flowchart LR
  Caller[Verification or scheduler] --> Client[mdm.go: Client]
  Client --> Send[mdm.go: lookup, allowlist, issue command and install waiter]
  Send --> Device[MicroMDM and provider device]
  Device --> Hook[mdm.go: HandleWebhook and plist parsers]
  Hook --> Gate[mdm.go: issued UUID and exact waiter checks]
  Gate --> Result[Evidence, late callback, dropped reply or timeout]
Loading

After:

flowchart LR
  Caller[Verification or scheduler] --> Client[client.go: Client]
  Client --> Exchange[security_info.go or device_attestation.go]
  Exchange --> Send[devices.go, command_policy.go and commands.go]
  Send --> Device[Same MicroMDM requests and push order]
  Device --> Hook[webhook.go: HandleWebhook; plist.go parsers]
  Hook --> Gate[command_tracking.go and unchanged waiter checks]
  Gate --> Result[Same evidence, late callback, dropped reply or timeout]
  Guide[doc.go] --> Exchange
Loading

Validation: all 68 package declarations preserve their executable code; 37 production declarations move out of mdm.go. Existing comments are preserved except one startup-file citation. All four original test files retain their bytes. The existing MDM race suite passes all 17 tests with no skips; all coordinator test packages compile; command build and pinned lint pass. All 281 documentation checks pass, and the actual security-review selector includes each MDM Go file under T-021, T-023 and T-036. Tests use local HTTP fixtures; no live device or Apple-service run is claimed.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Parent refresh fbeea8d90 incorporates protocol parent 7c93587de. The complete Git-tree comparison preserves every runtime, test, module and gitlink state from the previously reviewed child; only the protocol review prompt and maintained guidance change. All 281 documentation files pass, and the test guide is stamped to composed source e50cfc48d.

@vercel

vercel Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 14, 2026 7:20pm UTC
d-inference-console-ui-dev Ready Ready Preview Sep 14, 2026 7:20pm UTC
d-inference-landing Ready Ready Preview Sep 14, 2026 7:20pm UTC

Request Review

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T19:06:42.867230Z abb0b98 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa5b144bfd

ℹ️ 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 docs/threat-model.yaml Resolved
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

Updated TB-005 to coordinator/mdm/security_info.go VerifyProviderWithUDIDObserver and T-021 to coordinator/mdm/webhook.go plus the current server.go webhook handler and routes. Only these two source-reference strings changed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: abb0b98dd0

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

Refreshed the parent to #1042 at 7c93587de, preserving all runtime/test/module/gitlink states from the reviewed child. Only protocol-review guidance and test-guide wording/stamps changed. Exact parent composition proof and all 281 documentation checks pass; composed source is e50cfc48d.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1056 for review and merge after #1094, #1095 and #1096. #1056 contains this branch's exact head (fbeea8d908427b05832dcd67bc5b2640848a97c7), including its reviewed fixes, with implementations and regressions reconciled into the coordinator subsystem owners. Closing the component PR to collapse the stack; its branch, commits and review history are retained. Follow #1056 for combined validation and merge status.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference-console-ui-dev — fbeea8d9 Deployed Sep 14, 2026 by vercel[bot]
Preview – d-inference — fbeea8d9 Deployed Sep 14, 2026 by vercel[bot]
Preview – d-inference-landing — fbeea8d9 Deployed Sep 14, 2026 by vercel[bot]
benchmarks — fbeea8d9 Deployed Sep 14, 2026 by Gajesh2007 via E2E Benchmarks #1331
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.

1 participant