Skip to content

[codex] narrow srtctl mcp to authoring and validation#55

Merged
ishandhanani merged 8 commits intomainfrom
ishandhanani/status-reporter-eager-artifacts-push
Apr 21, 2026
Merged

[codex] narrow srtctl mcp to authoring and validation#55
ishandhanani merged 8 commits intomainfrom
ishandhanani/status-reporter-eager-artifacts-push

Conversation

@ishandhanani
Copy link
Copy Markdown
Collaborator

@ishandhanani ishandhanani commented Apr 21, 2026

What changed

This PR narrows the srt-slurm surface to recipe authoring and non-authoritative validation.

ishandhanani and others added 4 commits April 21, 2026 01:02
Previously, when a recipe set `reporting.status.endpoint` but the cluster's
srtslurm.yaml did not, `_report_metrics` in PostProcessStageMixin would
silently no-op because it only read `load_cluster_config()`. The final
`report_completed` PUT also fired before `run_postprocess`, so the
"completed" status hit the collector before any rollup was generated.
Net effect: the collector recorded lifecycle correctly but `logs_url`
stayed null, and consumers (e.g. IBAR) could not find the S3 artifacts.

Changes:
- `StatusReporter.report_completed(exit_code, logs_url=None)` — final PUT
  now carries the artifact pointer when available.
- New `StatusReporter.report_artifacts(logs_url)` — eager mid-run PUT that
  updates `logs_url` without flipping the lifecycle to `completed`.
  Fires as soon as S3 sync returns, before AI analysis runs, so a hanging
  or crashing analyzer cannot strand the pointer.
- `run_postprocess(exit_code, reporter=None)` — accepts the reporter,
  pushes `logs_url` eagerly, and stashes it on `self._last_logs_url`
  for the caller's final `report_completed`.
- Removed `_report_metrics`: duplicate PUT path that only read cluster
  config, missed recipe-defined endpoints, and is now fully covered by
  the reporter-based path that resolves both sources via `from_config`.
- `do_sweep.run()` finally block reordered: postprocess runs before
  `report_completed`, and the final PUT reasserts `logs_url` idempotently.

Benchmark results themselves are intentionally NOT forwarded through the
status API. S3 remains the source of truth for artifacts; the collector
only stores the pointer.

Also bundles a small helper refactor in `core/config.py` (extract
`find_cluster_config_path`, add `get_cluster_aliases`) that was pending
in the working tree.

Tests:
- `test_status.py`: coverage for the new `logs_url` kwarg on
  `report_completed` and three cases for `report_artifacts` (disabled,
  empty URL, success without flipping status to completed).
- `test_postprocess.py`: replaced `_report_metrics` assertions with the
  new shape — eager reporter push, stash on self, skip paths for no S3
  URL and no reporter.

All 589 tests pass. Ruff clean on touched files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Four references in comments/docstrings/CLI help were naming a specific
external harness. Replaced with provider-neutral language ("upstream
harnesses", "downstream consumers"). No behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ishandhanani ishandhanani marked this pull request as ready for review April 21, 2026 15:23
@ishandhanani ishandhanani changed the title [codex] clarify local scope of srtctl mcp [codex] narrow srtctl mcp to authoring and validation Apr 21, 2026
@ishandhanani ishandhanani merged commit fc26d5f into main Apr 21, 2026
6 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.

1 participant