Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .memory/alignment_checking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ Python is the reference style (code-first, minimal prose). All languages should
- `—` = missing, intentional (language doesn't need this)
- `TODO` = missing, should add
- `DEL` = present, should remove or merge
- `Py#` / `TS#` / `Go#` = section order in file (should monotonically increase if order is aligned)
- `Py#` / `TS#` / `DN#` / `Go#` = section order in file (should monotonically increase if order is aligned)

## Implementation Status

**Python/TypeScript:** ✅ COMPLETE (2026-02-25) — All TODO/DEL/BUG items implemented.

**Go:** ✅ COMPLETE (2026-03-17) — All Go reference files created and aligned.

**.NET:** ✅ COMPLETE (2026-04-01) — All sections verified present and style-aligned with Python reference.

## Files

Each file in this directory tracks alignment for a corresponding reference file:
Expand Down
55 changes: 34 additions & 21 deletions .memory/alignment_checking/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@

## Section Inventory

| Section | Core | Python | Py# | TypeScript | TS# | Go |
|---------|------|--------|-----|------------|-----|-----|
| Schedules | — | ✓ | 1 | ✓ | 1 | |
| Async Activity Completion | — | ✓ | 2 | ✓ | 2 | |
| Sandbox Customization | — | ✓ | 3 | — | — | |
| Gevent Compatibility Warning | — | ✓ | 4 | — | — | |
| Worker Tuning | — | ✓ | 5 | ✓ | 3 | |
| Workflow Init Decorator | — | ✓ | 6 | — | — | |
| Workflow Failure Exception Types | — | ✓ | 7 | — | — | |
| Continue-as-New | — | — | — | — | — | |
| Workflow Updates | — | — | — | — | — | |
| Nexus Operations | — | — | — | — | — | |
| Activity Cancellation and Heartbeating | — | — | — | — | — | |
| Sinks | — | — | — | ✓ | 4 | |
| CancellationScope Patterns | — | — | — | — | — | |
| Best Practices | — | — | — | — | — | |
| Section | Core | Python | Py# | TypeScript | TS# | .NET | DN# | Go | Go# |
|---------|------|--------|-----|------------|-----|------|-----|----|-----|
| Schedules | — | ✓ | 1 | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| Async Activity Completion | — | ✓ | 2 | ✓ | 2 | ✓ | 2 | ✓ | 2 |
| Sandbox Customization | — | ✓ | 3 | — | — | — | — | — | — |
| Gevent Compatibility Warning | — | ✓ | 4 | — | — | — | — | — | — |
| Worker Tuning | — | ✓ | 5 | ✓ | 3 | ✓ | 3 | ✓ | 3 |
| Workflow Init Decorator | — | ✓ | 6 | — | — | ✓ | 4 | — | — |
| Workflow Failure Exception Types | — | ✓ | 7 | — | — | ✓ | 5 | — | — |
| Dependency Injection | — | — | — | — | — | ✓ | 6 | — | — |
| Sessions | — | — | — | — | — | — | — | ✓ | 4 |
| Continue-as-New | — | — | — | — | — | — | — | — | — |
| Workflow Updates | — | — | — | — | — | — | — | — | — |
| Nexus Operations | — | — | — | — | — | — | — | — | — |
| Activity Cancellation and Heartbeating | — | — | — | — | — | — | — | — | — |
| Sinks | — | — | — | ✓ | 4 | — | — | — | — |
| CancellationScope Patterns | — | — | — | — | — | — | — | — | — |
| Best Practices | — | — | — | — | — | — | — | — | — |

## Style Compliance

| Language | Status | Notes |
|----------|--------|-------|
| Python | ✓ reference | 7 sections |
| TypeScript | ✓ aligned | 4 sections (removed duplicates) |
| .NET | ✓ aligned | 6 sections — Schedules, Async Completion, Worker Tuning, Workflow Init, Failure Exception Types, DI |
| Go | ✓ aligned | 4 sections — Schedules, Async Completion, Worker Tuning, Sessions |

## Status
Expand All @@ -36,14 +39,24 @@
- Sessions: Go-specific feature — `workflow.CreateSession(ctx, options)` pins activities to a specific worker. Useful for file processing where activities need local state.
**Intentionally missing (`—`):**
- Core column: advanced features are implementation-specific
- Sandbox Customization: Python-specific; Go has no sandbox
- Sandbox Customization: Python-specific; .NET/Go have no sandbox
- Gevent Compatibility Warning: Python-specific
- Workflow Init Decorator: Python-specific
- Workflow Failure Exception Types: Python-specific
- Workflow Init Decorator: Python-specific (@workflow.init)
- Workflow Failure Exception Types: Python and .NET (see .NET notes)
- Sinks: TS-specific feature
- Sessions: Go-specific (not in Python/TS)
- Sessions: Go-specific (not in Python/TS/.NET)
- Interceptors: Decided not to include for any language (all SDKs have them, but too advanced for current scope)

**.NET alignment notes:**
- Workflow Failure Exception Types: ✓ for .NET — only `ApplicationFailureException` fails a workflow; other exceptions retry the workflow task.
- Dependency Injection: NEW .NET-specific section — `Temporalio.Extensions.Hosting` package, `AddTemporalClient()`, generic host worker setup, activity DI.
- .NET gets 6 sections (Schedules, Async Activity Completion, Worker Tuning, Workflow Init, Workflow Failure Exception Types, Dependency Injection)

**Order alignment:** N/A — Files have different structures by design

**Style alignment:** ✅ Complete (Python, TypeScript)
**Style alignment:** ✅ Complete (Python, TypeScript, Go)
- Python: 7 sections (Schedules, Async Activity Completion, Sandbox Customization, Gevent Warning, Worker Tuning, Workflow Init, Failure Exception Types)
- TypeScript: 4 sections (Schedules, Async Activity Completion, Worker Tuning, Sinks)
- Go: 4 sections (Schedules, Async Activity Completion, Worker Tuning, Sessions)
- .NET: 6 sections (Schedules, Async Activity Completion, Worker Tuning, Workflow Init, Workflow Failure Exception Types, Dependency Injection)
- Removed duplicates from TS (Continue-as-New, Workflow Updates, CancellationScope Patterns, Nexus Operations, Activity Cancellation, Best Practices — all covered elsewhere)
29 changes: 15 additions & 14 deletions .memory/alignment_checking/data-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@

## Section Inventory

| Section | Core | Python | Py# | TypeScript | TS# | Go | Go# |
|---------|------|--------|-----|------------|-----|-----|-----|
| Overview | — | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| Default Data Converter | — | ✓ | 2 | ✓ | 2 | ✓ | 2 |
| Pydantic Integration | — | ✓ | 3 | — | — | — | — |
| Custom Data Converter | — | ✓ | 4 | ✓ | 3 | ✓ | 3 |
| Composition of Payload Converters | — | — | — | ✓ | 4 | ✓ | 4 |
| Protobuf Support | — | — | — | ✓ | 5 | ✓ | 5 |
| Payload Encryption | — | ✓ | 5 | ✓ | 6 | ✓ | 6 |
| Search Attributes | — | ✓ | 6 | ✓ | 7 | ✓ | 7 |
| Workflow Memo | — | ✓ | 7 | ✓ | 8 | ✓ | 8 |
| Large Payloads | — | — | — | — | — | — | — |
| Deterministic APIs for Values | — | ✓ | 8 | — | — | — | — |
| Best Practices | — | ✓ | 9 | ✓ | 9 | ✓ | 9 |
| Section | Core | Python | Py# | TypeScript | TS# | .NET | DN# | Go | Go# |
|---------|------|--------|-----|------------|-----|------|-----|----|-----|
| Overview | — | ✓ | 1 | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| Default Data Converter | — | ✓ | 2 | ✓ | 2 | ✓ | 2 | ✓ | 2 |
| Pydantic Integration | — | ✓ | 3 | — | — | — | — | — | — |
| Custom Data Converter | — | ✓ | 4 | ✓ | 3 | ✓ | 3 | ✓ | 3 |
| Composition of Payload Converters | — | — | — | ✓ | 4 | — | — | ✓ | 4 |
| Protobuf Support | — | — | — | ✓ | 5 | ✓ | 4 | ✓ | 5 |
| Payload Encryption | — | ✓ | 5 | ✓ | 6 | ✓ | 5 | ✓ | 6 |
| Search Attributes | — | ✓ | 6 | ✓ | 7 | ✓ | 6 | ✓ | 7 |
| Workflow Memo | — | ✓ | 7 | ✓ | 8 | ✓ | 7 | ✓ | 8 |
| Large Payloads | — | — | — | — | — | — | — | — | — |
| Deterministic APIs for Values | — | ✓ | 8 | — | — | ✓ | 8 | — | — |
| Best Practices | — | ✓ | 9 | ✓ | 9 | ✓ | 9 | ✓ | 9 |

## Style Compliance

| Language | Status | Notes |
|----------|--------|-------|
| Python | ✓ reference | — |
| TypeScript | ✓ aligned | — |
| .NET | ✓ aligned | System.Text.Json, DefaultPayloadConverter, IPayloadCodec, SearchAttributeKey/Update |
| Go | ✓ aligned | JSON default, protobuf native, converter.CompositeDataConverter |

## Status
Expand Down
39 changes: 21 additions & 18 deletions .memory/alignment_checking/determinism-protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,34 @@

## Section Inventory

| Section | Core | Python | Py# | TypeScript | TS# | Go | Go# |
|---------|------|--------|-----|------------|-----|-----|-----|
| Overview | — | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| How the Sandbox Works | — | ✓ | 2 | — | — | — | — |
| Import Blocking | — | — | — | ✓ | 2 | — | — |
| Forbidden Operations | — | ✓ | 3 | — | — | — | — |
| Function Replacement | — | — | — | ✓ | 3 | — | — |
| workflowcheck Static Analysis | — | — | — | — | — | ✓ | 2 |
| Determinism Rules | — | — | — | — | — | ✓ | 3 |
| Pass-Through Pattern | — | ✓ | 4 | — | — | — | — |
| Importing Activities | — | ✓ | 5 | — | — | — | — |
| Disabling the Sandbox | — | ✓ | 6 | — | — | — | — |
| Customizing Invalid Module Members | — | ✓ | 7 | — | — | — | — |
| Import Notification Policy | — | ✓ | 8 | — | — | — | — |
| Disable Lazy sys.modules Passthrough | — | ✓ | 9 | — | — | — | — |
| File Organization | — | ✓ | 10 | — | — | — | — |
| Common Issues | — | ✓ | 11 | — | — | — | — |
| Best Practices | — | ✓ | 12 | — | — | ✓ | 4 |
| Section | Core | Python | Py# | TypeScript | TS# | .NET | DN# | Go | Go# |
|---------|------|--------|-----|------------|-----|------|-----|----|-----|
| Overview | — | ✓ | 1 | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| How the Sandbox Works | — | ✓ | 2 | — | — | — | — | — | — |
| Import Blocking | — | — | — | ✓ | 2 | — | — | — | — |
| Forbidden Operations | — | ✓ | 3 | — | — | — | — | — | — |
| Function Replacement | — | — | — | ✓ | 3 | — | — | — | — |
| Runtime Task Detection | — | — | — | — | — | ✓ | 2 | — | — |
| .NET Task Determinism Rules | — | — | — | — | — | ✓ | 3 | — | — |
| workflowcheck Static Analysis | — | — | — | — | — | — | — | ✓ | 2 |
| Determinism Rules | — | — | — | — | — | — | — | ✓ | 3 |
| Pass-Through Pattern | — | ✓ | 4 | — | — | — | — | — | — |
| Importing Activities | — | ✓ | 5 | — | — | — | — | — | — |
| Disabling the Sandbox | — | ✓ | 6 | — | — | — | — | — | — |
| Customizing Invalid Module Members | — | ✓ | 7 | — | — | — | — | — | — |
| Import Notification Policy | — | ✓ | 8 | — | — | — | — | — | — |
| Disable Lazy sys.modules Passthrough | — | ✓ | 9 | — | — | — | — | — | — |
| File Organization | — | ✓ | 10 | — | — | — | — | — | — |
| Common Issues | — | ✓ | 11 | — | — | — | — | — | — |
| Best Practices | — | ✓ | 12 | — | — | ✓ | 4 | ✓ | 4 |

## Style Compliance

| Language | Status | Notes |
|----------|--------|-------|
| Python | ✓ reference | Comprehensive (12 sections) |
| TypeScript | ✓ aligned | Minimal (3 sections) — V8 is automatic |
| .NET | ✓ aligned | Minimal (4 sections) — no sandbox, runtime EventListener + Task rules |
| Go | ✓ aligned | Minimal (4 sections) — no runtime sandbox, convention + static analysis |

## Status
Expand Down
27 changes: 14 additions & 13 deletions .memory/alignment_checking/determinism.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

## Section Inventory

| Section | Core | Core# | Python | Py# | TypeScript | TS# | Go | Go# |
|---------|------|-------|--------|-----|------------|-----|-----|-----|
| Overview | ✓ | 1 | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| Why Determinism Matters | ✓ | 2 | ✓ | 2 | ✓ | 2 | ✓ | 2 |
| Sources of Non-Determinism | ✓ | 3 | — | — | — | — | — | — |
| Central Concept: Activities | ✓ | 4 | — | — | — | — | — | — |
| SDK Protection / Sandbox | ✓ | 5 | ✓ | 6 | ✓ | 3 | — | — |
| Forbidden Operations | — | — | ✓ | 3 | ✓ | 4 | ✓ | 3 |
| Safe Builtin Alternatives | — | — | ✓ | 4 | — | — | ✓ | 4 |
| Detecting Non-Determinism | ✓ | 6 | — | — | — | — | — | — |
| Recovery from Non-Determinism | ✓ | 7 | — | — | — | — | — | — |
| Testing Replay Compatibility | — | — | ✓ | 5 | ✓ | 5 | ✓ | 5 |
| Best Practices | ✓ | 8 | ✓ | 7 | ✓ | 6 | ✓ | 6 |
| Section | Core | Core# | Python | Py# | TypeScript | TS# | .NET | DN# | Go | Go# |
|---------|------|-------|--------|-----|------------|-----|------|-----|----|-----|
| Overview | ✓ | 1 | ✓ | 1 | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| Why Determinism Matters | ✓ | 2 | ✓ | 2 | ✓ | 2 | ✓ | 2 | ✓ | 2 |
| Sources of Non-Determinism | ✓ | 3 | — | — | — | — | — | — | — | — |
| Central Concept: Activities | ✓ | 4 | — | — | — | — | — | — | — | — |
| SDK Protection / Sandbox | ✓ | 5 | ✓ | 6 | ✓ | 3 | — | — | — | — |
| Forbidden Operations | — | — | ✓ | 3 | ✓ | 4 | ✓ | 3 | ✓ | 3 |
| Safe Builtin Alternatives | — | — | ✓ | 4 | — | — | ✓ | 4 | ✓ | 4 |
| Detecting Non-Determinism | ✓ | 6 | — | — | — | — | — | — | — | — |
| Recovery from Non-Determinism | ✓ | 7 | — | — | — | — | — | — | — | — |
| Testing Replay Compatibility | — | — | ✓ | 5 | ✓ | 5 | ✓ | 5 | ✓ | 5 |
| Best Practices | ✓ | 8 | ✓ | 7 | ✓ | 6 | ✓ | 6 | ✓ | 6 |

## Style Compliance

Expand All @@ -23,6 +23,7 @@
| Core | ✓ reference | Deep conceptual content |
| Python | ✓ aligned | Practical focus |
| TypeScript | ✓ aligned | Practical focus, V8 sandbox |
| .NET | ✓ aligned | No sandbox, custom TaskScheduler + EventListener, Workflow.* safe alternatives table |
| Go | ✓ aligned | Practical focus, no sandbox, workflowcheck tool, workflow.* replacements |

## Status
Expand Down
27 changes: 14 additions & 13 deletions .memory/alignment_checking/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@

## Section Inventory

| Section | Core | Python | Py# | TypeScript | TS# | Go | Go# |
|---------|------|--------|-----|------------|-----|-----|-----|
| Overview | — | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| Application Errors/Failures | — | ✓ | 2 | ✓ | 2 | ✓ | 2 |
| Non-Retryable Errors | — | ✓ | 3 | — | — | ✓ | 3 |
| Activity Errors | — | — | — | ✓ | 3 | — | — |
| Handling Activity Errors in Workflows | — | ✓ | 4 | ✓ | 4 | ✓ | 4 |
| Retry Configuration | — | ✓ | 5 | ✓ | 5 | ✓ | 5 |
| Timeout Configuration | — | ✓ | 6 | ✓ | 6 | ✓ | 6 |
| Workflow Failure | — | ✓ | 7 | ✓ | 7 | ✓ | 7 |
| Cancellation Handling in Activities | — | — | — | — | — | — | — |
| Idempotency Patterns | — | — | — | — | — | — | — |
| Best Practices | — | ✓ | 8 | ✓ | 9 | ✓ | 8 |
| Section | Core | Python | Py# | TypeScript | TS# | .NET | DN# | Go | Go# |
|---------|------|--------|-----|------------|-----|------|-----|----|-----|
| Overview | — | ✓ | 1 | ✓ | 1 | ✓ | 1 | ✓ | 1 |
| Application Errors/Failures | — | ✓ | 2 | ✓ | 2 | ✓ | 2 | ✓ | 2 |
| Non-Retryable Errors | — | ✓ | 3 | — | — | ✓ | 3 | ✓ | 3 |
| Activity Errors | — | — | — | ✓ | 3 | — | — | — | — |
| Handling Activity Errors in Workflows | — | ✓ | 4 | ✓ | 4 | ✓ | 4 | ✓ | 4 |
| Retry Configuration | — | ✓ | 5 | ✓ | 5 | ✓ | 5 | ✓ | 5 |
| Timeout Configuration | — | ✓ | 6 | ✓ | 6 | ✓ | 6 | ✓ | 6 |
| Workflow Failure | — | ✓ | 7 | ✓ | 7 | ✓ | 7 | ✓ | 7 |
| Cancellation Handling in Activities | — | — | — | — | — | — | — | — | — |
| Idempotency Patterns | — | — | — | — | — | — | — | — | — |
| Best Practices | — | ✓ | 8 | ✓ | 9 | ✓ | 8 | ✓ | 8 |

## Style Compliance

| Language | Status | Notes |
|----------|--------|-------|
| Python | ✓ reference | — |
| TypeScript | ✓ aligned | Uses `log`, has retry defaults note |
| .NET | ✓ aligned | ApplicationFailureException, ActivityFailureException, nonRetryable param |
| Go | ✓ aligned | Go-style error handling (errors.As, error returns, no exceptions) |

## Status
Expand Down
43 changes: 23 additions & 20 deletions .memory/alignment_checking/gotchas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@

## Section Inventory

| Section | Core | Core# | Python | Py# | TypeScript | TS# | Go | Go# |
|---------|------|-------|--------|-----|------------|-----|-----|-----|
| Idempotency / Non-Idempotent Activities | ✓ | 1 | — | — | — | — | — | — |
| Replay Safety / Side Effects & Non-Determinism | ✓ | 2 | — | — | — | — | — | — |
| Multiple Workers with Different Code | ✓ | 3 | — | — | — | — | — | — |
| Retry Policies / Failing Activities Too Quickly | ✓ | 4 | — | — | — | — | — | — |
| Query Handlers / Query Handler Mistakes | ✓ | 5 | — | — | — | — | — | — |
| File Organization | ✓ | 6 | ✓ | 1 | — | — | — | — |
| Activity Imports | — | — | — | — | ✓ | 1 | — | — |
| Bundling Issues | — | — | — | — | ✓ | 2 | — | — |
| Async vs Sync Activities | — | — | ✓ | 2 | — | — | — | — |
| Goroutines and Concurrency | — | — | — | — | — | — | ✓ | 1 |
| Non-Deterministic Operations | — | — | — | — | — | — | ✓ | 2 |
| Error Handling | ✓ | 8 | — | — | — | — | — | — |
| Wrong Retry Classification | ✓ | 8 | ✓ | 3 | ✓ | 3 | ✓ | 3 |
| Heartbeating | — | — | ✓ | 5 | ✓ | 5 | ✓ | 4 |
| Cancellation | ✓ | 10 | ✓ | 4 | ✓ | 4 | ✓ | 5 |
| Testing | ✓ | 7 | ✓ | 6 | ✓ | 6 | ✓ | 6 |
| Timers and Sleep | — | — | ✓ | 7 | ✓ | 7 | ✓ | 7 |
| Payload Size Limits | ✓ | 9 | — | — | — | — | — | — |
| Section | Core | Core# | Python | Py# | TypeScript | TS# | .NET | DN# | Go | Go# |
|---------|------|-------|--------|-----|------------|-----|------|-----|----|-----|
| Idempotency / Non-Idempotent Activities | ✓ | 1 | — | — | — | — | — | — | — | — |
| Replay Safety / Side Effects & Non-Determinism | ✓ | 2 | — | — | — | — | — | — | — | — |
| Multiple Workers with Different Code | ✓ | 3 | — | — | — | — | — | — | — | — |
| Retry Policies / Failing Activities Too Quickly | ✓ | 4 | — | — | — | — | — | — | — | — |
| Query Handlers / Query Handler Mistakes | ✓ | 5 | — | — | — | — | — | — | — | — |
| File Organization | ✓ | 6 | ✓ | 1 | — | — | — | — | — | — |
| Activity Imports | — | — | — | — | ✓ | 1 | — | — | — | — |
| Bundling Issues | — | — | — | — | ✓ | 2 | — | — | — | — |
| Async vs Sync Activities | — | — | ✓ | 2 | — | — | — | — | — | — |
| .NET Task Determinism | — | — | — | — | — | — | ✓ | 1 | — | — |
| Goroutines and Concurrency | — | — | — | — | — | — | — | — | ✓ | 1 |
| Non-Deterministic Operations | — | — | — | — | — | — | — | — | ✓ | 2 |
| Error Handling | ✓ | 8 | — | — | — | — | — | — | — | — |
| Wrong Retry Classification | ✓ | 8 | ✓ | 3 | ✓ | 3 | ✓ | 2 | ✓ | 3 |
| Heartbeating | — | — | ✓ | 5 | ✓ | 5 | ✓ | 3 | ✓ | 4 |
| Cancellation | ✓ | 10 | ✓ | 4 | ✓ | 4 | ✓ | 4 | ✓ | 5 |
| Testing | ✓ | 7 | ✓ | 6 | ✓ | 6 | ✓ | 5 | ✓ | 6 |
| Timers and Sleep | — | — | ✓ | 7 | ✓ | 7 | ✓ | 6 | ✓ | 7 |
| Payload Size Limits | ✓ | 9 | — | — | — | — | — | — | — | — |
| Dictionary Iteration Order | — | — | — | — | — | — | ✓ | 7 | — | — |

## Style Compliance

Expand All @@ -30,6 +32,7 @@
| Core | ✓ reference | Conceptual gotchas |
| Python | ✓ aligned | Language-specific gotchas |
| TypeScript | ✓ aligned | Language-specific gotchas |
| .NET | ✓ aligned | Task determinism, Dictionary iteration order, BAD/GOOD code pattern examples |
| Go | ✓ aligned | Language-specific gotchas — goroutines, channels, selectors, map range |

## Status
Expand Down
Loading