Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"family_id": "email_source_representation_convergence_workflow_seed_bundle",
"managed_by": "email_source_representation_convergence_workflow_vontology_service",
"schema_version": "repo_seed_workflow_bundle.v1",
"seed_version": "16",
"seed_version": "17",
"source_tag": "JVNAUTOSCI-2635",
"supported_action_ids": [
"arxiv.inspect_existing_state",
Expand Down Expand Up @@ -537,6 +537,20 @@
],
"execution_mode": "deterministic",
"on_failure_state": "failed",
"reads_context_keys": [
"gmail_profile",
"effective_gmail_query",
"gmail_max_results",
"message_item_count",
"message_selected_item_count",
"message_unattempted_count",
"message_success_count",
"message_error_count",
"message_partial_success",
"message_final_state_counts",
"message_iteration_results",
"message_iteration_errors"
],
"state_id": "project_batch_result",
"static_input_bindings": [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,27 +857,42 @@ def test_parent_batch_result_is_lossless_across_durable_checkpoints() -> None:
)[mod.ZHAN_GMAIL_ARXIV_INGESTION_WORKFLOW_ID]
lossless_keys = _execution_required_checkpoint_context_keys(definition)
assert "batch_result" in lossless_keys
assert "message_iteration_results" in lossless_keys
assert "message_iteration_errors" in lossless_keys

batch_result = {
"schema_version": "gmail_arxiv_batch_result.v1",
"items": [
{
"index": index,
"source_item_id": f"gmail-message-{index + 1}",
"paper_concept_ids": [f"#V#paper_{index + 1}"],
"evidence": "x" * 200,
}
for index in range(100)
],
}
iteration_results = [
{
"index": index,
"source_item_id": f"gmail-message-{index + 1}",
"paper_concept_ids": [f"#V#paper_{index + 1}"],
"evidence": "x" * 200,
}
for index in range(100)
]
iteration_errors = [
{
"index": 99,
"source_item_id": "gmail-message-100",
"error": "file_copy_type_not_visible_to_actor",
"details": {"stage": "file_copy_typing", "retryable": True},
}
]
projected = project_workflow_context_for_checkpoint(
{"batch_result": batch_result},
{
"message_iteration_results": iteration_results,
"message_iteration_errors": iteration_errors,
},
max_value_bson_bytes=512,
max_total_bson_bytes=512,
lossless_keys=lossless_keys,
)

assert projected["batch_result"] == batch_result
assert len(projected["batch_result"]["items"]) == 100
assert projected["message_iteration_results"] == iteration_results
assert len(projected["message_iteration_results"]) == 100
assert projected["message_iteration_errors"] == iteration_errors
assert projected["message_iteration_errors"][0]["error"] == (
"file_copy_type_not_visible_to_actor"
)


def test_email_source_seed_routes_exact_message_unit_and_explicit_batch() -> None:
Expand Down
Loading