validate_debug_completion
Validates that post-run debug artifacts (JSON and log file) exist and contain required content. Checks artifact JSON keys and log markers, returning any errors found.
Instructions
Validate post-run debug artifacts landed on disk with the right shape.
Three deterministic checks:
- STR-001: ``selected_robust_trial.json`` + log file both exist.
- VAL-003: artifact JSON parses and carries every required top-level key.
- BT-010: log contains each required marker substring (order irrelevant).
Args:
artifact_path: Absolute path to the JSON artifact (typically
``<workspace>/backtest/selected_robust_trial.json``).
log_path: Absolute path to the debug log file.
required_json_keys: Top-level keys expected on the artifact.
Defaults to ``["trial_number", "params", "metrics"]``.
required_log_markers: Substrings expected in the log. Defaults
to ``["STAGE 4 COMPLETE", "STAGE 5 COMPLETE", "FINAL SUCCESS"]``.
Returns ``{"any_errors": bool, "findings": [{"code", "message",
"context"}, ...]}``. Never raises — parse / file-access failures
surface as findings with the appropriate error code.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"artifact_path": "<artifact_path>",
"log_path": "<log_path>"
},
"name": "validate_debug_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| artifact_path | Yes | ||
| log_path | Yes | ||
| required_json_keys | No | ||
| required_log_markers | No |