Skip to content

feat(platform): test one node, or the draft up to a node - #4819

Merged
yannickmonney merged 2 commits into
mainfrom
feat/automation-step-tests
Oct 11, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
feat/automation-step-tests

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

Test one node alone, or the draft up to a node (P5 S10c4). Builds on #4815, #4816 and #4818.

  • A Test node menu beside a node's name in the inspector (authors), with Test this node and Test up to here. For an agent node, the menu says agents are simulated in tests.
  • Test this node opens a dialog for what the node needs to run alone, as the engine's bench runs it (only):
    • Uses data from: one JSON field per node it reads, its conditions included. Each starts from the run on the canvas, from the data last used for this node this session, or empty with "{node} has no output to use yet".
    • Run input (JSON) only when a template of the node reads the run's input. A code step's input is the node's own and doesn't count.
    • Item for a node that runs once per item.
    • Data that is no JSON holds the test.
  • Running it tries the draft with bench: {only, mocks, item}:
    • The strip reads Node test: {node}, and Try again repeats it with the same data.
    • The node's run tab reads Node test.
    • When its condition read false, the strip notes that the test ran it anyway.
  • Test up to here opens the run dialog as Test up to {node}, with Start from and stand-ins but no What runs (the draft is what runs). It tries the draft with bench: {upTo}, and the strip reads Up to {node}.
  • On the canvas, pinned nodes carry Pinned data and the rest Left out of this test. A left-out step now gets a zero-length span at the run's start, so its chip shows in playback too.
  • A step test's strip offers no Save as test: it is no whole run.
  • Smaller changes:
    • the engine's readsOf is exported (pure) so the dialog asks for what the engine needs;
    • NodeRunView.whenWouldSkip;
    • the runs listing's contract type declares the input its full rows already carry, so a step test can start from the last run's input.

Docs and manual

  • The editor page (EN/DE/FR) gains "Test one node, or up to a node", with a new screenshot (automation-step-test: Total tested alone with Discount pinned).
  • Manual: AUTO-F178, and a reference row for the automated coverage.

Verification (local)

  • Platform tsc; oxlint on the changed files and the automations, routes and engine trees.

  • The whole server and PII projects: 87,723 of 87,724. The one red, lib/engine/core/diff/corpus.test.ts ("diffs each pair in under 5 ms"), is a timing bound that fails under the full parallel load and passes alone (twice). This branch doesn't touch the diff engine.

  • The whole platform UI suite: 7,568 of 7,568. Automations browser tests: 95 of 95.

  • @tale/ui unit (4,095) and browser (223), services/docs (709) and services/ui-docs (106) tests, i18n (616), lint:links, lint:manual, knip.

  • New tests:

    • what a node alone needs, and the session's pins (step-test.test.ts);
    • the dialog's sources, item and refusal of data that is no JSON (step-test-dialog.test.tsx);
    • the strip's note, the projection keeping the ran-anyway flag, and a left-out step's span with its chip (run-timeline.test.ts);
    • the editor: Test node › this node (only with pins, the strip, the Node test tab) and › up to here (upTo, no What runs, the strip).
  • Live in Chromium on a local stack (Order discounts), no console errors:

    • Test this node on Total offered Discount's data from the run on the canvas ({"rate": 0}) and the last run's input (quantity 50).
    • With {"rate": 0.2} and {"quantity": 1000, "unitPrice": 2}, the strip read Node test: Total · Succeeded. Discount showed Pinned data, Review Left out of this test, and Total's Node test tab showed input rate 0.2, quantity 1000, unitPrice 2 and output gross 2000, discount 400, total 1600.
    • Test up to here on Review with quantity 1500 read Up to Review, with Discount, Total and Review run.
  • The live check found two gaps, both fixed here:

    • a left-out step had no chip in playback;
    • the run input started empty instead of from the last run.

A Test node menu in the inspector tests a node alone on the data you give each node it reads (from the run on the canvas or as last used this session), the run input when it reads that and the item when it runs per item — or runs the draft up to it. The try's strip names the step test, Try again repeats it, pinned and left-out nodes carry their chips in playback too, and the node's run tab reads Node test.
The editor page explains Test node's two ways, with a screenshot of Total tested alone on pinned data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant