Skip to content

DAG conditional branches: seven follow-ups left out of #1001 #1008

Open

Description

@LivXue

Follow-ups from the review of #1001 that were deliberately left out of it. Each was reproduced or read against that pull request's final revision; files and symbols are named rather than line numbers.

  1. A decision's route is the first thing cut on a tasks-board card. ui-web/src/features/tasks/styles.css gives .tkrunsel flex: 0 1 auto; min-width: 0, while the agent name and the tool chip never shrink, so the selection absorbs the whole overflow. Measured in Chromium on the 196px card: "Raven-Research" plus "3 tools" leaves the selection 12px wide ("->..."), and "Raven" plus "@triage" plus "1 tool" cuts even "bug". Direction: let the selection keep at least its first route name, or show it beside the status as the design describes (triage -> question).

  2. Route conditions are neither filled nor validated for ${params.X}. raven/playbook/executor.py fills parameters only in promptTemplate, and raven/playbook/validate.py checks parameter references only in promptTemplate and inputs. A condition such as "the deal is above ${params.threshold}" reaches the judge as written, and ${params.nobody}, an undeclared parameter, passes validation. Direction: fill and validate parameters in route conditions too, or refuse a placeholder there.

  3. Hand-written playbook YAML with route names yes, no, on, off, true, false or bare digits does not load. raven/playbook/store.py reads the file with yaml.safe_load, which follows YAML 1.1 and turns those keys into booleans or integers: nodes.0.routes.1.[key] Input should be a valid string, and the runtime logs "Skipping unloadable playbook" and drops it from the library. Files the store writes quote such keys and round-trip. Direction: read route keys as strings, or refuse with a message that names the quoting fix.

  4. The dag-mode part of the playbook generation prompt does not mention branches. raven/playbook/prompt.py still says "dependsOn is the whole graph language" and never mentions routes, when, or the rule that a node depending on a decision node must name it in when, although creation emits dag mode only and the emit schema offers the fields. Only the prompt-mode paragraph was updated, and the test over it reads that paragraph alone. Direction: one paragraph for dag mode, and a test over its wording.

  5. Nothing pins an ordinary node's judge request to its pre-branching form. test_judge_without_routes_sends_the_old_request_verbatim compares the request with the module's own constants: three mutants that change it (a prefix on the instruction, a schema property's description, a message label) pass all five DAG test files. The request is still byte-identical to the one before the change, checked over 17 input combinations. Direction: commit one literal golden of the full request, messages and tools, with the fence nonce patched.

  6. Domain terms around branches. In CONTEXT.md, "Decision node" has no Avoid note although "decision" already names the adjudication answer (exception waits for the main agent to decide; resolve_dag_node takes a decision); "Not executed" is set apart from skipped only in prose; and "branch" now means a route's path while the DAG orchestration skill (the paragraphs on abandon) and the docs site still use it for any part of a graph. Direction: Avoid notes, and a pass over the older uses of "branch".

  7. On native Windows, every workdir reference is refused as outside its roots. This one predates feat(*): let a dag decision node choose which of its branches run #1001 and is on main. raven/agent/subagent/prompt_paths.py resolves a reference that does not start with @nodes/ with posixpath (check_confined, through resolve_reference since feat(*): let a dag decision node choose which of its branches run #1001) and compares the result with each root through within, which tests for a / prefix. A Windows drive path is not absolute to posixpath, a backslash is not its separator, and the resolved path carries backslashes, so a {{ ref:... }} or {{ ref_path:... }} placeholder or a {"file": ...} input naming a workdir file is refused as "outside the session workdir and its sub-agent history", even a relative notes.md inside the workdir. Reproduced by running the check under NT path rules (ntpath in place of os.path) on a POSIX host: an absolute path into the node root, the same path with backslashes, notes.md and a ../ path were all refused. Not yet measured on a Windows host. @nodes/ references, and graphs validated without roots, take the shape-only check and are unaffected. feat(*): let a dag decision node choose which of its branches run #1001 marks its new tests that pass such a reference POSIX-only for this reason. Direction: resolve and compare with the host's path rules, and run the confinement tests in the Windows CI job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions