(
run_dir: Path,
*,
run_id: str,
lane: str,
analysis_intent: str = "real_analysis",
workflow: str,
status: str,
execute_requested: bool,
validation: dict[str, Any],
tool_preflight_result: dict[str, Any],
dry_run: dict[str, Any] | None = None,
execution: dict[str, Any] | None = None,
inputs: dict[str, Any] | None = None,
outputs: dict[str, Any] | None = None,
method: dict[str, Any] | None = None,
audit: dict[str, Any] | None = None,
review_bundle: dict[str, Any] | None = None,
)
| 516 | |
| 517 | |
| 518 | def write_standard_manifest( |
| 519 | run_dir: Path, |
| 520 | *, |
| 521 | run_id: str, |
| 522 | lane: str, |
| 523 | analysis_intent: str = "real_analysis", |
| 524 | workflow: str, |
| 525 | status: str, |
| 526 | execute_requested: bool, |
| 527 | validation: dict[str, Any], |
| 528 | tool_preflight_result: dict[str, Any], |
| 529 | dry_run: dict[str, Any] | None = None, |
| 530 | execution: dict[str, Any] | None = None, |
| 531 | inputs: dict[str, Any] | None = None, |
| 532 | outputs: dict[str, Any] | None = None, |
| 533 | method: dict[str, Any] | None = None, |
| 534 | audit: dict[str, Any] | None = None, |
| 535 | review_bundle: dict[str, Any] | None = None, |
| 536 | ) -> dict[str, Any]: |
| 537 | lineage_path = write_io_lineage(run_dir, inputs, outputs) |
| 538 | parameter_hash = sha256_json( |
| 539 | { |
| 540 | "lane": lane, |
| 541 | "workflow": workflow, |
| 542 | "execute_requested": execute_requested, |
| 543 | "inputs": inputs or {}, |
| 544 | "outputs": outputs or {}, |
| 545 | "method": method or {}, |
| 546 | } |
| 547 | ) |
| 548 | merged_audit = { |
| 549 | "plugin": plugin_metadata(), |
| 550 | "environment": environment_snapshot(), |
| 551 | "input_checksums": input_checksums(inputs), |
| 552 | "parameter_sha256": parameter_hash, |
| 553 | "lineage_table_path": str(lineage_path.relative_to(run_dir)), |
| 554 | } |
| 555 | config_path = run_dir / "config.json" |
| 556 | if config_path.exists(): |
| 557 | merged_audit["config_sha256"] = sha256_file(config_path) |
| 558 | if audit: |
| 559 | merged_audit.update(audit) |
| 560 | manifest = { |
| 561 | "schema_version": RUN_ENVELOPE_SCHEMA_VERSION, |
| 562 | "run_id": run_id, |
| 563 | "created_at": now_iso(), |
| 564 | "lane": lane, |
| 565 | "analysis_intent": analysis_intent, |
| 566 | "workflow": workflow, |
| 567 | "run_dir": str(run_dir), |
| 568 | "status": status, |
| 569 | "execute_requested": execute_requested, |
| 570 | "validation_ok": validation.get("ok"), |
| 571 | "tool_preflight_ok": tool_preflight_result.get("ok"), |
| 572 | "ready_to_execute": bool(validation.get("ok") and tool_preflight_result.get("ok")), |
| 573 | "dry_run_performed": dry_run is not None, |
| 574 | "dry_run_ok": dry_run.get("ok") if dry_run else None, |
| 575 | "execution_ok": execution.get("ok") if execution else None, |
no test coverage detected