Skip to content

test(subflow-override-lab): cover parent long-poll and scoped view overrides end to end - #22

Merged
yilmaztayfun merged 2 commits into
masterfrom
test/subflow-override-interaction-views
Sep 23, 2026
Merged

yilmaztayfun merged 2 commits into
masterfrom
test/subflow-override-interaction-views

Conversation

@yilmaztayfun

Copy link
Copy Markdown
Contributor

Summary

  • New integration scenario subflow-override-lab. It verifies end to end the runtime feature in feat(subflow): let a parent override a child's long-poll window/roles and scoped views vnext#1028: a parent overriding a SubFlow child's long-poll window and roles, and swapping the view the child's rules selected, per child state or child transition.
  • It is a new scenario rather than an extension of authorization-chain-lab: changing that leaf's long-poll would have changed that suite's ack contract (leaf roles=[chain.admin]).

Changes

  • Components (core/):
    • Workflows: top → mid → child (a three-level chain for the one-hop check), and parent, parent-short, parent-roles, parent-nolp, parent-legacy (legacy overrides.views regression).
    • plain-child, and six views.
    • OverrideLabSubFlowMapping.csx, OverrideLabAlwaysTrueRule.csx.
    • Everything is generated by build-subflow-override-lab.py.
  • Tests (Tests/SubflowOverrideLab, 12 tests, 2 classes):
    • LongPollOverrideTests: the state body reports the parent's window; the fallback job fires on the parent's window; the roles override governs who gets the interaction and who authorize?ack=true admits, through the parent and on the child directly; an override on a state with no long-poll adds nothing; the override does not reach the grandchild.
    • ViewOverrideTests: state-scoped and transition-scoped overrides, including on the directly addressed child; no leak between state and transition views; a legacy map regression check.
  • Tests/SubflowOverrideLab/README.md and the TEST-SCENARIOS.md row, in the same commit.
  • A follow-up commit records that the long-poll ack job row now persists ExecuteAt (runtime fix 5f60ab4b in vnext#1028).

Test Plan

  • VNEXT_BASE_URL=http://localhost:4201 dotnet test tests/Core.IntegrationTests --filter "FullyQualifiedName~SubflowOverrideLab" against the locally built runtime from vnext#1028 (run-docker.sh up core). Result: 12/12, three runs, on runtime e7cb023c and 5f60ab4b.
  • Neighbouring suites on the same runtime: AuthorizationChainLab 44 passed (+7 skipped morph-idm provider tests), SubflowOrchestration 22/22, TimeoutLab 3/3.
  • Postgres (subflow_override_lab_child.InstanceJobs, JobType=4): after the runtime fix 10/10 rows have ExecuteAt set, versus 0/22 before. ExecuteAt − CreatedAt is 600 / 120 / 5 s: the child's own window, the parent override, and the short override.

Notes

  • Depends on feat(subflow): let a parent override a child's long-poll window/roles and scoped views vnext#1028. Against an older runtime the new tests fail: the override is ignored.
  • Known gap: the installed @burgan-tech/vnext-schema 0.0.52 does not know the new override fields, so five parent flows fail npm run validate. The SDK publishes the JSON directly (/definitions/publish), so this does not block the tests. The fix is feat(schema): subflow long-poll and state/transition-scoped view overrides vnext-schema#139, then a schema version bump in this repo.
  • The lab's SubFlow mapping forwards role headers to the child on purpose. A roles-gated long-poll on a runtime-started child pauses only when the triggering caller's roles are present, and SubflowStarter sends only the headers the mapping returns. This is the consuming parent's decision, as documented in vnext docs/domain/long-poll-termination.md.
  • Evidence comes from host logs and postgres. OpenObserve and Elasticsearch were not connected, so there are no trace measurements.

🤖 Generated with Claude Code

yilmaztayfun and others added 2 commits September 23, 2026 23:02
…errides end to end

New scenario for runtime feature/subflow-override-interaction-views: a parent's
overrides.states.<childState>.interaction.longPoll (fallbackTimeoutSeconds, roles) and
overrides.states/transitions.<key>.views, resolved child-side on the child's own state.

- 9 flows + 6 views, generated by build-subflow-override-lab.py
- LongPollOverrideTests (6): window in state body, armed job fires on the parent's window
  (5 s override on a 600 s child), roles replace on state function + authorize?ack=true via
  parent and child-direct, arm honours the roles override, no long-poll added to a state
  without one, one hop (P's override does not reach G)
- ViewOverrideTests (6): state- and transition-scoped swap via parent and child-direct, no
  state->transition leak, unresolvable override falls back, one hop, legacy overrides.views
  still parent-side only
- README + TEST-SCENARIOS row

12/12 against the locally built runtime (e7cb023c); neighbours AuthorizationChainLab 44/44,
SubflowOrchestration 22/22, TimeoutLab 3/3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sists ExecuteAt

Runtime 5f60ab4b writes the fallback deadline to the InstanceJobs row.
The test stays behavioural (no read surface exposes the row and the
suite has no database access); the texts that said ExecuteAt is NULL
now record the before/after postgres measurement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yilmaztayfun
yilmaztayfun requested review from a team September 23, 2026 20:39
@coderabbitai

coderabbitai Bot commented Sep 23, 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: 37cd575b-0929-4cb7-816c-f8387e5f0823


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 Sep 23, 2026
@yilmaztayfun
yilmaztayfun merged commit 7248cc2 into master Sep 23, 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