Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,14 @@ describe('standalone table diagnostics against the actual Table block', () => {
)
})

it('reports a filter group made only of references as not checked', async () => {
setGraph(block('query', { filter: '{"all":[<start.a>,<start.b>]}' }))
const result = await lint()
expect(result.notes).toContain(
'Table filter in block "query" is not a static query object; its column references were not checked.'
)
})

it('does not treat dynamic field names as missing columns', async () => {
setGraph(block('query', { sort: '{"<start.column>":"asc"}' }))
const result = await lint()
Expand Down
8 changes: 5 additions & 3 deletions apps/sim/lib/workflows/application/read-workflow-lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,9 @@ function normalizeTableInputs(
* with the same text is never mistaken for one. A quoted reference fits row values and most
* filter values; the value of an `in`/`nin` condition must be a list, so it becomes a one-item
* list, and a condition or group made only of references has no literal part, so it is left out
* of an `all`/`any` group that keeps a literal member. `runtimeOnly` marks a field whose whole
* value is such a reference or group.
* of an `all`/`any` group that keeps a literal member. A field whose whole value is such a
* reference or group has nothing to check before runtime, so its text becomes one JSON string,
* the same shape a whole-field reference takes, and `runtimeOnly` marks it.
*/
function withReferencePlaceholders(json: string): { value: string; runtimeOnly: boolean } {
const nonce = generateShortId()
Expand Down Expand Up @@ -340,7 +341,8 @@ function withReferencePlaceholders(json: string): { value: string; runtimeOnly:
})
)
}
return { value: JSON.stringify(adapt(parsed)), runtimeOnly: isDynamic(parsed) }
if (isDynamic(parsed)) return { value: JSON.stringify(json), runtimeOnly: true }

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.

P2 Literal row keys go unchecked. This helper also receives row data. For insert_row with data: '{"all":[<start.values>]}', isDynamic returns true even though all is a literal column name. The new branch turns the object into a string, so inspectRow reports that the row is not static instead of checking whether all exists. Previously it reported the missing column. Limit group-only deferral to filter inputs and keep row objects intact; add a case with just one all or any key.

@cubic-dev-ai cubic-dev-ai Bot Nov 18, 2026 •

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.

P2: This misclassifies valid row data for a column named all or any as a runtime-only predicate group. Preserve the adapted object for row fields, or apply this whole-value string conversion only to filter/sort inputs, so row keys remain linted.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/sim/lib/workflows/application/read-workflow-lint.ts, line 344:

<comment>This misclassifies valid row data for a column named `all` or `any` as a runtime-only predicate group. Preserve the adapted object for row fields, or apply this whole-value string conversion only to filter/sort inputs, so row keys remain linted.</comment>

<file context>
@@ -340,7 +341,8 @@ function withReferencePlaceholders(json: string): { value: string; runtimeOnly:
     )
   }
-  return { value: JSON.stringify(adapt(parsed)), runtimeOnly: isDynamic(parsed) }
+  if (isDynamic(parsed)) return { value: JSON.stringify(json), runtimeOnly: true }
+  return { value: JSON.stringify(adapt(parsed)), runtimeOnly: false }
 }
</file context>
Fix with cubic

return { value: JSON.stringify(adapt(parsed)), runtimeOnly: false }
}

function replaceBareReferences(json: string, placeholder: (reference: string) => string): string {
Expand Down
Loading