From 081fa2c9d48456f32bb28dbf54f8e8933d4dec11 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Sun, 13 Sep 2026 11:29:31 -0600 Subject: [PATCH] test(suite): replace plan-label references with self-contained wording Rust test comments/assert messages and deep-research script docstrings cited numbered requirement labels (R3/R5) and task labels (TASK-016, TASK-021) that are defined only in an external plan document. Reword each to say what it means on its own: fail-safe crash guards, the validator's fallback-capture warning, task-queue anchors. --- assets/agents/deep-research/README.md | 2 +- .../scripts/bootstrap_research.py | 2 +- .../deep-research/scripts/combine_findings.py | 2 +- .../scripts/incorporate_feedback.py | 2 +- .../deep-research/scripts/parse_request.py | 2 +- .../deep-research/scripts/reflexion_gate.py | 2 +- .../deep-research/scripts/verify_sources.py | 2 +- src/config/request_context.rs | 33 ++++++++++--------- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/assets/agents/deep-research/README.md b/assets/agents/deep-research/README.md index 9f2651b..7d2864d 100644 --- a/assets/agents/deep-research/README.md +++ b/assets/agents/deep-research/README.md @@ -263,7 +263,7 @@ pass — every fault is visible to the reviewer or the caller — and some end node always renders its sentinel, so the graph degrades instead of dying. -All 11 scripts also carry a top-level crash guard (R3): a script that +All 11 scripts also carry a top-level crash guard: a script that throws records a fault and fails forward where the flow allows it (a crashed `reflexion_gate` proceeds to `synthesize`; a crashed `verify_sources` reports that sources were NOT checked) instead of diff --git a/assets/agents/deep-research/scripts/bootstrap_research.py b/assets/agents/deep-research/scripts/bootstrap_research.py index f12a27c..36e9a59 100644 --- a/assets/agents/deep-research/scripts/bootstrap_research.py +++ b/assets/agents/deep-research/scripts/bootstrap_research.py @@ -7,7 +7,7 @@ the RAG knowledge lookup) as a single super-step. The validator requires declared parallel-branch script outputs, so we emit an empty JSON object explicitly here. -Fail-safe (R3): the node reads no state and computes nothing, so its +Fail-safe: the node reads no state and computes nothing, so its happy-path output IS the sane degraded output — the guard emits the same empty object on any crash. No PIPELINE-FAULT is recorded: appending one would require reading state (the very thing that crashed) or clobbering diff --git a/assets/agents/deep-research/scripts/combine_findings.py b/assets/agents/deep-research/scripts/combine_findings.py index 7d84184..b5a2f09 100644 --- a/assets/agents/deep-research/scripts/combine_findings.py +++ b/assets/agents/deep-research/scripts/combine_findings.py @@ -14,7 +14,7 @@ surface their collected output_key). This script lifts such findings into `pipeline_faults` (deduplicated, since a reflexion or feedback loop can re-run the map) so dead lanes surface in the report's Pipeline notes. -Fail-safe (R3): on a crash (e.g. malformed GRAPH_STATE), `findings` +Fail-safe: on a crash (e.g. malformed GRAPH_STATE), `findings` becomes the fault text itself and a PIPELINE-FAULT entry is recorded — the pipeline proceeds visibly degraded, and the human approval gate is the backstop. Existing faults are preserved best-effort. diff --git a/assets/agents/deep-research/scripts/incorporate_feedback.py b/assets/agents/deep-research/scripts/incorporate_feedback.py index aa93e53..4926ba2 100644 --- a/assets/agents/deep-research/scripts/incorporate_feedback.py +++ b/assets/agents/deep-research/scripts/incorporate_feedback.py @@ -11,7 +11,7 @@ budget. Routing (`_next`): always research_each_question. -Fail-safe (R3): a crash here means the user's feedback text cannot be +Fail-safe: a crash here means the user's feedback text cannot be recovered, but their INTENT — another research pass — is unambiguous (they chose neither accept nor reject). The degraded route therefore still loops to `research_each_question`, with a generic feedback note diff --git a/assets/agents/deep-research/scripts/parse_request.py b/assets/agents/deep-research/scripts/parse_request.py index 49b830a..f191811 100644 --- a/assets/agents/deep-research/scripts/parse_request.py +++ b/assets/agents/deep-research/scripts/parse_request.py @@ -10,7 +10,7 @@ Routing (`_next`): - prompt present -> (no _next; static next: plan) - prompt empty -> ask_topic -Fail-safe (R3): a crash here (e.g. malformed GRAPH_STATE) means the +Fail-safe: a crash here (e.g. malformed GRAPH_STATE) means the caller's prompt cannot be read at all, so proceeding silently is meaningless — the degraded route is `ask_topic`, which asks the user for the topic directly, plus a PIPELINE-FAULT entry so the loss is visible in diff --git a/assets/agents/deep-research/scripts/reflexion_gate.py b/assets/agents/deep-research/scripts/reflexion_gate.py index 2ffd57f..cf660e7 100644 --- a/assets/agents/deep-research/scripts/reflexion_gate.py +++ b/assets/agents/deep-research/scripts/reflexion_gate.py @@ -16,7 +16,7 @@ Reflexion is a best-effort quality booster, not a hard gate: once the budget is spent the workflow proceeds anyway, and the human approval step is the final backstop. -Fail-safe (R3): a crash here fails FORWARD to `synthesize` — the same +Fail-safe: a crash here fails FORWARD to `synthesize` — the same direction as the existing malformed-critique PASS default — with a PIPELINE-FAULT entry recorded (best-effort preserving existing faults), so a broken gate costs the run its automated critique routing, never the diff --git a/assets/agents/deep-research/scripts/verify_sources.py b/assets/agents/deep-research/scripts/verify_sources.py index d38cd88..d68d515 100644 --- a/assets/agents/deep-research/scripts/verify_sources.py +++ b/assets/agents/deep-research/scripts/verify_sources.py @@ -15,7 +15,7 @@ rendered section when `pipeline_faults` is non-empty and the empty string otherwise, keeping the happy-path `{{report}}{{pipeline_notes}}` output byte-identical to the pre-hardening `{{report}}`. -Fail-safe (R3): per-URL probes were already guarded; the top level now +Fail-safe: per-URL probes were already guarded; the top level now is too. On a crash the summary says sources were NOT checked, a PIPELINE-FAULT is recorded (best-effort preserving existing faults), and pipeline_notes still renders — the approval gate remains the backstop. diff --git a/src/config/request_context.rs b/src/config/request_context.rs index c7e45a2..217197d 100644 --- a/src/config/request_context.rs +++ b/src/config/request_context.rs @@ -8181,7 +8181,7 @@ mod tests { ] { assert!( architect.contains(anchor), - "architect config lost TASK-021 anchor: {anchor:?}" + "architect config lost task-queue mirroring anchor: {anchor:?}" ); } @@ -8199,7 +8199,7 @@ mod tests { ] { assert!( sisyphus.contains(anchor), - "sisyphus config lost TASK-021 anchor: {anchor:?}" + "sisyphus config lost task-queue chain anchor: {anchor:?}" ); } @@ -8214,7 +8214,7 @@ mod tests { ] { assert!( spawn.contains(anchor), - "DEFAULT_SPAWN_INSTRUCTIONS lost TASK-021 anchor: {anchor:?}" + "DEFAULT_SPAWN_INSTRUCTIONS lost task-queue semantics anchor: {anchor:?}" ); } assert!( @@ -8492,7 +8492,7 @@ mod tests { ); } - // ---- adversary suite-script regression tests (R5) ---- + // ---- adversary suite-script regression tests ---- // // Fault paths of the adversary's verdict/gate scripts, exercised by // invoking `python3