Skip to content

feat: implement heartbeat progress recovery through heartbeat details#83

Merged
timl3136 merged 6 commits intocadence-workflow:mainfrom
timl3136:heartbeat-1
Apr 9, 2026
Merged

feat: implement heartbeat progress recovery through heartbeat details#83
timl3136 merged 6 commits intocadence-workflow:mainfrom
timl3136:heartbeat-1

Conversation

@timl3136
Copy link
Copy Markdown
Member

@timl3136 timl3136 commented Apr 1, 2026

What changed?
implement heartbeat progress recovery through heartbeat details. While activity can fetch heartbeat details, it cannot yet do that during retry since retry handling is missing.

Why?
Allow the activity to pickup the progress that it heartbeated during retry

How did you test it?
Unit tests

Potential risks

Release notes

Documentation Changes

timl3136 added 3 commits April 9, 2026 13:07
Signed-off-by: Tim Li <ltim@uber.com>
Signed-off-by: Tim Li <ltim@uber.com>
Signed-off-by: Tim Li <ltim@uber.com>
@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 9, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Implements heartbeat progress recovery through heartbeat details, addressing the PydanticDataConverter.from_data limitation with empty type_hints. No issues remain.

✅ 1 resolved
Bug: PydanticDataConverter.from_data doesn't support empty type_hints

📄 cadence/data_converter.py:42 📄 cadence/data_converter.py:54-55
The semantic change to DefaultDataConverter (empty type_hints now means "decode all values") is not mirrored in PydanticDataConverter. Its _decode_whitespace_delimited receives max_count=len(type_hints)=0, so the loop never executes and returns []. Then the for i, type_hint in enumerate(type_hints) loop also does nothing.

This means activity.heartbeat_details() (no type args) will silently return [] instead of the actual heartbeat values when PydanticDataConverter is in use. The two DataConverter implementations now have divergent behavior for the same input, violating the protocol contract.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@timl3136 timl3136 merged commit 76c88f2 into cadence-workflow:main Apr 9, 2026
7 checks passed
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