Skip to content

Instantly share code, notes, and snippets.

@panchicore
Created March 18, 2026 21:39
Show Gist options
  • Select an option

  • Save panchicore/54acd851a4f275befc3e50c22e551d78 to your computer and use it in GitHub Desktop.

Select an option

Save panchicore/54acd851a4f275befc3e50c22e551d78 to your computer and use it in GitHub Desktop.

SA2 Final Verification — Authorization Request

Ticket: SC-14561 — 25 - Final SA2 verification: zero legacy patterns + docs update

Current State

77 SA1 legacy patterns remain across src/backend/ (76) and tests/ (1). The CI gate already blocks new patterns on every PR. We need to reach zero to close the SA2 migration epic.

Proposed: 9 PRs (one per logical group)

# PR Scope Patterns Files Risk
1 Tasks (Celery)workflows.py, reporting.py, inventory_models.py, user.py 11 4 Medium — raw session usage in async workers
2 Authauth.py, auth_service.py, oidc_mappings.py 8 3 High — auth critical path
3 Handlers (non-MD)amazon_marketplace, task_handlers, business_units, custom_fields, entity_attachments, assets, model_document_templates, custom_field_rename 12 8 Medium — spread across handlers, each file small
4 Utilsreport_render_helpers, event_helpers, celery_session, attestation_roles 10 4 Medium — report_render_helpers has 5 patterns
5 Loaders/Bootstrapload_org_default_roles, load_finding_severities, load_rbac_resources, load_business_units 12 4 Low — startup scripts, rarely change
6 Notificationsemail_notifications, update_notifications 3 2 Low
7 Custom field migrators + settingspermission_migrator, workflow_execution_migrator, page_layout_migrator, settings_manager 6 4 Low
8 Remaining singlescreate_org, model_document task, querybuilder/stakeholders 3 3 Low
9 Test + cleanup — integration test fix, baseline refresh to zeros, docs update 1 3 Low — final PR after all above merge

Total: 77 patterns → 0

Why 9 separate PRs

  • Each PR is reviewable in isolation (~3-12 patterns)
  • Rollback scope is narrow if something breaks
  • Auth (PR 2) gets dedicated review attention
  • PR 9 is the gate: only merges when progress script reports zero

Out of scope

  • finding_handlers.py — already being migrated by MD in SC-15221
  • migrations/versions/ — historical migration scripts, not scanned
  • scripts/ and agents-ui/ — not in scan scope

Ask

Authorize this 9-PR plan so I can start executing against SC-14561.

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