Skip to content

improvement(workflows): lint the manual-run entry check and surface lint findings in apply warnings - #9638

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/lint-manual-run-entry
Nov 3, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
improvement/lint-manual-run-entry

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Extract the editor Run button's entry check (no runnable trigger, more than one API trigger, selected trigger with no outgoing edge) from use-workflow-execution into one pure resolveManualRunEntry in lib/workflows/triggers/manual-run.ts. The hook calls it with the same messages, order, and execution teardown, so the Run button behaves the same
  • Workflow lint reports that result as lint.manualRunIssue (reason, message, trigger block ref, or null). It is advisory like every lint finding and never blocks a write or deploy. A webhook or schedule workflow that is wired correctly gets no finding, because a manual run accepts it with a mock payload. A workflow only a chat trigger can start is exempt, and an empty graph keeps its existing note
  • hasWorkflowLintIssues / formatWorkflowLintMessage include the new finding. That means sim workflows lint and deploy lint see it too
  • POST /api/v2/workflows/{id}/operations (committed and dry run) now adds the formatWorkflowLintMessage summary to warnings[] whenever lint has findings. An agent that projects the response down to warnings no longer loses the findings
  • Lower the two selectBestTrigger grouping logs from info to debug, since lint now runs them on graph writes

Consumers of the apply result

  • Only the v2 operations route uses applyWorkflowOperations; its presenter passes warnings through as before. The CLI prints the response as it comes. No UI reads this result
  • Duplication: the summary is one string, built only from lint, and it never matches the normalization warnings already in the array. The result never carries it twice
  • Size: one line per finding, built from the same findings lint already returns. Growth is bounded by the graph and scales with the existing lint payload
  • PUT /state and deploy still return findings only under lint (their warnings keep their current meaning)

Type of Change

  • Improvement

Testing

  • lint-report.test.ts: new manual-run cases. Reported: unconnected trigger, no trigger, disabled trigger, two API triggers. Not reported: connected start/webhook/schedule, legacy starter, chat-only, empty graph. All failed with the fix reverted. Separately, removing only the chat exemption turns the chat-only case red
  • apply-workflow-operations.test.ts: the lint summary appears in warnings on commit and on dry run, and nothing is added when lint is clean. Red with the fix reverted
  • Ran the targeted suites (editing, triggers, application, v2 contracts and routes, agent-cli lint), bun run lint, check:openapi, check:cli-api, check:mcp-operations, check:boundaries, check:client-boundary, check:utils, check:comment-hygiene, check:test-patterns, check:explicit-any, check:file-names, check:source-conventions, check:import-specifiers, check:api-validation. CI is the gate for the rest

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 3, 2026 9:54pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Shares the editor’s manual-run entry check with workflow lint and adds lint summaries to apply warnings.

  • Workflow lint reports when the editor’s Run button would refuse to start.
  • Workflow operation responses include lint findings in their warnings.
  • Trigger grouping and selection messages now appear at debug level.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Editor[Editor Run button] --> Entry[resolveManualRunEntry]
  Lint[Workflow lint] --> Entry
  Entry --> Result[Selected trigger or entry issue]
  Result --> Report[Lint report]
  Report --> API[API lint response]
  Report --> Summary[Apply warnings summary]
Loading

Reviews (3) · Last reviewed commit: "docs(workflows): make the apply-operatio..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 19 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 19 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/docs/openapi-v2-workflows.json Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 19 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit ecd9263 into staging Nov 3, 2026
81 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/lint-manual-run-entry branch November 3, 2026 22:11

This branch was successfully deployed

1 active deployment
Preview — a942c669 Deployed Nov 3, 2026 by vercel[bot]
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