feat: record verdicts in pieces and check the design against the schema
From the case 02 run cancelled at 66 minutes on 2026-10-07: - The validator records verdicts a few Checks at a time (verdict_put) and they are attached on submission. It timed out five times writing them in one reply. Verdicts on the same code survive a run cut short; verdicts on changed code are dropped. Its model timeout is 300 s. - A schema review at submission, in code: every setting a Check names is looked up on its Element's resource type, and an unknown resource type is reported. Two Revisions in that run were for Checks no code could meet. On the two designs that passed validation it raises 2 of 96 Checks, both one metric name used as a value, so it is returned once and never blocks. - Reviews run together; the Jev coverage review stays off. Plans record both steps and the cancelled run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,13 +22,19 @@ from app.adk.runtime import (
|
||||
)
|
||||
from app.states.ledger import Ledger, LedgerRefusal, PhaseStatus
|
||||
from app.tools.workspace import (
|
||||
FILES,
|
||||
basis_of,
|
||||
file_tools,
|
||||
graph_text,
|
||||
graph_tools,
|
||||
keep_graph,
|
||||
safe_relative,
|
||||
verdict_tools,
|
||||
verdicts_text,
|
||||
working_files,
|
||||
working_verdicts,
|
||||
)
|
||||
from app.workflows.chain import VERDICTS_FILE, read_graph
|
||||
from app.workflows.deliverables import (
|
||||
DEPENDENCY_GRAPH,
|
||||
DeliverableKind,
|
||||
@@ -49,6 +55,7 @@ from app.workflows.target_architecture import (
|
||||
ORCHESTRATOR = "orchestrator"
|
||||
logger = logging.getLogger(__name__)
|
||||
_TARGET = DeliverableKind.TARGET_ARCHITECTURE
|
||||
_CODE = DeliverableKind.DEPLOYMENT_GUIDANCE
|
||||
CLOUD_READ = "cloud_read"
|
||||
|
||||
_NO_ARGS: Mapping[str, Any] = {"type": "object", "properties": {}}
|
||||
@@ -277,6 +284,13 @@ def specialist_tools(
|
||||
is_graph = kind is DeliverableKind.TARGET_ARCHITECTURE
|
||||
own_files = DEPENDENCY_GRAPH[kind].working_copy is kind
|
||||
reviewed = False
|
||||
is_validation = kind is DeliverableKind.VALIDATION_RESULTS
|
||||
judged = ((upstream or {}).get(_CODE.value) or {}).get("attachments") or {}
|
||||
# The validator's own copy of the code is the same files; either marks them.
|
||||
basis = basis_of(judged or working.get(FILES) or {})
|
||||
if is_validation:
|
||||
working_verdicts(working, basis) # drops verdicts given on other code
|
||||
graph_now = read_graph(upstream)
|
||||
|
||||
async def submit_deliverable(content: str, attachments: Any = None) -> ToolResult:
|
||||
try:
|
||||
@@ -288,6 +302,12 @@ def specialist_tools(
|
||||
attachments = {**working_files(working), **attachments}
|
||||
if is_graph and GRAPH_ATTACHMENT not in attachments and graph_text(working):
|
||||
attachments[GRAPH_ATTACHMENT] = graph_text(working)
|
||||
if (
|
||||
is_validation
|
||||
and VERDICTS_FILE not in attachments
|
||||
and verdicts_text(working)
|
||||
):
|
||||
attachments[VERDICTS_FILE] = verdicts_text(working)
|
||||
unsafe = [name for name in attachments if not safe_relative(name)]
|
||||
if unsafe:
|
||||
return _refused(
|
||||
@@ -400,6 +420,11 @@ def specialist_tools(
|
||||
else ()
|
||||
),
|
||||
*(graph_tools(working) if is_graph else ()),
|
||||
*(
|
||||
verdict_tools(working, basis, graph_now.check_ids if graph_now else ())
|
||||
if is_validation
|
||||
else ()
|
||||
),
|
||||
*(file_tools(working) if own_files else ()),
|
||||
*(gate_cloud_read(tool, allow_cloud_read) for tool in extra),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user