Component
Agent (Python runtime)
Describe the feature
Extend the agent's prepare-commit-msg hook so commits carry workflow attribution trailers in addition to the existing Task-Id and Prompt-Version trailers.
| Trailer |
Example |
Purpose |
Workflow-Id |
coding/new-task-v1 |
Which workflow executed |
Workflow-Step |
implement |
Active step name when the commit was created |
Document the full trailer set in agent/README.md and docs/design/OBSERVABILITY.md.
Use case
Task-Id and Prompt-Version link commits to a task and prompt hash, but not to where in the workflow the commit occurred. When a task fails at verify_build after multiple agent commits, reviewers cannot tell from git log alone which step produced which diff. Attribution and postmortems require cross-referencing TaskEvents or CloudWatch logs.
Proposed solution
- Set
WORKFLOW_ID and WORKFLOW_STEP in the step runner at each step boundary (agent/src/workflow/runner.py); set before agent execution and safety-net commits.
- Extend
agent/prepare-commit-msg.sh to append trailers when set (idempotent, same pattern as Task-Id).
- Ensure
pipeline.py post-hook commits run through the hook or set trailers explicitly.
- Tests: unit test hook output; integration test that a workflow run produces expected trailers on at least one commit.
Other information
Acknowledgements
Component
Agent (Python runtime)
Describe the feature
Extend the agent's
prepare-commit-msghook so commits carry workflow attribution trailers in addition to the existingTask-IdandPrompt-Versiontrailers.Workflow-Idcoding/new-task-v1Workflow-StepimplementDocument the full trailer set in
agent/README.mdanddocs/design/OBSERVABILITY.md.Use case
Task-IdandPrompt-Versionlink commits to a task and prompt hash, but not to where in the workflow the commit occurred. When a task fails atverify_buildafter multiple agent commits, reviewers cannot tell fromgit logalone which step produced which diff. Attribution and postmortems require cross-referencing TaskEvents or CloudWatch logs.Proposed solution
WORKFLOW_IDandWORKFLOW_STEPin the step runner at each step boundary (agent/src/workflow/runner.py); set before agent execution and safety-net commits.agent/prepare-commit-msg.shto append trailers when set (idempotent, same pattern asTask-Id).pipeline.pypost-hook commits run through the hook or set trailers explicitly.Other information
agent/prepare-commit-msg.sh.Acknowledgements