Skip to content

fix(lint): check table json inputs that hold bare block references - #10146

Merged
waleedlatif1 merged 4 commits into
stagingfrom
fix/lint-table-check-template-refs
Nov 18, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
fix/lint-table-check-template-refs

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Workflow lint's Table input check JSON-parsed raw field values, so a block reference written outside a JSON string ({"count": <start.count>}, [<start.first>, {...}], or a whole-field <start.row>) failed with Invalid JSON ... Unrecognized token '<' and the check reported "could not complete" — even though the reference resolves to JSON at runtime and the block runs fine
  • Before running the Table block's own param transform, lint now quotes references that sit outside JSON strings (found with the shared findWorkflowReferenceTokens) in its local copy of the params
  • Literal keys are still checked (unknown columns / filter fields still reported), quoted references flow into the existing "requires runtime resolution" notes, and genuinely malformed JSON still reports "could not complete"
  • Unquoted references to string outputs stay covered by the existing unquoted-json-string finding

Type of Change

  • Bug fix

Testing

  • New cases in read-workflow-lint-tables.test.ts: bare refs in row data and filter values, whole-field refs for data/rows, a bare ref inside a rows array, refs inside JSON strings left untouched, malformed JSON with a ref still reported
  • 5 of the new cases fail on the pre-fix code and pass with the fix
  • read-workflow-lint-tables, read-workflow-lint-refs, read-workflow-lint-agent-tools test files: 63/63 pass; biome clean on changed files

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)

Table input checks JSON-parsed raw field values, so a reference written
outside a JSON string (e.g. {"count": <start.count>} or a whole-field
<start.row>), which resolves to valid JSON at runtime, made the whole
check end with an 'Invalid JSON' could-not-complete note. Quote those
references in the lint-local copy before the Table block's own parser
runs, so literal keys are still checked and the references reach the
existing runtime-resolution notes.
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 18, 2026 5:02am UTC

Request Review

@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 2 files

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

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The changes appear safe to merge.

Summary

Table lint now defers inputs with more than six bare references instead of stopping checks on unrelated literal inputs.

  • Table lint checks literal fields around bare workflow references.

Reviews (4) · Last reviewed commit: "fix(lint): defer reference fields past t..." · Reviewed by Greptile

…shape checks

A quoted reference can still fail the Table block's shape validation, for example a filter in-list or a whole-field filter. Retry the transform without those runtime-only fields and note them as runtime-resolved, so the remaining literal inputs are still checked. Filter cases now run against the registered TableV2Block.
@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 18, 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 2 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

Try string and one-item-list placeholders per reference instead of dropping any field that holds one, so in-list references are still checked and an invalid literal condition still reports. Only a field that is a single whole reference is deferred to runtime.
@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 18, 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 2 files

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

Turn on auto-fix | Re-trigger cubic

Above the search bound an all-string or all-list fallback cannot tell a literal error from a reference type mismatch, so leave the reference-bearing fields out and keep checking the other inputs instead of ending the table check.
@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 18, 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 2 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 fe15c69 into staging Nov 18, 2026
81 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/lint-table-check-template-refs branch November 18, 2026 05:13

This branch was previously deployed

1 inactive deployment
Preview — 83b209d4 Deployed Nov 18, 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