Skip to content

feat(lint): widen flow-trigger-unroutable to the omission shape (#7215) - #7273

Merged
os-project-manager merged 1 commit into
mainfrom
claude/issue-7215-widen-flow-trigger-unroutable
Aug 10, 2026
Merged

feat(lint): widen flow-trigger-unroutable to the omission shape (#7215)#7273
os-project-manager merged 1 commit into
mainfrom
claude/issue-7215-widen-flow-trigger-unroutable

Conversation

@os-project-manager

Copy link
Copy Markdown
Collaborator

Fixes #7215

What changed

flow-trigger-unroutable (#6637) previously fired only on the contradiction shape:
config.triggerType present but the engine routes it to no trigger (triggerType: 'onCreate').

Per #7215's maintainer-delegated ruling (disposition 1, "take it now" — see the RULED comment on
that issue), this PR widens the same rule to also fire on the omission shape: type: 'record_change' with no triggerType key at all. Both shapes fall through
AutomationEngine.resolveTriggerBinding's same branch chain to undefined, and both are equally
invisible to getTriggerBindingAudit (which skips a flow with no resolved binding as "manual —
nothing to bind"). They are two spellings of one defect, so they share the same rule id and the
same error severity rather than getting a new id.

The rule's other exclusion is unchanged: a record_change flow that declares something the engine
does route (config.schedule, triggerType: 'api', a config.timeRelative object) still binds
and fires — on the wrong trigger's terms — and is a different defect this rule does not speak to.

Corpus count (measured before landing, per the dispatch's stop condition)

Ran the widened criterion over every type: 'record_change' flow definition found by content
search across examples/, apps/, and packages/ (excluding test fixtures and the CLI's
scaffold-string template, which produces a different, non-record_change shape). The tree has
exactly two real record_change flows:

Both already declare an explicit, valid triggerType. Verified programmatically (not just by
grep) by importing both flow modules and running validateFlowTriggerReadiness against them
directly:

TOTAL_OMISSION_INSTANCES=0

Omission instances found: 0. The widening ships green on the whole tree — no baseline entry,
no example-app churn, no new vocabulary.

Test changes

validate-flow-trigger-readiness.test.ts contained a scope-boundary pin
(an ABSENT triggerType — dead too, deliberately deferred (#6637 corpus)) whose own comment said
widening "is a deliberate edit that has to delete this test, not a side effect." That test is
deleted, per #7215, and replaced with:

  • a test that the omission shape now fires (FLOW_TRIGGER_UNROUTABLE, error, same path shape as
    the contradiction case),
  • a test that the rule id/severity/path are identical whether the token is wrong or missing,
  • a test that an omission with a routed sibling key (config.schedule / config.timeRelative)
    still stays silent — the "mis-bound, not un-bound" exclusion applies to the omission shape too,
  • a test that non-record_change flow types (autolaunched, screen, schedule, api, no
    type at all) stay silent even with triggerType absent — enumerated from the code's exact
    flow.type === 'record_change' guard, not guessed.

All of the contradiction shape's pre-existing tests are untouched and still pass.

Provenance comments were updated in both files (the rule's own scope-boundary comment above the
1f block, and the exported FLOW_TRIGGER_UNROUTABLE JSDoc) to record the widening's history —
kept in historical form per the PR #7172 discipline, with the forward-pointer to "the still-open
widening question" now resolved to #7215 rather than deleted outright.

Reverse verification

Temporarily restored the pre-widening rule file (git show origin/main:… >, no git stash) and
re-ran the new tests against it: all 4 new omission-shape tests went red, while the other 61
pre-existing tests (contradiction shape, severity map, etc.) stayed green — confirming the new
tests are non-vacuous and the existing scope is untouched. Restored the widened file and re-ran;
back to 65/65 green.

Verification

pnpm --filter '@objectstack/lint^...' build          # deps (spec, formula) — OK
cd packages/lint && npx vitest run                    # 69 files, 1808 passed
cd packages/lint && npx tsc --noEmit                   # clean
cd packages/cli && npx vitest run test/authoring-rule-command-parity.test.ts test/doctor-refs.test.ts
                                                        # 2 files, 19 passed
node scripts/check-nul-bytes.mjs                       # OK

Changeset

Added .changeset/lint-flow-trigger-unroutable-omission.md (@objectstack/lint: minor) — a
functional widening of a published lint rule's gating criterion, precedent PR #7214.


Generated by Claude Code

`flow-trigger-unroutable` (#6637) fired only on the contradiction shape:
`config.triggerType` present but the engine routes it nowhere. Per #7215
(maintainer-ruled, disposition 1), it now also fires on the omission
shape: `type: 'record_change'` with no `triggerType` key at all. Both
shapes fall through `resolveTriggerBinding` the same way and are equally
dead at runtime, so they share the id and severity rather than getting a
new one.

Corpus-verified before landing: the only two real `type: 'record_change'`
flows in the tree (examples/app-todo's TaskCompletionFlow, repaired by
#7039, and examples/app-showcase's UrgentTaskAlertFlow) both already
declare an explicit triggerType — zero omission instances, so the
widening ships green with no baseline churn.

Deletes the scope-boundary pin test in
validate-flow-trigger-readiness.test.ts per its own instruction that
widening "is a deliberate edit that has to delete this test, not a side
effect" — replaced with tests for the omission shape firing, staying
silent on non-record_change flow types, and staying silent when a routed
sibling key is present.

Claude-Session: https://claude.ai/code/session_01F8q5J1MQyocgtNspb15fSn

Co-authored-by: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Aug 10, 2026 4:21am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/automation/hook-bodies.mdx (via @objectstack/lint)
  • content/docs/permissions/authorization.mdx (via @objectstack/lint)

1 release-owned page(s) also reference the affected code. These are read-only:

  • content/docs/releases/v17.mdx (via @objectstack/lint)

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

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.

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Aug 10, 2026
@os-project-manager
os-project-manager marked this pull request as ready for review August 10, 2026 05:09
@os-project-manager
os-project-manager added this pull request to the merge queue Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

PM 验收:ACCEPT。 门禁按名点名复读(head 1bb3cd8fa):25 项全部 success/skipped,零 failure(ESLint 04:25:55Z、TypeScript Type Check 04:37:03Z)。已 draft:false + auto-merge 入队。

⚠️ 验收方式说明(据实记录):本单的 dev agent 在工作进程重启中丢失,结构化报告从未送达。承重项因此由 PM 直接对 diff 复核,而非采信报告 —— 下列每条都是我自己在 origin/main...1bb3cd8fa 上读出来的:

合入后本单收卡、#7215pm:dispatched


Generated by Claude Code

Merged via the queue into main with commit 4bda5f8 Aug 10, 2026
26 checks passed
@os-project-manager
os-project-manager deleted the claude/issue-7215-widen-flow-trigger-unroutable branch August 10, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[decision] Should flow-trigger-unroutable widen to the absent-triggerType (omission) shape — #7041 item 2, decide together with #6041

2 participants