TDD: Graph route with an edge to a non-existent target node executes partially then exits silently instead of failing config validation #92

Open
opened 2026-07-31 18:51:29 +00:00 by CoreRasurae · 0 comments
Member

Metadata

  • Commit Message: test(graph): capture unvalidated edge target regression (#91)
  • Branch: tdd/m1-graph-edge-target-validation

Background and context

Companion TDD issue-capture test for the bug: a graph route whose edge target
(or source) references a non-existent node is accepted at load time and only
fails by silently truncating execution, violating §11 (load-time validation,
ConfigurationError), §11.3.4 (edge source/target must reference existing
nodes) and §6.11.5 (edge validation) of the Actor Configuration Standard.

This issue delivers a failing-first Behave regression test that proves the
bug exists. The actual fix is delivered by the bug issue on a bugfix/ branch.

Current behavior

No test asserts that loading a graph with a dangling edge target/source raises
ConfigurationError before execution. The defect can regress undetected.

Expected behavior

A Behave scenario exists that:

  • Loads a graph config whose edge target names an undefined node.
  • Asserts that loading raises ConfigurationError before any agent is
    instantiated or any message is processed.
  • Fails (via AssertionError) while the bug is present, and passes once the fix
    lands.

Acceptance criteria

  • A Behave scenario reproduces the bug: loading a graph with an edge whose
    target is not a defined node is expected to raise ConfigurationError
    at load time; the assertion fails while the bug is present.
  • The scenario carries all three tags: @tdd_issue, @tdd_issue_91,
    @tdd_expected_fail.
  • The "bug still present" signal uses AssertionError only
    (assert ... / raise AssertionError(...)) — never ValueError,
    RuntimeError, OSError, or any other exception type.
  • With @tdd_expected_fail present, nox -s unit_tests is green (the hook
    inverts the failing assertion).
  • The TDD branch is named tdd/m1-graph-edge-target-validation (same suffix
    as the companion bugfix/ branch).

Supporting information

  • Bug captured: issue #91.
  • Spec: docs/index.md — §11 preamble, §11.3.4, §6.11.5, §6.4, §6.2.1.
  • TDD tag/assertion rules per the cleveractors-contributing workflow: the TDD
    hook only inverts AssertionError; the three tags are mandatory; only
    @tdd_expected_fail is removed by the bug-fix developer, @tdd_issue and
    @tdd_issue_91 remain forever as regression guards.

Subtasks

  • Add a Behave feature scenario under features/ reproducing the dangling
    edge-target defect, tagged @tdd_issue @tdd_issue_91 @tdd_expected_fail.
  • Implement the step definitions (fully — no placeholder steps), signalling
    "bug still present" only via AssertionError.
  • Confirm the assertion actually fails when run without @tdd_expected_fail,
    and that nox -s unit_tests is green with the tag present.
  • Verify coverage >= 97% via nox -s coverage_report.
  • Run nox (all default sessions), fix any errors.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line matches the Commit Message in
    Metadata exactly.
  • The commit is pushed to the branch matching the Branch in Metadata exactly.
  • The TDD PR is submitted to master, reviewed (test quality, correct tagging,
    AssertionError usage), and merged.
## Metadata - **Commit Message:** `test(graph): capture unvalidated edge target regression (#91)` - **Branch:** `tdd/m1-graph-edge-target-validation` ## Background and context Companion TDD issue-capture test for the bug: a graph route whose edge `target` (or `source`) references a non-existent node is accepted at load time and only fails by silently truncating execution, violating §11 (load-time validation, `ConfigurationError`), §11.3.4 (edge source/target must reference existing nodes) and §6.11.5 (edge validation) of the Actor Configuration Standard. This issue delivers a **failing-first** Behave regression test that proves the bug exists. The actual fix is delivered by the bug issue on a `bugfix/` branch. ## Current behavior No test asserts that loading a graph with a dangling edge target/source raises `ConfigurationError` before execution. The defect can regress undetected. ## Expected behavior A Behave scenario exists that: - Loads a graph config whose edge `target` names an undefined node. - Asserts that loading raises `ConfigurationError` before any agent is instantiated or any message is processed. - Fails (via `AssertionError`) while the bug is present, and passes once the fix lands. ## Acceptance criteria - [ ] A Behave scenario reproduces the bug: loading a graph with an edge whose `target` is not a defined node is expected to raise `ConfigurationError` at load time; the assertion fails while the bug is present. - [ ] The scenario carries all three tags: `@tdd_issue`, `@tdd_issue_91`, `@tdd_expected_fail`. - [ ] The "bug still present" signal uses `AssertionError` only (`assert ...` / `raise AssertionError(...)`) — never `ValueError`, `RuntimeError`, `OSError`, or any other exception type. - [ ] With `@tdd_expected_fail` present, `nox -s unit_tests` is green (the hook inverts the failing assertion). - [ ] The TDD branch is named `tdd/m1-graph-edge-target-validation` (same suffix as the companion `bugfix/` branch). ## Supporting information - Bug captured: issue #91. - Spec: `docs/index.md` — §11 preamble, §11.3.4, §6.11.5, §6.4, §6.2.1. - TDD tag/assertion rules per the `cleveractors-contributing` workflow: the TDD hook only inverts `AssertionError`; the three tags are mandatory; only `@tdd_expected_fail` is removed by the bug-fix developer, `@tdd_issue` and `@tdd_issue_91` remain forever as regression guards. ## Subtasks - [ ] Add a Behave feature scenario under `features/` reproducing the dangling edge-target defect, tagged `@tdd_issue @tdd_issue_91 @tdd_expected_fail`. - [ ] Implement the step definitions (fully — no placeholder steps), signalling "bug still present" only via `AssertionError`. - [ ] Confirm the assertion actually fails when run without `@tdd_expected_fail`, and that `nox -s unit_tests` is green with the tag present. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. - [ ] Run `nox` (all default sessions), fix any errors. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the first line matches the Commit Message in Metadata exactly. - The commit is pushed to the branch matching the Branch in Metadata exactly. - The TDD PR is submitted to `master`, reviewed (test quality, correct tagging, `AssertionError` usage), and merged.
CoreRasurae added this to the v2.1.0 milestone 2026-07-31 18:51:29 +00:00
CoreRasurae added the
State
Unverified
Type
Testing
Priority
Critical
labels 2026-07-31 18:51:29 +00:00
CoreRasurae added
State
Verified
and removed
State
Unverified
labels 2026-07-31 19:25:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: cleveragents/cleveractors-core#92