Skip to content

refactor: split PermissionsCleanup.runInternal() into stages - #345

Open
smigiska wants to merge 2 commits into
mainfrom
refactor/split-permissions-cleanup
Open

refactor: split PermissionsCleanup.runInternal() into stages#345
smigiska wants to merge 2 commits into
mainfrom
refactor/split-permissions-cleanup

Conversation

@smigiska

Copy link
Copy Markdown
Contributor

I split the runInternal() method in the PermissionsCleanup command into three separate stage methods to reduce its Cognitive Complexity
CLOSES: #335

@smigiska
smigiska requested a review from a team as a code owner August 31, 2026 17:37
Comment thread commands/permissions_cleanup.ts Outdated
): Promise<string> {
private async stage1DiscoverAclModels(
task: TaskHandle,
): Promise<{ model: LucidModel; alias: string }[]> {

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.

extract into type declarations like in #342

Comment thread commands/permissions_cleanup.ts Outdated
Comment on lines +75 to +78
): Promise<
| { pendingDeletes: ExtendedMap<string, number[]>; totalOrphans: number }
| string
> {

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.

as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: split up PermissionsCleanup.runInternal()

2 participants