Skip to content

feat(servicenow): add Test and Prod realm lifecycle to Connect - #509

Open
DapheneShao wants to merge 3 commits into
mainfrom
daphneshao-microsoft-servicenow-test-prod-realm
Open

DapheneShao wants to merge 3 commits into
mainfrom
daphneshao-microsoft-servicenow-test-prod-realm

Conversation

@DapheneShao

@DapheneShao DapheneShao commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds Test and Prod lifecycle support to ESS ServiceNow Connect (HRSD and ITSM), following the Workday Connect DEV/TEST/PROD journey. The maker says the agent was promoted to Test or Prod, or pastes the Test or Prod agent link, in the same /connect ServiceNow flow (no new slash commands). The controller proves the exact promoted sibling of the recorded Dev agent; a Dev link or a link outside the family is rejected.

Test and Prod checks are independent of Dev, so a connection that is on in Dev but off or stale in Test or Prod is caught:

  • No Dev lifecycle gate and no Test-before-Prod gate. A Dev record is an optional reference only; with none, Connect asks only for the missing instance and client ID, then the administrator confirms. Administrator-confirmed values are kept only when they still apply to the agent, tenant and shared instance.
  • Read-only checks per realm, reported per item: connection exists, is connected, is bound to this agent; instance, client ID and auth type match; required topics are on; portal URL is set.
  • Connection problems (missing, not bound, disconnected) are blocked with a plain message naming the condition and saying the supported repair is not yet defined. No repair steps, no handoff, never the Dev connection. Re-run the check once resolved.
  • Topics and portal are never edited: the maker fixes them in Dev, promotes again, and re-checks.
  • State is kept per realm; Dev changes do not invalidate Test or Prod.

Maker-visible wording follows the ServiceNow Connect UX spec (S5): realm intro, Test-pane request, a "Done"-only reply is never recorded as pass or fail and gets the follow-up question, a "Which destination" question when the realm is unclear, denied vs. inconclusive access messages, a completion message that says what was and was not verified, and short recovery rules (wrong environment tested, expected empty result, identity mismatch, empty HR service areas). Wording only; no state changes.

Unchanged: Dev behavior and wording, Setup, Workday. Trial merge with #507 is clean, so this PR targets main.

Related issue

Refs #507

Type of change

  • New feature (non-breaking change which adds functionality)

Testing

  • ruff check . passed.
  • pytest tests/scripts/test_connect_servicenow_da.py tests/scripts/test_connect_servicenow_realms.py tests/setup: 639 passed, 1 failed (the known baseline test_workday_topic_activation_uses_complete_mapped_scope).
  • Mocked and unit tests only; no live-tenant run.

Checklist

  • My code follows the existing style
  • I have added/updated tests where applicable
  • I have updated documentation as needed

Daphne Shao and others added 3 commits November 16, 2026 17:00
Discover the promoted Test or Prod sibling of the recorded Dev agent from natural language or an agent link, reuse the Dev tenant foundation, and check Connections, Runtime configuration and Maker validation per realm.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the Dev-Ready and Test-Ready gates; Dev record is an optional reference. Per-item read-only connection, topic and portal checks per realm. Connection problems are blocked with no repair or handoff and never reuse the Dev connection. Admin-confirmed values are retained only when they still apply to the agent, tenant and instance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add the realm intro, Test-pane request, Done follow-up, completion scope, destination question, denied vs inconclusive access, and J/K/L/M recovery wording. Wording only; no state changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
DapheneShao pushed a commit that referenced this pull request Nov 18, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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