Skip to content

validate_play rejects a legitimate Play condition referencing an inherited (extends-chain) field as BrokenPath #2819

Closed

Description

@mstomar125

Context

Surfaced during review of PR #2817 (core#2769 — merging fields across the extends chain in get_workflow_state's diagnostic candidate enumeration). This is the same root-cause gap, but more severe: it's in the save-time validation path, not a diagnostic query, so it can actually block a legitimate Play from ever being created.

Problem

validate_schema_path (packages/core/src/playbook/validation.rs, called from validate_play) checks path segment names against a single schema fetch (ensure_schema_cached → get_schema_node) — it does not walk the ADR-078 extends chain the way NodeService::resolve_field_owners does (which #2769/PR#2817 just adopted in workflow_state.rs for the identical problem).

Concrete failure scenario

Schema epic_base declares field priority. Schema epic extends epic_base with no fields of its own (the normal, intended extends usage — inheriting rather than redeclaring). Schema task declares a relationship epic targeting epic.

A Play on node_type task with a perfectly legitimate condition node.epic.priority == 'high' fails validate_play with PlayValidationError::BrokenPath ("'priority' is not a field or relationship on schema 'epic'") — the Play can never be saved or activated at all, even though priority genuinely resolves via the extends chain and the exact same condition would work correctly once merged fields are available (as #2769/PR#2817 demonstrates for the diagnostic path).

Fix

Apply the same fix pattern as #2769: have validate_schema_path use the merged/effective field set (resolve_field_owners or equivalent) instead of a single schema's own directly-declared fields, so save-time validation agrees with what the runtime engine and the (now-fixed) diagnostic tooling both correctly resolve.

Priority

Higher than #2769's own scope — this blocks real functionality (a user/agent cannot save a Play using an inherited field at all), not just a diagnostic misclassification.

Activity

  1. added
    bug
    on Sep 22, 2026
  2. mstomar125 commented on Sep 22, 2026

    @mstomar125
    ContributorAuthor

    Frontend baseline: 5238 passed, 2 failed (pre-existing flaky timing tests: multi-tab-reactivity propagation-time assertion and architecture-benchmarks scaling-factor assertion — both timing-sensitive and unrelated to this change). Starting implementation.

  3. self-assigned this
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfoundation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions