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
core(lint): TMP012, TMP013, TMP014 move into core as OPS012, OPS013, OPS014 #2122
Three post-synth checks in lexicons/temporal/src/lint/post-synth/ are about the Op model and nothing else: tmp012-activity-contract.ts (a step's args satisfy the registered activity contract), tmp013-step-output-ref.ts (a stepOutput reference points at an earlier step in scope), tmp014-converge-rule-refusals.ts (a ConvergeOp rule table is honest about what it will do; the converging-lifecycle guide documents its refusals). They run only when the temporal lexicon is configured, so a project on the local runtime never sees them today.
Move them to packages/core/src/lint/rules/op/ as ops012-activity-contract.ts, ops013-step-output-ref.ts, ops014-converge-rule-refusals.ts, with their tests and fixtures, registered in core's built-in rule set so they fire on every project that declares an op. Rule ids change from TMP to OPS; keep the messages. The rule pages under docs/src/content/docs/lint-rules/ gain the three, generated the way the other core rules are, and the converging-lifecycle guide's TMP014 references become OPS014. TMP001, TMP002, TMP010, TMP011 and TMP020 stay in the lexicon and die with it in #2116.
The checks read OpConfig entities from the build; after sub-issue 2 those carry entity type Chant::Op. Check the entity-type string each rule matches on.
Runs in parallel with sub-issues 1, 2, 3 and 5.
Acceptance
OPS012, OPS013, OPS014 exist under packages/core/src/lint/rules/op/ with the ported tests passing.
chant lint on a project with no lexicons configured fires OPS013 on a fixture with a dangling stepOutput reference.
chant build on a ConvergeOp fixture with a destructive gated rule fails with the OPS014 refusal.
The three rule pages are generated and linked from the lint-rules index; docs/src/content/docs/guide/converging-lifecycle.mdx references OPS014.
lexicons/temporal/src/lint/post-synth/index.ts no longer registers TMP012, TMP013, TMP014.
Repo-wide typecheck, npm test, and the docs prose ratchet pass.
Activity contracts for OPS012/OPS013.lexicons/temporal/src/op/activity-contracts.ts stays in the temporal lexicon unchanged — op-ir.ts and converge-op.ts still read it directly, and moving it wholesale is #2117's job (it travels with the activities). OPS012/OPS013 in core needed some registered contracts to have anything real to validate (an empty map makes OPS012 a no-op and only exercises OPS013's purely-structural half). I added packages/core/src/lint/rules/op/activity-contracts.ts, a small hand-duplicated subset (lifecycleDiff, shellCmd, httpCheck — just what the ported tests exercise) with a doc comment flagging it for #2117 to fold into whatever it moves rather than leave two copies. The structural half of OPS013 (unknown step id, later-phase reference) needs no contract at all, which is what makes the "OPS013 fires with no lexicons configured" acceptance criterion work regardless.
chant lint needed new plumbing, not just a check move. OPS012-014 previously only ran inside chant build's post-synth pass (built from a full serialized build result). Acceptance criterion 2 asks for chant lint to fire OPS013 too. I added a scoped Op-discovery pass in packages/core/src/cli/commands/lint.ts (runOpCheckDiagnostics) that imports every *.op.ts file already found by the existing downward file scan and runs coreOpChecks() over them directly — deliberately not reusing ../../op/discover.ts's discoverOps, which walks up to the nearest chant.config.* (or the git root, absent one). That upward walk is correct for chant run/chant build (one whole project) but would make chant lint <path> on a fixture with no config above it scan every *.op.ts file in this whole monorepo. Also wired the same coreOpChecks() into chant build (unscoped, alongside coreReceiptChecks/coreOutputChecks/coreKnowledgeChecks) — that's acceptance criterion 3's path.
Left as-is (out of this issue's scope, flagged for awareness): several files outside temporal's lint/post-synth/ still mention TMP012/TMP013/TMP014 by name in prose comments describing design rationale — lexicons/temporal/src/op/{op-ir,serializer,converge-op,activities/converge}.ts and tests, lexicons/k8s/src/composites/operator-stack.ts (+ its test), and lexicons/terraform/examples/apply-gated/chant.config.ts. The temporal-lexicon ones die with the lexicon in #2116; the k8s and terraform ones don't, and now reference a rule id that no longer exists (the terraform example's comment also describes a "structural gap in cross-lexicon contract validation" that OPS013's structural half now partly closes). Didn't touch these — renaming references across other lexicons felt like real scope creep for a lint-rule port, but a follow-up should sweep them. I did update the core-owned doc comments that referenced TMP012-014 by name (packages/core/src/op/{activity-contract,converge-rule,step-output-ref}.ts, packages/core/src/lifecycle/symptoms.ts) since those are the checks' actual new home.
OPS014's message. Per the sibling-issue note (#2119 changed the local executor so a gated op ends gated rather than being refused), I re-argued the destructive-dispatch refusal on its real ground — a converge tick is unattended, so a destructive dispatch needs a human's approval before it's attempted, not a gate consulted after the tick already committed to it — rather than the now-false "the local executor refuses any gated op outright." Updated the check's message/doc comment and the converging-lifecycle guide's matching sentences.
Activity
lex00 commentedon Sep 6, 2026
Implementation notes / deviations worth recording:
Activity contracts for OPS012/OPS013.
lexicons/temporal/src/op/activity-contracts.tsstays in the temporal lexicon unchanged —op-ir.tsandconverge-op.tsstill read it directly, and moving it wholesale is #2117's job (it travels with the activities). OPS012/OPS013 in core needed some registered contracts to have anything real to validate (an empty map makes OPS012 a no-op and only exercises OPS013's purely-structural half). I addedpackages/core/src/lint/rules/op/activity-contracts.ts, a small hand-duplicated subset (lifecycleDiff,shellCmd,httpCheck— just what the ported tests exercise) with a doc comment flagging it for #2117 to fold into whatever it moves rather than leave two copies. The structural half of OPS013 (unknown step id, later-phase reference) needs no contract at all, which is what makes the "OPS013 fires with no lexicons configured" acceptance criterion work regardless.chant lintneeded new plumbing, not just a check move. OPS012-014 previously only ran insidechant build's post-synth pass (built from a full serialized build result). Acceptance criterion 2 asks forchant lintto fire OPS013 too. I added a scoped Op-discovery pass inpackages/core/src/cli/commands/lint.ts(runOpCheckDiagnostics) that imports every*.op.tsfile already found by the existing downward file scan and runscoreOpChecks()over them directly — deliberately not reusing../../op/discover.ts'sdiscoverOps, which walks up to the nearestchant.config.*(or the git root, absent one). That upward walk is correct forchant run/chant build(one whole project) but would makechant lint <path>on a fixture with no config above it scan every*.op.tsfile in this whole monorepo. Also wired the samecoreOpChecks()intochant build(unscoped, alongsidecoreReceiptChecks/coreOutputChecks/coreKnowledgeChecks) — that's acceptance criterion 3's path.Left as-is (out of this issue's scope, flagged for awareness): several files outside temporal's
lint/post-synth/still mentionTMP012/TMP013/TMP014by name in prose comments describing design rationale —lexicons/temporal/src/op/{op-ir,serializer,converge-op,activities/converge}.tsand tests,lexicons/k8s/src/composites/operator-stack.ts(+ its test), andlexicons/terraform/examples/apply-gated/chant.config.ts. The temporal-lexicon ones die with the lexicon in #2116; the k8s and terraform ones don't, and now reference a rule id that no longer exists (the terraform example's comment also describes a "structural gap in cross-lexicon contract validation" that OPS013's structural half now partly closes). Didn't touch these — renaming references across other lexicons felt like real scope creep for a lint-rule port, but a follow-up should sweep them. I did update the core-owned doc comments that referenced TMP012-014 by name (packages/core/src/op/{activity-contract,converge-rule,step-output-ref}.ts,packages/core/src/lifecycle/symptoms.ts) since those are the checks' actual new home.OPS014's message. Per the sibling-issue note (#2119 changed the local executor so a gated op ends
gatedrather than being refused), I re-argued the destructive-dispatch refusal on its real ground — a converge tick is unattended, so a destructive dispatch needs a human's approval before it's attempted, not a gate consulted after the tick already committed to it — rather than the now-false "the local executor refuses any gated op outright." Updated the check's message/doc comment and the converging-lifecycle guide's matching sentences.refactor(lint): move TMP012/TMP013/TMP014 into core as OPS012/OPS013/…
fixup: rebase #2122 onto the #2117-#2120 stack
refactor(lint): move TMP012/TMP013/TMP014 into core as OPS012/OPS013/…
fixup: rebase #2122 onto the #2117-#2120 stack
refactor(lint): move TMP012/TMP013/TMP014 into core as OPS012/OPS013/…
fixup: rebase #2122 onto the #2117-#2120 stack
refactor(lint): move TMP012/TMP013/TMP014 into core as OPS012/OPS013/…
fixup: rebase #2122 onto the #2117-#2120 stack
refactor(lint): move TMP012/TMP013/TMP014 into core as OPS012/OPS013/…
fixup: rebase #2122 onto the #2117-#2120 stack
refactor(lint): move TMP012/TMP013/TMP014 into core as OPS012/OPS013/…
fixup: rebase #2122 onto the #2117-#2120 stack
feat(op): a lexicon contributes activity contracts the way it contrib…
docs(terraform): describe gate-as-fact, build time versus run time, a…