Repository navigation
Conversation
… Jobs Job gains optional agentRunId and agentCallId, written together when an Agent generation.submit creates the job, so a job can be traced to its turn and call from committed project data without the Agent trace. Command fields and fingerprints are unchanged; jobs without an origin serialize as before.
GET .../assistant/turns/{turn_id}/jobs reads the project snapshot only and
returns the Jobs whose agentRunId matches, ordered by creation time. It never
reads the Agent trace and never starts, resumes or replays a command.
FayeSpica
left a comment
There was a problem hiding this comment.
Thanks for making Agent-submitted jobs traceable across restarts—please fix the CI formatting failure so the remaining checks can run.
| raise ProjectError('轨迹文件不存在。', 404) | ||
| return FileResponse(file, media_type='text/plain', headers={'Cache-Control': 'no-store'}) | ||
|
|
||
| @router.get('/turns/{turn_id}/jobs') |
There was a problem hiding this comment.
As a follow-up, could we connect this endpoint to the trace page so each turn shows its linked Jobs, their status, results and errors?
There was a problem hiding this comment.
Thanks for the suggestion! I've included the Trace page integration in this PR in commit 4c6c6a56. Each turn now shows its linked Jobs with IDs, statuses, generated asset details (kind, ID, revision) and failure messages. The section stays hidden when no Jobs are linked, and a lookup failure doesn't disrupt the trace. Both en-US and zh-CN are covered.
I also fixed the EOF formatting issue in tools.py and added real browser screenshots (using clearly labeled demo/provider-double data) to the PR's Evidence that it works section. The new CI run is awaiting maintainer approval, so the full checks are not yet confirmed. Would appreciate another look when you have a chance!
Fetch /assistant/turns/{turn}/jobs on the Trace page and list status, result and
error per Job. Also remove the extra blank line at EOF of agent/tools.py that
failed the end-of-file pre-commit hook.
Summary
agentRunIdandagentCallIdfields. Both are set together and omitted when unset, preserving existing non-Agent Job serialization.uuid5(run_id, call_id)Command ID derivation without changing Command payloads, fingerprints, idempotency or recovery decisions.GET /api/creation/projects/{project_id}/assistant/turns/{turn_id}/jobsto list Jobs submitted by a turn from committed project state. It does not read Agent traces, replay commands, acquire an editing lease, or invoke a provider.Linked issue
Fixes #372
Refs #261, #107
Fixes #NorRefs #Nis included, or no issue appliesLabels
Requested:
type:feat,area:agent.Test plan
tests/test_agent_job_lineage.py: 12 passed using provider doubles. Mutation check: 9 of 12 fail when the production-origin write is removed. Tests cover trace deletion, multiple Jobs, terminal failures, commit-journal crash recovery, restart without duplicate submission, legacy records, and read-only querying.scripts/generate_contracts.py --checkpassed;lint-importspassed (4 contracts, 0 broken);git diff --checkpassed.4c6c6a56): 6 new frontend pure-function tests; TypeScript check (tsc --noEmit),npm run build,npm run check:i18n, and browser verification were reported as passing.npm test: 824 passed, 2 failed; the same two tests also fail without this change.npm ci --ignore-scriptswas used because the install scripts failed in the local environment.pre-commit(hook repo could not be cloned), live provider tests, and a complete FFmpeg-enabled suite. CI was waiting for maintainer approval at last report.Evidence that it works
English, Agent Trace with linked completed and failed Jobs
简体中文,助手轨迹及关联任务状态
Provider verification
Bilingual UI
Design and compatibility notes
generation.submit; Job checkpoint, cancellation and result publication preserve the fields.job.cancel,job.recover, HTTP Command payloads and non-Agent Jobs do not introduce an origin.storage_unavailablebecause their Job model rejects unknown fields. The repository currently has no general project downgrade mechanism. Please confirm that this format-upgrade behavior is acceptable; users should back up project data before attempting to open it with an older build.