Skip to content

feat(telemetry): add the telemetry-4 conformance handler - #924

Merged
hln33 merged 4 commits into
mainfrom
feat/conformance-telemetry-4
Nov 13, 2026
Merged

hln33 merged 4 commits into
mainfrom
feat/conformance-telemetry-4

Conversation

@hln33

@hln33 hln33 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds the telemetry-4 conformance handler. One map, process-items, runs over the event [1, 2] with max concurrency 1 and item namer item-<item>. Each iteration runs one step greet-<item> that returns "Hello, <item>!". The telemetry plugin runs with full-tree operation detail and input/output on. The exported record must carry exactly five operationsByName keys: process-items, item-1, item-2, greet-1, greet-2.

The requirement is aws/aws-durable-execution-conformance-tests#185 (issue aws/aws-durable-execution-conformance-tests#184).

Why

top-level detail keeps only process-items. full-tree detail must recurse into each MapIteration context and keep the step under it, keyed by the user-supplied name. The deployed run shows the plugin recurses to depth 2, keeps the three CONTEXT summaries without maxAttempt, and keeps the two STEP summaries with maxAttempt 1.

Simpler options considered

Reuse an existing handler with operation_detail="full-tree". telemetry-1 to telemetry-3 each run one top-level step. A step has no children. So full-tree on those handlers exports the same record as top-level and tests no recursion. The requirement needs a context with children at depth 2, which only a map or parallel with inner steps produces.

Hardcode [1, 2] instead of reading the event. The runner sends the requirement's Input. Reading the event keeps one source of truth, matches telemetry-1 to telemetry-3, and lets the YAML Input drive the handler.

Drop max_concurrency=1. With concurrent iterations the checkpoint order of the two iterations is not fixed. The requirement pins EventIds 2–12 in order. So iterations must run one at a time.

Drop item_namer. Without a namer the SDK checkpoints each MapIteration context with no name (JS map-handler.ts:78 sets name: undefined). The plugin keys operationsByName by name and drops unnamed operations. So the iteration contexts would be absent from the record and the requirement could not check them.

Drop the greet step and return the item from the map function. Then the tree has depth 1 (map → iteration) and the depth-2 case the requirement exists for is untested.

Changes

  • src/telemetry_4_full_tree_map.py: the handler. Same plugin configuration as telemetry-1 except operation_detail="full-tree".
  • src/Makefile: build-Telemetry4FullTreeMap target.
  • template.yaml: Telemetry4FullTreeMap, TestDescription: [telemetry-4], FunctionName ${AWS::StackName}-telemetry-4.
  • tests/test_telemetry_examples.py: runs the handler in DurableFunctionTestRunner with a fake logs client and asserts the five keys, their type/subType, and maxAttempt only on steps. Adds test_every_handler_module_is_deployed_by_exactly_one_function so two functions cannot share a module.
  • README.md: coverage row and layout line.
  • .github/workflows/telemetry-conformance-tests.yml: pinned to the conformance merge commit b380cbf (feat(telemetry): add telemetry-4 full-tree map record aws-durable-execution-conformance-tests#185).

Verification

  • hatch run test:cov: 6665 passed, 6 skipped.
  • hatch fmt --check: all checks passed.
  • Telemetry conformance e2e: telemetry-1 to telemetry-4 passed. 4 passed, 0 failed. Run 42759200974 at 60cfa998, pinned to c7abf1b. Re-run at 8f70085a pinned to b380cbf: Run 42916007676 — 4 passed, 0 failed.

@hln33
hln33 deployed to ai-pr-review-runtime November 10, 2026 04:58 — with GitHub Actions Active
@hln33
hln33 deployed to ai-pr-review-runtime November 10, 2026 04:59 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

The telemetry-4 requirement is not on the conformance main branch yet. The
e2e run needs it. So this pins the shared workflow to the head of
feat/telemetry-4-full-tree-map (c7abf1b). Re-pin to the merge commit once
that PR merges.
@hln33
hln33 force-pushed the feat/conformance-telemetry-4 branch from e4fd62b to 738180f Compare November 10, 2026 20:41
@hln33
hln33 deployed to ai-pr-review-runtime November 10, 2026 20:42 — with GitHub Actions Active
…4 head

Conformance PR #185 was stacked on the telemetry-3 branch. Telemetry-3 was
squash-merged, so the PR branch was rebased onto main and force-pushed. The
old head c7abf1b is no longer reachable from a branch. The new head 5c75e3f
has an identical tree. Re-pin to the merge commit once #185 merges.
@hln33
hln33 deployed to ai-pr-review-runtime November 10, 2026 20:50 — with GitHub Actions Active
@github-actions

This comment has been minimized.

Conformance PR #185 merged to main as b380cbf. Its tree is identical to the
branch head 5c75e3f that CI ran against. Pin to the merge commit so the
revision stays reachable after the feature branch is deleted.
@hln33
hln33 deployed to ai-pr-review-runtime November 10, 2026 22:36 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. The prior Rule 2 finding is addressed by the documented alternatives and rationale. Residual risk: tests were not executed, and the updated external workflow revision was not independently verified during this read-only review.

Reviewed commit 8f70085ad2036537aca952a7b5cbf1ac533deda5. Workflow run

@ParidelPooya ParidelPooya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handler matches telemetry-4.yaml at b380cbf. LGTM.

Two small notes:

  • The PR description says map iterations have no name without item_namer. Python names them map-item- (operation/map.py:97). The namer is still needed because the spec pins item-1 and item-2.
  • lint-commits fails because three commit subjects are over 50 characters. This is fine if the PR is squash-merged.

@hln33
hln33 merged commit 260e375 into main Nov 13, 2026
18 of 19 checks passed
@hln33
hln33 deleted the feat/conformance-telemetry-4 branch November 13, 2026 03:11

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — 8f70085a Deployed Nov 10, 2026 by hln33 via ai-pr-review / Codex review / Generate Codex review #3053
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