Skip to content

Add file-based status reporting for external consumers#257

Merged
nhorton merged 5 commits intomainfrom
feat/status-reporting
Mar 9, 2026
Merged

Add file-based status reporting for external consumers#257
nhorton merged 5 commits intomainfrom
feat/status-reporting

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Mar 9, 2026

Summary

  • Adds a StatusWriter that writes .deepwork/tmp/status/v1/job_manifest.yml and sessions/<session_id>.yml for external tools (UIs, dashboards, monitoring) to read workflow state without MCP
  • Extends WorkflowSession with workflow_instance_id, step_history, and sub_workflow_instance_ids for richer state tracking
  • Preserves completed/aborted workflows in completed_workflows list instead of discarding them
  • All status writes are fire-and-forget — failures are logged as warnings and never fail tool calls

Test plan

  • 20 new tests in test_status.py covering manifest writing, session status, display name derivation, nested/multi-agent/completed workflows
  • 13 new tests in test_state.py covering workflow_instance_id, step_history, completed_workflows, get_all_session_data, sub_workflow_instance_ids
  • 5 new tests in test_tools.py covering StatusWriter integration and failure resilience
  • All 251 MCP tests pass
  • Ruff linting passes

🤖 Generated with Claude Code

nhorton and others added 5 commits March 9, 2026 16:16
Implements a stable external interface (.deepwork/tmp/status/v1/) that
allows UIs, dashboards, and monitoring tools to read job and workflow
session state without going through the MCP protocol.

Key changes:
- StatusWriter writes job_manifest.yml and sessions/<id>.yml
- WorkflowSession gains workflow_instance_id and step_history tracking
- Completed/aborted workflows preserved in completed_workflows list
- Sub-workflow instance IDs tracked on parent steps
- Status writes are fire-and-forget (failures logged, never fail tools)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…19 fix

- Add traceability comments (JOBS-REQ-010.x) to all new tests
- Add missing test for go_to_step write trigger (JOBS-REQ-010.6.3)
- Add test for status directory v1 path structure (JOBS-REQ-010.1, 010.13)
- Fix RFC 2119 keywords in JOBS-REQ-010.13 requirements 1 and 2
- Add type annotations to test_status.py helper methods (mypy fix)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add StatusWriter component section to doc/architecture.md
- Auto-linter fixes for type annotations in state.py and status.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix formatting in test_tools.py (ruff format)
- Add "Display status files" step to e2e workflow to cat status
  files after run for observability
- Include status directory in artifact uploads

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- JOBS-REQ-010.3.1: test startup writes manifest via create_server
- JOBS-REQ-010.5.3: test last_updated_at is ISO 8601 UTC
- JOBS-REQ-010.9.4: test cross-agent sub-workflow records on main stack
- JOBS-REQ-010.10.4: test _write_stack preserves completed_workflows
- Update test coverage table in spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nhorton nhorton added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit bda8fe1 Mar 9, 2026
5 checks passed
@nhorton nhorton deleted the feat/status-reporting branch March 9, 2026 22:06
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.

1 participant