Repository navigation
feat(task-step): derive snapshot_agent_state's artifact id per run when omitted #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
canersoz-scaleai
merged 6 commits into
scaleapi:main
from
canersoz-scaleai:canersoz/fd-4006-snapshot-agent-state-per-run-id
Oct 23, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
631d36a
feat(task-step): derive snapshot_agent_state's artifact id per run wh…
canersoz-scaleai 5faf2a3
feat(task-step): record the capturing step on snapshot_agent_state's …
canersoz-scaleai 2be4429
feat(task-step): skip a per-run agent snapshot when the agent can't b…
canersoz-scaleai d491305
fix(task-step): skip a per-run agent snapshot only for a card without…
canersoz-scaleai e030de2
fix(task-step): keep snapshot_agent_state's skip, id and CLI output t…
canersoz-scaleai 249bd7d
Merge remote-tracking branch 'origin/main' into can/fd-4006-snapshot-…
canersoz-scaleai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| """`task run` shows a snapshot_agent_state step its own capture, never another writer's row.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from types import SimpleNamespace | ||
|
|
||
| from agent_env.cli.task.run import _step_output_lines | ||
| from agent_env.task_step.context import TaskStepContext | ||
|
|
||
| _STEP = SimpleNamespace(type="snapshot_agent_state", id="capture") | ||
|
|
||
|
|
||
| def _context(*rows: dict) -> TaskStepContext: | ||
| return TaskStepContext(metadata={"agent_snapshots": list(rows)}) | ||
|
|
||
|
|
||
| def test_the_steps_own_capture_is_shown_over_a_later_row(): | ||
| lines = _step_output_lines(_STEP, _context( | ||
| {"id": "own", "version": 2, "capture_step_id": "capture"}, | ||
| {"id": "series-row", "version": 5, "capture_step_id": "ask"}, | ||
| )) | ||
|
|
||
| assert len(lines) == 1 | ||
| assert "artifact_id: own" in lines[0] | ||
|
|
||
|
|
||
| def test_nothing_is_shown_without_a_row_from_the_step(): | ||
| assert _step_output_lines(_STEP, _context({"id": "series-row", "capture_step_id": "ask"}, {"id": "untagged"})) == [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.