You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fb38ffb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(lint)!: refuse a time-relative start whose objectName is not the swept object
A time-relative run binds a row of config.timeRelative.object and nothing
else, while the expression checks type the flow's conditions against the
start node's config.objectName. A start naming two objects is now refused
with flow-time-relative-object-mismatch, at config.objectName, naming both
objects and the fix. The explanatory warning on a sweep of another object
names the new rule.
Claude-Session: https://claude.ai/code/session_01Utp6CXGZhZVasbhiGEdpZk
Co-authored-by: Claude <noreply@anthropic.com>
fix(lint)!: a time-relative flow whose start node names, in `config.objectName`, another object than the one it sweeps (`config.timeRelative.object`) is refused with `flow-time-relative-object-mismatch`: each run binds a row of the swept object, while the start's `objectName` is what its conditions are checked against (#30283)
6
+
7
+
Clause-②: yes (narrowing) — a new published readiness rule id, `flow-time-relative-object-mismatch`, graded `error`: the author-time gate (`os build`, `os validate`, the package publish and the flow publish door) refuses a time-relative start whose `config.objectName` is set and is not `config.timeRelative.object`, which it passed with no readiness verdict before.
8
+
Metadata-protocol: narrowed
9
+
Skills-docs: none — `skills/**` and `content/docs/**` teach the time-relative sweep with `timeRelative.object` alone and no `objectName` on its start node, which this rule accepts; the MCP skill text keeps its `sweepObject` advice for `validate_expression`, whose expression verdict this change does not move.
10
+
11
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped: the flow schema still admits objectName beside a timeRelative descriptor, and what narrows is the publish door's accept set for one combination of two existing keys. No rewrite keeps what the author meant: the start names two objects, and whether the author meant to sweep the swept object (drop objectName) or the named one (change timeRelative.object) is a judgement no ledger entry can derive. The other categories are closed on facts: the bumped package publishes (not unpublished); no ADR-0087 id covers this combination (flow-record-read-and-decision-type-mismatch-refused prescribes a rewrite of a condition, not of the start node) and this diff adds none (not registered, not already-registered); no published export is removed or retyped (not runtime-export-retired, runtime-interface-only or type-surface-only). -->
12
+
13
+
**BREAKING** accept-set narrowing at the author-time flow readiness gate, served by `os build`, `os validate`, `POST /api/v1/packages/:id/publish-drafts` and the flow publish door.
14
+
15
+
-**Before.** A time-relative start could name `config.objectName: 'A'` and sweep `config.timeRelative.object: 'B'`. The run binds only `B`: the engine's binding resolver reads `timeRelative.object` first, and the trigger launches each run with a `B` row as `record` and `B` as the run's object. The expression checks typed the flow's conditions against `A` all the same. Measured both ways: `record.amount > 10`, where only `A` declares `amount`, passed every check and failed every run (`No such key: amount`); `record.priority > 1`, a correct read of a `B` field, was refused as `unknown field priority on A`.
16
+
-**Now.** That start is refused at `config.objectName`, naming both objects and the fix. A start whose `objectName` equals `timeRelative.object`, or that names none, is not reported; neither is a start whose `triggerType` routes the flow to the record-change trigger (a `record-` token, or an array holding one), which binds `objectName` and never sweeps. The runtime publish gate judges only the flow being written, so a stored flow that names two objects keeps being served; its own next publish is refused.
17
+
-**The `config.objectName` warning on a sweep of another object** (served where a condition's type verdict was softened to a warning) now names `flow-time-relative-object-mismatch` as the verdict that asks for the same fix.
18
+
19
+
**FROM → TO.** In a time-relative flow sweeping `crm_task`: `config: { objectName: 'crm_opportunity', timeRelative: { object: 'crm_task', … } }` → `config: { timeRelative: { object: 'crm_task', … } }` (the sweep never reads `objectName`, so the run is unchanged), or `objectName: 'crm_task'`. Then fix any condition the expression checks now refuse against `crm_task`. If the flow was meant to sweep `crm_opportunity`, set `timeRelative.object: 'crm_opportunity'` (and its `dateField`) instead.
for(constfactof['No part of the run reads','No such key','refused as an unknown field','nothing the run does changes','that trigger binds `objectName`','what is refused is its own publish']){
1915
+
expect(text,fact).toContain(fact);
1916
+
}
1917
+
});
1918
+
});
1919
+
1788
1920
describe('[#30009] api trigger readiness reads the hook\'s one verifier (config.signature)',()=>{
0 commit comments