Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,10 @@ point to the next local `coverage-pipeline server-validation-result
review-queue` handoff for the written inspection directory, using
`download_smoke_review_queue.tsv` inside that inspection directory as the
default output path.
When ZIP outputs are missing and the sibling
`bounded_download_smoke_commands.tsv` is present, the summary also includes a
validation-only `recommended_execution_validation_request` for
`download-smoke execute`; it does not include `--execute` and does not download.
The inspection does not run `datasets`, extract ZIPs, write raw sequence text,
access the network, contact providers, or mutate workflow outputs.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions tests/test_cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2666,6 +2666,10 @@ def test_commands_render_emits_download_smoke_quality_gate_argv(capsys):
)
assert "recommended_quality_gate_request" in summary_fields
assert "recommended_review_queue_request" in summary_fields
assert "recommended_execution_validation_request_target" in summary_fields
assert "recommended_execution_validation_request" in summary_fields
assert "recommended_execution_validation_next_command" in summary_fields
assert "recommended_execution_validation_command" in summary_fields
assert "bounded_smoke_next_action" in summary_fields
assert "bounded_smoke_next_action_reasons" in summary_fields

Expand Down
33 changes: 33 additions & 0 deletions tests/test_cli_download_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,39 @@ def test_download_smoke_inspect_accepts_annotated_prepare_plan(capsys, tmp_path)
assert rows[0]["quality_tier"] == "high"
assert summary["selected_row_count"] == 1
assert summary["blockers"] == ["missing_zip_outputs"]
execution_outdir = outdir / "execution"
assert summary["recommended_execution_validation_request_target"] == (
"download-smoke execute"
)
assert summary["recommended_execution_validation_request"] == {
"command": "download-smoke",
"subcommand": "execute",
"commands_manifest": str(outdir / "bounded_download_smoke_commands.tsv"),
"limit": 1,
"write": True,
"outdir": str(execution_outdir),
}
assert summary["recommended_execution_validation_next_command"] == (
"typetreeflow download-smoke execute --commands-manifest "
f"{outdir / 'bounded_download_smoke_commands.tsv'} "
f"--limit 1 --write --outdir {execution_outdir}"
)
assert "--execute" not in summary["recommended_execution_validation_command"]
assert (
main(
[
"commands",
"render",
"--request-json",
json.dumps(summary["recommended_execution_validation_request"]),
]
)
== 0
)
rendered = json.loads(capsys.readouterr().out)
assert rendered["target_argv"] == (
summary["recommended_execution_validation_command"][1:]
)


def test_download_smoke_prepare_write_carries_inspection_quality_gates(
Expand Down
4 changes: 4 additions & 0 deletions typetreeflow/commands_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,10 @@
"recommended_review_queue_request_target",
"recommended_review_queue_request",
"recommended_review_queue_next_command",
"recommended_execution_validation_request_target",
"recommended_execution_validation_request",
"recommended_execution_validation_next_command",
"recommended_execution_validation_command",
"bounded_smoke_next_action",
"bounded_smoke_next_action_reasons",
"status_counts",
Expand Down
26 changes: 26 additions & 0 deletions typetreeflow/download_smoke_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,10 @@ def _bounded_plan_path_for_commands_manifest(commands_manifest_path: str | Path)
return Path(commands_manifest_path).parent / OUTPUT_PLAN_NAME


def _bounded_commands_path_for_plan(bounded_plan_path: str | Path) -> Path:
return Path(bounded_plan_path).parent / OUTPUT_COMMANDS_NAME


def _recommended_inspection_command(
bounded_plan_path: str | Path,
*,
Expand Down Expand Up @@ -1050,6 +1054,16 @@ def inspect_bounded_download_smoke_outputs(
recommended_quality_gate_command = _recommended_inspection_command_from_request(
recommended_quality_gate_request
)
recommended_execution_validation_request: dict[str, object] = {}
if "missing_zip_outputs" in blockers:
commands_manifest_path = _bounded_commands_path_for_plan(plan_path)
if commands_manifest_path.exists():
recommended_execution_validation_request = (
_recommended_execution_validation_request(
commands_manifest_path,
limit=len(rows),
)
)

ready = not blockers
next_action, next_action_reasons = _bounded_smoke_next_action(
Expand Down Expand Up @@ -1207,6 +1221,18 @@ def inspect_bounded_download_smoke_outputs(
"recommended_review_queue_request_target": "",
"recommended_review_queue_request": {},
"recommended_review_queue_next_command": "",
"recommended_execution_validation_request_target": (
EXECUTE_COMMAND if recommended_execution_validation_request else ""
),
"recommended_execution_validation_request": (
recommended_execution_validation_request
),
"recommended_execution_validation_next_command": _recommended_next_command(
recommended_execution_validation_request
),
"recommended_execution_validation_command": _recommended_command_from_request(
recommended_execution_validation_request
),
"bounded_smoke_next_action": next_action,
"bounded_smoke_next_action_reasons": next_action_reasons,
"status_counts": dict(sorted(status_counts.items())),
Expand Down
Loading