Skip to content

Recovery lock password activities#41529

Merged
mostlikelee merged 93 commits intomainfrom
41045-activities
Mar 17, 2026
Merged

Recovery lock password activities#41529
mostlikelee merged 93 commits intomainfrom
41045-activities

Conversation

@mostlikelee
Copy link
Contributor

@mostlikelee mostlikelee commented Mar 12, 2026

Related issue: Resolves #41045

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced recovery lock password activity tracking with host-scoped operations for setting recovery lock passwords
    • Improved handling and error reporting for recovery lock command processing
  • Tests

    • Added comprehensive test coverage for recovery lock workflows, including successful operations, error scenarios, and failure modes

@mostlikelee
Copy link
Contributor Author

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

✅ Actions performed

Full review triggered.

@mostlikelee
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- Only log set_host_recovery_lock_password activity for SET operations,
  not CLEAR operations
- Only log activity when host lookup succeeds (prevents HostIDs()
  returning [0])
- Add newActivityFn parameter to test cases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mostlikelee mostlikelee marked this pull request as ready for review March 17, 2026 14:06
@mostlikelee mostlikelee requested a review from a team as a code owner March 17, 2026 14:06
Copilot AI review requested due to automatic review settings March 17, 2026 14:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new set_host_recovery_lock_password activity type for host-scoped recovery lock operations and renames the existing enabled_recovery_lock_password/disabled_recovery_lock_password activity types to plural forms (enabled_recovery_lock_passwords/disabled_recovery_lock_passwords). It also adds recovery lock password activity logging to the editTeamFromSpec and createTeamFromSpec flows.

Changes:

  • New ActivityTypeSetHostRecoveryLockPassword activity type with HostIDs() and WasFromAutomation() support, logged when a recovery lock command is acknowledged
  • Renamed ActivityTypeEnabledRecoveryLockPasswordActivityTypeEnabledRecoveryLockPasswords (and disabled variant) with updated activity name strings
  • Added recovery lock password activity creation in createTeamFromSpec and editTeamFromSpec

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
server/fleet/activities.go New SetHostRecoveryLockPassword activity type; renamed enabled/disabled types to plural
server/service/apple_mdm.go Handler now accepts newActivityFn, logs activity on successful recovery lock verification
server/service/appconfig.go Updated references to renamed activity types
ee/server/service/teams.go Updated references; added activity logging in createTeamFromSpec and editTeamFromSpec
cmd/fleet/serve.go Pass svc.NewActivity to NewSetRecoveryLockResultsHandler
server/service/testing_utils.go Pass svc.NewActivity to NewSetRecoveryLockResultsHandler
server/service/apple_mdm_cmd_results_test.go Updated tests with activity function parameter and assertions
server/service/integration_mdm_test.go Updated test references to renamed activity types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mostlikelee mostlikelee merged commit 012147a into main Mar 17, 2026
55 checks passed
@mostlikelee mostlikelee deleted the 41045-activities branch March 17, 2026 14:48
mostlikelee added a commit that referenced this pull request Mar 18, 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.

Set Password: BE Activities

5 participants