docs: removed references to individual task files in the code documentation
This commit is contained in:
6 files changed
+18
-27
No files matched your search
@@ -8157,9 +8157,6 @@ mod tests {
|
||||
assert!(paths::skill_file("frontend-ui-ux").exists());
|
||||
}
|
||||
|
||||
/// TASK-021 pinned prose: the task-queue guidance added to the shipped
|
||||
/// artifacts must not silently erode. Each anchor quotes the shipped text
|
||||
/// verbatim (chosen to avoid line-wrap boundaries in the YAML sources).
|
||||
#[test]
|
||||
#[serial]
|
||||
fn bundled_assets_pin_task_queue_guidance() {
|
||||
|
||||
+7
-9
@@ -20,8 +20,6 @@ const DEFAULT_TIMEOUT_SECS: u64 = 300;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub(super) enum AgentExecutionOutcome {
|
||||
/// Carries the raw agent output for tests; the executor's agent arm
|
||||
/// ignores the payload.
|
||||
Continue(String),
|
||||
FellBack(String),
|
||||
}
|
||||
@@ -49,8 +47,8 @@ impl AgentNodeExecutor {
|
||||
}
|
||||
|
||||
/// Turns the node run's final result into a routing outcome. With a
|
||||
/// `fallback` declared, any failure — retries exhausted, hard error, or
|
||||
/// extraction failure — is written into state as
|
||||
/// `fallback` declared, any failure (e.g. retries exhausted, hard error, or
|
||||
/// extraction failure) is written into state as
|
||||
/// `"Agent node failed: <chain>"` and routes to the fallback. Only the
|
||||
/// node's `state_updates` can capture that string (bound as `{{output}}`
|
||||
/// during interpolation); the output-schema auto-merge never applies to it,
|
||||
@@ -192,11 +190,11 @@ fn boxed_attempt<'a>(fut: impl Future<Output = Result<String>> + Send + 'a) -> A
|
||||
/// failures that `is_transient_error` recognizes.
|
||||
///
|
||||
/// `run_agent_for_graph` takes the peer identity off the ctx and never
|
||||
/// restores it, so BOTH halves — the (id, inbox) assignment and the registry
|
||||
/// — are captured up front and re-armed before every retry; re-arming only
|
||||
/// restores it, so BOTH halves, the (id, inbox) assignment and the registry,
|
||||
/// are captured up front and re-armed before every retry; re-arming only
|
||||
/// the assignment would give a retried attempt its identity back but no
|
||||
/// roster and a broken `agent__send_message`. A frontier peer is retired
|
||||
/// exactly once, after the final attempt, the moment the agent stops — not
|
||||
/// exactly once, after the final attempt, the moment the agent stops, not
|
||||
/// after extraction. Chains re-arm the same identity for later steps and
|
||||
/// leave retirement to the chain runner.
|
||||
async fn run_with_retries(
|
||||
@@ -259,8 +257,8 @@ async fn retry_transient(
|
||||
}
|
||||
|
||||
/// Applies the wall-clock bound and the human-readable failure contexts to a
|
||||
/// single attempt. The contexts land here — before the caller inspects the
|
||||
/// error — because `tokio::time::error::Elapsed` renders as "deadline has
|
||||
/// single attempt. The contexts land here, before the caller inspects the
|
||||
/// error, because `tokio::time::error::Elapsed` renders as "deadline has
|
||||
/// elapsed", which the transient matcher would not recognize as a timeout.
|
||||
async fn bounded_attempt(
|
||||
agent_name: &str,
|
||||
|
||||
+3
-3
@@ -294,8 +294,8 @@ async fn run_chain_step(
|
||||
branch_nodes.sort_unstable();
|
||||
bail!(
|
||||
"routed to '{target}' which is outside the branch subgraph rooted at \
|
||||
'{}' (branch nodes: {}). Routing targets inside a map branch — script \
|
||||
`_next` or node fallback — must stay within the branch.",
|
||||
'{}' (branch nodes: {}). Routing targets inside a map branch (script \
|
||||
`_next` or node fallback) must stay within the branch.",
|
||||
chain.entry,
|
||||
branch_nodes.join(", ")
|
||||
);
|
||||
@@ -1282,7 +1282,7 @@ nodes:
|
||||
);
|
||||
assert!(
|
||||
chain.contains(
|
||||
"Routing targets inside a map branch — script `_next` or node fallback — \
|
||||
"Routing targets inside a map branch (script `_next` or node fallback) \
|
||||
must stay within the branch."
|
||||
),
|
||||
"{chain}"
|
||||
|
||||
+4
-8
@@ -23,6 +23,7 @@ pub use executor::GraphExecutor;
|
||||
pub use parser::{GraphParser, agent_has_graph};
|
||||
use serde_json::Value;
|
||||
use std::time::Duration;
|
||||
use anyhow::Error;
|
||||
pub use types::{Graph, NodeType};
|
||||
|
||||
pub const GRAPH_SCHEMA_VERSION: &str = "1.0";
|
||||
@@ -34,12 +35,7 @@ pub(crate) fn wall_clock(secs: u64) -> Option<Duration> {
|
||||
(secs != 0).then(|| Duration::from_secs(secs))
|
||||
}
|
||||
|
||||
/// Whether an error looks like a transient transport/provider failure worth
|
||||
/// retrying. Typed transport errors anywhere in the chain (reqwest
|
||||
/// connect/timeout failures and tokio's `Elapsed`) are recognized first;
|
||||
/// providers that surface failures only as rendered text fall back to
|
||||
/// substring matching over the whole context chain.
|
||||
pub(crate) fn is_transient_error(err: &anyhow::Error) -> bool {
|
||||
pub(crate) fn is_transient_error(err: &Error) -> bool {
|
||||
if err.chain().any(|c| {
|
||||
c.downcast_ref::<reqwest::Error>()
|
||||
.is_some_and(|e| e.is_connect() || e.is_timeout())
|
||||
@@ -136,7 +132,7 @@ mod tests {
|
||||
let elapsed = tokio::time::timeout(Duration::from_secs(1), std::future::pending::<()>())
|
||||
.await
|
||||
.expect_err("pending future must time out");
|
||||
let err = anyhow::Error::new(elapsed).context("calling provider");
|
||||
let err = Error::new(elapsed).context("calling provider");
|
||||
|
||||
// "deadline has elapsed" contains no recognized substring, so only
|
||||
// the typed pre-check can classify this as transient.
|
||||
@@ -157,6 +153,6 @@ mod tests {
|
||||
.expect_err("closed local port must refuse the connection");
|
||||
|
||||
assert!(err.is_connect());
|
||||
assert!(is_transient_error(&anyhow::Error::new(err)));
|
||||
assert!(is_transient_error(&Error::new(err)));
|
||||
}
|
||||
}
|
||||
@@ -416,7 +416,7 @@ impl GraphValidator {
|
||||
node_id,
|
||||
format!(
|
||||
"{kind} node declares `fallback` with `output_schema` but no \
|
||||
`state_updates`; on failure the \"…failed: <chain>\" string is \
|
||||
`state_updates`; on failure the \"...failed: <chain>\" string is \
|
||||
only written through `state_updates`, so the fallback node \
|
||||
cannot see why it was reached"
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user