[Testing]: Match ReplayChildren lifecycle and wire representation

Abierto
#859 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
aws, python
Área
backend, testing

Línea de trabajo

Read base.py, operation_state.py, invoker.py, and the response serializers in model.py to trace how ReplayChildren moves through checkpoint processing and serialized responses. Start with the two named replay_children_service_parity tests and cover START plus SUCCEED/FAIL with omitted, true, and false closing options. Done means the invocation, state, and checkpoint responses agree while START omits the field and core serialization remains unchanged.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug pkg:testing

Split from PR #795 — match replay state to the service, reference commit f8ac9b4; baseline main is d7ae95571c44b18c2a2efdef9a308b1c916c5049. This issue owns one independently implementable slice of that PR. Start a focused branch from current main and port only this slice, rather than stacking on the full PR.

Problem and reproduction

The local checkpoint processor can retain ContextOptions.ReplayChildren on START, and generic core serialization omits false/absent values where the local service's terminal-state response needs an explicit false. The processor, invocation payload, state response, and checkpoint response can consequently disagree about the flag's meaning or presence.

START a context with ReplayChildren: true, then separately test SUCCEED and FAIL with closing options omitted, true, false, and unspecified. Inspect the in-memory operation and serialized Lambda invocation/state/checkpoint payloads. START must not advertise retention; terminal updates must represent the closing choice consistently.

Scope and implementation
  • Record true only on SUCCEED/FAIL when the closing update explicitly requests true; other closing cases record false. Ignore the flag on START.
  • Add a testing-service projection that omits ReplayChildren from STARTED context responses and includes a boolean for completed contexts.
  • Apply that projection to Lambda invocation JSON, GetDurableExecutionStateResponse, and CheckpointUpdatedExecutionState. Preserve the existing timestamp representation on each path.
  • Keep core Operation conversion and its generic serialization API unchanged. This is a local-service projection, not a new SDK option or a replay-filtering implementation.

Primary code: base.py, operation_state_to_dict in operation_state.py, invoker.py, and the two response serializers in model.py.

Acceptance criteria
  • START with retention options produces no ReplayChildren wire field and does not persist true.
  • SUCCEED/FAIL produce true only for explicit true, and false for omitted/false/unspecified closing options.
  • Invocation JSON, state responses, and checkpoint responses agree, with JSON timestamps preserved where required.
  • Non-context operations and core's own serialization contracts are unchanged; no mutation of the supplied Operation occurs during projection.
  • Cover memory/filesystem round-trips and a public child-context workflow that naturally needs retained children, without depending on descendant filtering.
  • Document flag lifecycle/presence separately from which descendants are visible.
Reference tests

Port test_replay_children_is_recorded_only_by_closing_update and test_lambda_invocation_projects_close_false_and_start_absence, adapting the latter to a simple unfiltered fixture so it needs only this fix.

Independence

Implement directly on main. No pruning function, callback changes, or history-error fix is required. Coordinate the shared operation_state.py file with the replay-visibility issue, but neither PR requires the other to merge first. This is narrower than closed #477, which fixed core serialization dropping fields altogether; do not reopen or undo that fix. Temporary feature-branch CI filters from #795 are outside this slice.

Validation and evidence

Add a regression that fails on main without this fix and passes with this slice alone. Run from the repository root:

hatch run dev-testing:test
hatch run dev-testing:typecheck
hatch run dev-testing:js-examples

Use the repository's CI-pinned Hatch version (1.16.5 at the reference) and Node.js 22+ for the JS harness; run hatch fmt --check from packages/aws-durable-execution-sdk-python-testing. Use public-handler integration tests for cross-component behavior and both memory/filesystem stores where relevant. List changed test expectations and their reasons in the implementing PR.

The service-parity expectations are carried forward from #795. This split does not independently verify them against deployed AWS Lambda; cite service evidence or mark the external assumption unverified before claiming deployed-service qualification. Shared conformance work belongs to #796 / conformance PR #131; coordinate new requirements there.

Related issues in this split
Lenguaje dominante
Python
Estrellas
59
Forks
32
Merge medio
1 d 5 h
PR fusionados (30 d)
76

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aws/aws-durable-execution-sdk-python

Todos los issues de aws/aws-durable-execution-sdk-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.