- New cp1-discovery-package-agent (ADR 0020): one package per reviewed run, every part hashed (sha256 over canonical JSON), with a manifest and a value scorecard. - Applications grouped CMDB -> tag -> resource group with a judged model fallback (ADR 0021): CMDB 0.7.0 carries ownership, dependency mapping 0.6.0 groups, report 0.9.0 shows them. - Critic 0.6.1 accepts the producers' enums; build_workflow.py refuses a consumer enum narrower than its producer's. - Code hooks, sub-agents and tests for the inventory, CMDB, dependency, planner and critic agents; the report and Well-Architected review agents; ADRs 0012-0021. - Workflow cases with value bars and run limits; run evaluation and usage collection scripts; the run context template and the field-by-field review for ADR 0016. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
933 B
Python
21 lines
933 B
Python
"""Answers from pre_process: the report comes from app/report.py, so no model is called."""
|
|
import json
|
|
from typing import Any, Optional
|
|
|
|
from kyndryl_agent_runtime.request_cycle import Reply
|
|
|
|
from app import report
|
|
|
|
|
|
# This step runs before the approval gate, so its page is never the released copy.
|
|
DRAFT = "Draft. Not for release until the Engagement Lead approves it."
|
|
|
|
|
|
def pre_process(payload: dict) -> Optional[Any]:
|
|
"""Render the report from the step outputs in the request."""
|
|
return Reply(json.dumps({"engagement_id": payload["engagement_id"], "run_id": payload["run_id"],
|
|
"verdict": payload.get("verdict") or "not supplied", "counts": report.counts(payload),
|
|
"report_markdown": report.render(payload),
|
|
"report_html": report.render_html(payload, DRAFT),
|
|
"final_html": report.render_html(payload)}))
|