Skip to content

Rewrite Tutorial 02: Temporal.io workflow orchestration (saga, fan-out, scalability)#56

Merged
devstress merged 36 commits intomainfrom
copilot/redo-integrations-real-lab-exam
Apr 7, 2026
Merged

Rewrite Tutorial 02: Temporal.io workflow orchestration (saga, fan-out, scalability)#56
devstress merged 36 commits intomainfrom
copilot/redo-integrations-real-lab-exam

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

  • Investigate CI failure: UnitTests project has 1 failing test BrokerType_HasExpectedValues
  • Root cause: test asserts BrokerType enum has 3 values, but Postgres was added as 4th broker
  • Fix: Update BrokerTypeTests.cs to expect 4 values and include Postgres assertions
  • Verify locally: 1541/1541 UnitTests pass

Copilot AI and others added 6 commits April 6, 2026 16:40
…IP components

Tutorial 01 Lab/Exam: Real PointToPointChannel and PublishSubscribeChannel
- P2P send/receive through real channel with handler invocation
- PubSub fan-out with multiple subscribers
- Multi-hop pipeline: P2P → handler enrichment → PubSub fanout
- Domain objects (OrderPayload) flowing through real channels
- Causation chains preserved through channel hops
- Multi-stage pipeline: command in → transform → event out

Tutorial 02 Lab/Exam: Real ServiceActivator wired via DI
- ServiceActivator fire-and-forget invocation
- ServiceActivator request-reply with ReplyTo address + causation chain
- Full pipeline: P2P channel → ServiceActivator → reply channel
- Named endpoints for independent pipelines
- PubSub with multiple DI-wired handlers
- Multi-stage DI pipeline: channel → activator → enrichment → output
- Multiple independent ServiceActivators with separate endpoints

Updated tutorial markdown files to match new lab/exam patterns.

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/3b20ecd5-8320-486c-adee-7ddb408ed5d8

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…mes and markdown

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/3b20ecd5-8320-486c-adee-7ddb408ed5d8

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
… containers

- Add TestAppHost project (lightweight Aspire AppHost for tests)
- Add SharedTestAppHost (lazy Aspire DistributedApplicationTestingBuilder)
- Add NatsBrokerEndpoint (real NATS with MockEndpoint-compatible assertions)
- Add TestHttpServer (in-process ASP.NET minimal API)
- Add Aspire.Hosting.Testing 13.1.2 package
- Add 5 infrastructure connectivity tests (all pass)
- All 470 existing tutorial tests unaffected

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/39aa0182-bf3c-4fa3-94a3-cfe094caae4b

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…oint

Replace MockEndpoint with NatsBrokerEndpoint backed by real NATS JetStream:
- SetUp gets NATS URL from SharedTestAppHost, skips if unavailable
- Use unique topic names with Guid to avoid cross-test contamination
- Subscribe before publish with Task.Delay(500) for subscription setup
- Use WaitForMessagesOnTopicAsync/WaitForMessagesAsync instead of mock SendAsync
- Dispose all NatsBrokerEndpoint instances in TearDown and test bodies

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…t, scalability)

Lab (10 tests):
- Workflow dispatch basics (envelope-to-input mapping, deterministic IDs)
- Saga pattern (success, failure, custom compensation with LIFO rollback)
- Fan-out/split pattern (batch → independent parallel workflows)
- Scalability settings (TemporalOptions, PipelineOptions)
- DI wiring via AspireIntegrationTestHost
- Correlation/causation propagation

Exam (3 tests):
- Multi-step saga with compensation tracking
- Fan-out with selective failure and result aggregation
- Notification-enabled workflow with custom Ack/Nack subjects

All 479 TutorialLabs tests pass.

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/2daf91fd-3833-4268-ac07-e56ed9b778d7

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…nels, metadata

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/6fb20daf-aec8-450e-9df9-f203ad7aaaf9

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
Copilot AI and others added 3 commits April 7, 2026 03:03
Copilot AI and others added 3 commits April 7, 2026 05:57
…rEndpoint

Replace MockEndpoint with AspireFixture.CreateNatsEndpoint for real
NATS JetStream via Aspire in both Lab and Exam tests. Use unique topics
via AspireFixture.UniqueTopic and pass default as third arg to PublishAsync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…rEndpoint

Replace MockEndpoint with NatsBrokerEndpoint using AspireFixture.CreateNatsEndpoint
and AspireFixture.UniqueTopic for real NATS JetStream integration testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…x T46 missing using

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/c8698436-15b6-4793-aa70-e75ac849cfc2

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
Copilot AI and others added 3 commits April 7, 2026 07:25
…with full EIP support

- Add BrokerType.Postgres = 3 to BrokerType enum
- Create src/Ingestion.Postgres/ project with Npgsql 9.0.3
- PostgresBrokerProducer: INSERT + pg_notify for low-latency delivery
- PostgresBrokerConsumer: LISTEN/NOTIFY + SELECT FOR UPDATE SKIP LOCKED
- PostgresTransactionalClient: native ACID transactions
- PostgresConnectionFactory: schema initialization
- SQL schema: eip_messages, eip_subscriptions, eip_dead_letters, eip_durable_subscribers
- PostgresServiceExtensions.AddPostgresBroker() DI extension
- Register in IngestionServiceExtensions.BrokerRegistrations
- Update milestones.md with Phase 28 rearchitected plan (chunks 103-109)

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/b17857f2-8d70-4dfe-b521-ded5a6a74e54

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
… channels, routing, splitter, aggregator)

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/54c5dbc2-e361-4847-9bd4-5ba7e3123751

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
Copilot AI and others added 2 commits April 7, 2026 10:58
…t helper, connectivity tests

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/461c62e1-3894-43a9-a7fd-3fcd931c5878

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…regator, DLQ, retry, resequencer)

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/461c62e1-3894-43a9-a7fd-3fcd931c5878

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…ondition, fix resequencer assertions, allow multi-topic publish

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/24819556-1c6b-4a33-89b7-8d2f1d07fe4d

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
…ng to _consumed

Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/8a74710d-bdeb-4938-8d7e-a41aea40c2be

Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
@devstress devstress marked this pull request as ready for review April 7, 2026 15:09
@devstress devstress merged commit 4dc5a97 into main Apr 7, 2026
3 checks passed
@devstress devstress deleted the copilot/redo-integrations-real-lab-exam branch April 7, 2026 15:09
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.

2 participants