Skip to content

test(error-boundary-lab): pin context.Incident inside a handled subflow fault - #28

Merged
yilmaztayfun merged 1 commit into
masterfrom
test/script-context-incident
Oct 2, 2026
Merged

yilmaztayfun merged 1 commit into
masterfrom
test/script-context-incident

Conversation

@yilmaztayfun

Copy link
Copy Markdown
Contributor

Summary

  • Adds an incident probe to eb-sf-root: its boundary transition (r-has-error) and the r-error-end OnEntry each run a mapping that writes what context.Incident shows into instance data.
  • SubFlowFaultChainTests.AMappingInsideTheBoundaryHandling_SeesTheSubFlowIncident asserts both slots see the leaf's incident: task eb-http-400-task, status 400, Notify, count 1.
  • Pins the runtime fix in burgan-tech/vnext (fix/script-context-incident-snapshot). Before that fix, a mapping in either slot saw hasActiveIncident: true but ActiveIncident: null and a count of 0. That is the preprod report: the onboarding developer could not branch on the subflow's failure.

Changes

  • core/Workflows/error-boundary-lab/src/EbIncidentProbeMapping.csx: the probe mapping.
  • core/Tasks/error-boundary-lab/eb-incident-probe-task{,-2}.json: one script-task component per slot. The task journal key is (transition, task), so the same component can't be used twice in one transition.
  • build-error-boundary-lab.py: wires the probes and bumps the lab to 1.2.0, because a published version is immutable. The regenerated JSON follows.
  • README and the TEST-SCENARIOS.md row record the defect and the fix.

Test Plan

  • wf domain use core && wf update
  • VNEXT_BASE_URL=http://localhost:4201 dotnet test --filter "FullyQualifiedName~ErrorBoundaryLab"

Integration test evidence

  • Scenario: Tests/ErrorBoundaryLab (--filter FullyQualifiedName~ErrorBoundaryLab)
  • Runtime: vnext fix/script-context-incident-snapshot @ 866d4809, http://localhost:4201 (run-docker.sh up core)
  • Result: 37/38 green. The one red is SecuredIncidentsTests.WithoutTheRole_…Refuse: it still expects 403, but vnext #1027 moved queryRoles enforcement out of the runtime, so the expectation is stale and unrelated to this change.
  • On a runtime without the fix, both new cases go red (the probe records activeIncidentPresent: false, totalIncidentCount: 0).
  • Persisted rows (postgres, last run): root C with one resolved Notify incident; mid and leaf F with one open Abort incident each, all with status 400 and task eb-http-400-task.
  • TEST-SCENARIOS.md row updated: yes

Notes

  • Merge after, or together with, the vnext fix. Against an unfixed runtime the two new cases are red by design.

🤖 Generated with Claude Code

…ow fault

eb-sf-root's boundary transition (r-has-error) and its error end's OnEntry
now run an incident probe mapping that records what context.Incident shows.
Before the runtime fix both read hasActiveIncident = true with no active
incident and a count of 0; with it they see the leaf's incident (task,
status 400, Notify). SubFlowFaultChainTests asserts both slots.

The lab moves to 1.2.0 (a published version is immutable). README and the
TEST-SCENARIOS row record the defect and the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yilmaztayfun
yilmaztayfun requested review from a team October 1, 2026 22:58
@coldtea-pr-lens

Copy link
Copy Markdown

◈ PR Lens

Note

The title starts with test(error-boundary-lab):, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4857f844-19d0-4c9f-b9e6-f5583616adb0

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yilmaztayfun yilmaztayfun self-assigned this Oct 2, 2026
@yilmaztayfun
yilmaztayfun merged commit bc3a243 into master Oct 2, 2026
2 of 3 checks passed
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