Uh oh!
There was an error while loading. Please reload this page.
test(lint,service-automation): replace out-of-grammar record-created fixture token with record-after-create - #6636
Merged
os-project-manager merged 2 commits intoAug 8, 2026
Conversation
…` fixture token with `record-after-create` 12 test fixtures spelled a flow start node's `triggerType` as `record-created`, which is outside the closed grammar the record-change trigger maps: /^record-(before|after)-(create|insert|update|delete|write)$/ (triggerTypeToHookEvents, packages/triggers/trigger-record-change) The token is missing its phase segment, so it maps to ZERO hook events — the exact shape `flow-trigger-unknown-event` reports, and an `error` since #5762. Nothing is red today: all three test files call their own rule directly (`validateFlowTemplatePaths` / `validateReferenceIntegrity` / the runtime expand integration) and none routes through `validateFlowTriggerReadiness`, which is not a `REFERENCE_INTEGRITY_RULES` member. This is a corpus fix, not a defect fix: fixtures are read as examples, and a token the platform's own lint calls "never fires" appearing 12 times in-repo teaches the wrong spelling to anyone (and any AI) reading the tests. `triggerType` is inert at all 12 sites — every fixture flow declares `type: 'record_change'`, so `isRecordTriggered` returns from its first branch without reading the token, and no assertion in any of the three files names `triggerType`. No assertion changes. Refs #5762, #3427. Fixes#5957 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8q5J1MQyocgtNspb15fSn
…w-trigger-fixture-tokens
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
os-project-manager
marked this pull request as ready for review
August 8, 2026 07:52
os-project-manager
enabled auto-merge
August 8, 2026 07:52
Uh oh!
There was an error while loading. Please reload this page.
os-project-manager
deleted the
claude/issue-5957-flow-trigger-fixture-tokens
branch
August 8, 2026 08:19
This was referenced Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#5957
12 test fixtures spelled a flow start node's
triggerTypeasrecord-created, a token that is outside the closed grammar the record-change trigger maps. Replaced all 12 with the in-grammarrecord-after-create. No assertion changed.Why
record-createdis wrongtriggerTypeToHookEvents(packages/triggers/trigger-record-change/src/record-change-trigger.ts) is the canonical mapper, and its grammar is closed:record-createdhas no phase segment, so it matches nothing and maps to zero hook events — the flow binds to the record-change trigger and then never fires, silently. That is exactly the shapeflow-trigger-unknown-eventreports, and since #5762 that rule is an error.Verified against the source rather than the issue body's line numbers (the card was filed before several same-day merges):
packages/triggers/trigger-record-change/src/record-change-trigger.ts,triggerTypeToHookEventspackages/lint/src/validate-flow-trigger-readiness.ts,VALID_RECORD_TRIGGERWhy nothing was red before this PR
All three files call their own rule directly and none routes through
validateFlowTriggerReadiness:packages/lint/src/validate-flow-template-paths.test.tsvalidateFlowTemplatePathspackages/lint/src/reference-integrity-suite.test.tsREFERENCE_INTEGRITY_RULESpackages/services/service-automation/src/record-lookup-expand.integration.test.tsautomation.executeon a bootedLiteKernelvalidateFlowTriggerReadinessis not aREFERENCE_INTEGRITY_RULESmember (re-confirmed on this branch), so #5762's severity upgrade never reached these fixtures.So this is a corpus fix, not a defect fix. Fixtures are read as examples: a token the platform's own lint calls "never fires", appearing 12 times in-repo, teaches the wrong spelling to every human and AI author reading the tests — which cancels out the reason
flow-trigger-unknown-eventexists.triggerTypeis inert at all 12 sites (verified per-site)Every fixture flow declares
type: 'record_change', and the consuming predicate short-circuits on that before it ever reads the token:git grepover all three files finds no assertion namingtriggerType, and the integration test registers no trigger at all — it drivesautomation.executedirectly. Hence no assertion needed to follow the replacement.Evidence
A green suite is not evidence on its own here — these fixtures are inert by hypothesis, so green was the expected outcome either way. Three independent measurements instead:
1. Token census (the deliverable itself),
git grepover the tracked treetriggerType: 'record-created'(out of grammar)triggerType: 'record-after-create'(in grammar)Repo-wide,
record-creatednow appears 0 times in any form.2. Reverse verification — direction predicted before running. Prediction: the platform's own rule reports the error for the old token and not the new one, while an unrelated control finding stays put for both (if the control vanished too, the probe had stopped reading the stack rather than the rule changing its verdict). Both tokens fed to the live rule on this branch:
Observed exactly as predicted: the error is gone, the control survives, and the mapper goes from zero hook events to
afterInsert.3. Suites still green (expected, and now meaningful because 1 and 2 show the right thing changed):
Gates
Run one by one from
.github/workflows/lint.yml(not from memory), against the committed tree withorigin/mainmerged in:pnpm lint,check:slot-lookup,check:query-options-erasure,check:verify-stand-in,check:nul-bytes,check:doc-authoring,check:docs-audit-scope,check:role-word,check:quick-reference-counts,check:adr-anchors,check:org-identifier,check:authz-resolver,check:service-providers,check:route-envelope,check:error-code-casing,check:wildcard-fallthrough,check:meta-type-normalized,check:init-service-contract,check:durability-log-level,check:startup-registry-verdict,check:objectui-changeset,check:release-notes,check:release-body,check:node-version,check:workflow-status-functions,check:shard-attestation,check:published-files,check:engine-double-contract,check:resume-authority-declared,check:merge-driver,check:spec-parsed-alias)turbo run build(70 tasks) andturbo run typecheck(120 tasks)packages/lintis one of the packages whose test-exclusion behaviour makes local-green / CI-red possible, which is why the whole list was run rather than just the package's own tests.skip-changesetNo changeset. This PR touches only
*.test.tsfixture string literals — no source file, no published artifact, no authorable surface, nothing a user can observe or depend on. There is no release note to write, so a changeset would be a row about nothing. Label applied on the PR.Explicitly out of scope
The non-
record--prefixed family named in the card —on_create(x2),on_update(x1),onCreate(x1) — is not touched here, per the ruling on #5957. Those never matchflow-trigger-unknown-eventat all: the engine treats any non-record-token as "no record trigger" and silently degrades the flow to manual. Whether that shape deserves a diagnostic is a separate lint-capability judgement, so it is filed as its own unassignedfindingissue rather than folded in. No lint rule is added in this PR.Generated by Claude Code