Skip to content

feat(cli): two flow anti-pattern lints — date-equality filters (#1874) + phantom aggregation (#1870) - #1950

Merged
os-zhuang merged 2 commits into
mainfrom
feat/lint-date-equality-filter
Jun 16, 2026
Merged

feat(cli): two flow anti-pattern lints — date-equality filters (#1874) + phantom aggregation (#1870)#1950
os-zhuang merged 2 commits into
mainfrom
feat/lint-date-equality-filter

Conversation

@os-zhuang

@os-zhuangos-zhuang commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Platform fixes#2 & #3 of the #1928/#1874/#1870 follow-up. Two new advisory build-time lints (warnings, never fail the build):

1. flow-date-equality-filter (#1874)

A get_record/query filter that binds a field directly, or via $eq/$in, to a time-function value (daysFromNow/today/now/…). A Field.date stores a time component, so an exact match against a re-computed timestamp silently returns nothing — exactly what the templates discrete-tier alerts hit (renewal_alert / evidence_expiring / document_expiring_soon). Range ops ($gte/$lt day windows) are the correct shape and are exempt. (Complements the existing trigger-condition equality lint.)

2. flow-phantom-aggregation (#1870)

A node config key naming a capability the automation engine doesn't have (aggregations/aggregate/groupBy/rollup/having). There is no aggregate node, so the key is silently ignored and the node computes nothing (templates publication_rollup). Points the author to Field.summary (cross-object rollup) / Field.formula (per-record).

Tests

36/36 lint tests incl. false-positive guards (one-day windows, $or multi-tier, plain < today() ranges, non-time equality, ordinary script/function nodes). tsc clean.

🤖 Generated with Claude Code

…1874)
Extends the flow anti-pattern lint from trigger CONDITIONS to query FILTERS.
A scheduled flow whose get_record filter binds a field directly / via $eq / $in
to a time-function value (daysFromNow/today/now/...) silently matches nothing,
because a Field.date stores a time component and an exact match against a
re-computed timestamp never holds — the bug the templates discrete-tier alerts
hit. Range ops ($gte/$lt day windows) are the correct shape and are exempt.
New rule flow-date-equality-filter; advisory warning, never fails the build.
10 tests incl. false-positive guards (windows, $or, plain ranges, non-time eq).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Jun 16, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJun 16, 2026 7:20am

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests tooling size/m and removed documentation Improvements or additions to documentation tests tooling labels Jun 16, 2026
@github-actions

github-actionsBot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/cli.

15 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/cloud-artifact-api.mdx(via packages/cli)
  • content/docs/concepts/implementation-status.mdx(via @objectstack/cli)
  • content/docs/concepts/packages.mdx(via @objectstack/cli)
  • content/docs/getting-started/cli.mdx(via @objectstack/cli)
  • content/docs/getting-started/quick-start.mdx(via @objectstack/cli)
  • content/docs/guides/authentication.mdx(via @objectstack/cli)
  • content/docs/guides/client-sdk.mdx(via @objectstack/cli)
  • content/docs/guides/hook-bodies.mdx(via packages/cli)
  • content/docs/guides/packages.mdx(via @objectstack/cli)
  • content/docs/guides/project-scoping.mdx(via @objectstack/cli)
  • content/docs/guides/runtime-services/data-service.mdx(via packages/cli)
  • content/docs/guides/runtime-services/index.mdx(via packages/cli)
  • content/docs/guides/skills.mdx(via packages/cli)
  • content/docs/protocol/objectos/plugin-spec.mdx(via @objectstack/cli)
  • content/docs/protocol/objectos/realtime-protocol.mdx(via @objectstack/cli)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

A node-config key naming a capability the automation engine lacks
(aggregations/aggregate/groupBy/rollup/having) is silently ignored at runtime —
the node runs and computes nothing (templates publication_rollup). Flag it and
point the author to the data-layer equivalent: Field.summary for a cross-object
rollup, Field.formula for a per-record computed value.
New rule flow-phantom-aggregation; advisory warning. 3 tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests tooling labels Jun 16, 2026
@os-zhuangos-zhuang changed the title feat(cli): lint date-equality vs time values in flow query filters (#1874)feat(cli): two flow anti-pattern lints — date-equality filters (#1874) + phantom aggregation (#1870)Jun 16, 2026
@os-zhuang
os-zhuang merged commit 37f6bd8 into mainJun 16, 2026
14 checks passed
@os-zhuang
os-zhuang deleted the feat/lint-date-equality-filter branch June 16, 2026 07:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

1 participant

@os-zhuang