Skip to content

Support copilot: make role-add extraction AI-first#3593

Merged
bernardhanna merged 1 commit into
devfrom
feature/role-add-ai-first
Jun 30, 2026
Merged

Support copilot: make role-add extraction AI-first#3593
bernardhanna merged 1 commit into
devfrom
feature/role-add-ai-first

Conversation

@bernardhanna

Copy link
Copy Markdown
Collaborator

Summary

  • Role-add now extracts the role and target emails from the Cursor triage result (AI), using the deterministic SupportRoleRequestParser only as a fallback when triage produced nothing usable.
  • Cursor triage schema + prompt now emit role_name / role_operation; the heuristic triage exposes the same fields so the merged schema is stable.
  • New SupportRoleRequestResolver centralises the AI-first-with-parser-fallback logic; UserRoleAddService and proposedActionForCase both use it.
  • The dry-run + APPROVE gate is unchanged — the reviewer still confirms the full list of accounts before anything is applied.

Test plan

  • SupportRoleRequestResolverTest — AI-first resolution and parser fallback
  • UserRoleAddServiceTest, SupportRoleRequestParserTest
  • SupportDryRunEmailCopyTest, SupportCompletionEmailCopyTest, SupportApprovalCompletionEmailTest
  • All 19 tests pass locally.

Made with Cursor

The role-add action now takes the role and target emails from the Cursor
triage result (emails via the case target/secondary fields, role via new
role_name/role_operation triage outputs), falling back to the deterministic
SupportRoleRequestParser only when triage produced nothing usable.

- Cursor triage schema + prompt now emit role_name/role_operation
- heuristic triage exposes the same fields so the schema is stable
- new SupportRoleRequestResolver centralises AI-first-with-parser-fallback
- UserRoleAddService and proposedActionForCase use the resolver
- dry-run + APPROVE gate is unchanged; reviewer still confirms the full list

Tests: resolver AI-first + fallback, plus existing role/email copy suites.
Co-authored-by: Cursor <cursoragent@cursor.com>
@bernardhanna bernardhanna merged commit d7a4b0d into dev Jun 30, 2026
@bernardhanna bernardhanna deleted the feature/role-add-ai-first branch June 30, 2026 14:10
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