Skip to content

Scope editor - #25

Merged
chenkasirer merged 1 commit into
mainfrom
scope_editor
Aug 18, 2026
Merged

Scope editor#25
chenkasirer merged 1 commit into
mainfrom
scope_editor

Conversation

@chenkasirer

Copy link
Copy Markdown
Contributor

based on #24

  • Added support for scope definition in editor

Created by selecting the tasks included and clicking "group into scope"

image

@chenkasirer
chenkasirer changed the base branch from main to simulation August 10, 2026 09:58

@gonzalocasas gonzalocasas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Base automatically changed from simulation to main August 18, 2026 08:00
A scope is a region of the DAG — a scope_start policy on the task that
opens it, a scope_end back-reference on the task that closes it, and
membership implied by reachability — so it is authored by selecting tasks
and grouping them, not by typing task ids into fields:

* "Group into Scope" derives the entry and exit tasks from the selection
  and refuses selections the orchestrator would reject (two entry
  branches, disconnected parts, interlacing with an existing scope).
* Scope frames are drawn behind the member tasks, reusing the run
  monitor's ScopeGroupNode so both views read as the same thing. They are
  recomputed from live node positions rather than stored.
* ScopeEditPanel picks the policy from a segmented Skip / Retry / While
  control, showing only the fields that policy reads. The three are
  mutually exclusive in the data model, so no combination of inputs can
  produce a scope_start carrying two.
* Scope pairing and nesting are validated before upload, and renaming or
  deleting a boundary task keeps the markers consistent.

Two bugs found while using it:

Declared IO types were dropped on the way into the editor. The model
carries them on type_hint; the editor read and wrote the deprecated
`type` alias, so a blueprint fetched from the orchestrator arrived with
its types in a field nothing looked at. The committed schema copy was
stale and had no type_hint at all, so nothing could have referenced it —
regenerating it from the backend is part of this change. The editor now
canonicalises onto type_hint at its boundary and still accepts `type` on
the way in. The monitor's breakpoint panel had the same defect, rendering
every held task's output as untyped.

Simulate failed with an opaque "Save failed (400)". Selecting the While
policy seeds an empty condition, which the orchestrator rejects because
it parses the expression — and uploadBlueprint discarded the response
body, which is where the per-problem detail lives. The empty condition is
now caught in the editor, and a rejection reports what it was rejected
for.

The IO type field is a select over the known types with a Custom escape
hatch, rather than free text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chenkasirer
chenkasirer merged commit c76cbc9 into main Aug 18, 2026
1 check passed
@chenkasirer
chenkasirer deleted the scope_editor branch August 18, 2026 08:23
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.

2 participants