Skip to content

feat(core): orphaned-flow diagnostic - #106

Merged
mahyarmlk merged 1 commit into
mainfrom
feat/orphaned-flow-diagnostic
Jun 26, 2026
Merged

feat(core): orphaned-flow diagnostic#106
mahyarmlk merged 1 commit into
mainfrom
feat/orphaned-flow-diagnostic

Conversation

@mahyarmlk

Copy link
Copy Markdown
Collaborator

Summary

Implements the orphaned-flow graph diagnostic for inspectScreen.

A flow is "orphaned" when it has one or more steps but none of its steps appear in any surface. This diagnostic helps catch incomplete or disconnected flow definitions during development.

Changes

  • packages/core/src/graph.ts: Added orphaned-flow diagnostic emission in computeDiagnostics with nested flow metadata (flowNodeId)
  • packages/core/src/core.test.ts: Added 9 test cases covering:
    • No flows → no orphaned-flow
    • Empty flow → no orphaned-flow
    • All steps unsurfaced → emits orphaned-flow
    • At least one surfaced step → no orphaned-flow
    • Multiple flows reporting only orphaned ones
    • Nested flow.flowNodeId and flow.flowSemanticNodeId
    • nodeId and semanticNodeId left undefined
    • Deterministic ordering
    • Coexistence with flow-step-not-surfaced
  • .changeset/shy-kids-grow.md: Minor bump for @intent-framework/core

Diagnostic shape

{
  severity: "warning",
  code: "orphaned-flow",
  message: "\"<flow name>\" has no surfaced steps.",
  flow: {
    flowNodeId: "<flow node id>",
    flowSemanticNodeId: "<flow semantic id if available>"
  }
}

Validation

  • pnpm test ✅ (161 passed)
  • pnpm typecheck
  • pnpm build
  • pnpm lint
  • pnpm pack:check
  • pnpm changeset status

@mahyarmlk
mahyarmlk merged commit 57b8bda into main Jun 26, 2026
1 check passed
@mahyarmlk
mahyarmlk deleted the feat/orphaned-flow-diagnostic branch June 26, 2026 15:43
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