Skip to content

refactor(lint): TMP012, TMP013, TMP014 move into core as OPS012, OPS013, OPS014 (#2122) - #2151

Merged
lex00 merged 2 commits into
mainfrom
feat/2122-ops-rules-into-core
Sep 6, 2026
Merged

lex00 merged 2 commits into
mainfrom
feat/2122-ops-rules-into-core

Conversation

@lex00

@lex00 lex00 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Closes #2122. Sub-issue 6 of #2114, the last of Epic A. Stacked on #2148 (#2120) → #2147 → #2146 → #2139 → #2137; retarget to main as those merge.

The three op-model post-synth checks leave the temporal lexicon for packages/core/src/lint/rules/op/ as OPS012 (activity contract), OPS013 (step-output reference) and OPS014 (converge-rule refusals), registered in core's built-in set so they fire on any project that declares an op. chant lint gains an op-check pass scoped downward from the lint target, so OPS013 fires with no lexicons configured; chant build runs the same checks over the full build result. OPS014's destructive-dispatch refusal is re-argued on the unattended-tick ground now that a gated op ends gated instead of being refused (#2119). The rules read Chant::Op entities through isOpEntity and labels (#2118), and use the activity contracts at their core home (#2117). The temporal lexicon's barrel registers TMP001, TMP002, TMP010 and TMP011 only.

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 (lint.test.ts).
  • chant build on a ConvergeOp fixture with a destructive gated rule fails with the OPS014 refusal (build.test.ts).
  • The three rule pages are generated and linked from the lint-rules index; converging-lifecycle.mdx references OPS014.
  • lexicons/temporal/src/lint/post-synth/index.ts no longer registers TMP012, TMP013, TMP014.
  • Repo-wide typecheck, the suite, and the docs prose ratchet pass.

Stale TMP012 to TMP014 name references remain in comments under lexicons/temporal, lexicons/k8s/src/composites/operator-stack.ts and one terraform example config; the first die with the lexicon in #2131, the others are a one-line rename for #2133.

Gates

  • npx vitest run packages/core lexicons/temporal: 400 files passed.
  • npx tsx scripts/typecheck.ts: 44 known failures, no regressions.
  • npx tsx scripts/check-lexicons.ts: no untracked tier-1 failures.
  • node scripts/depcheck.mjs: no undeclared runtime dependencies.
  • node scripts/lint-docs-sentences.mjs: 4220 findings, 4 below baseline, no regressions.
  • node scripts/check-docs-diataxis.mjs: no failures.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JH1b63nCr6fXETJYMvL4xK

@lex00
lex00 force-pushed the feat/2120-schedule-on-op branch from aeab190 to 1bf2915 Compare September 6, 2026 15:42
@lex00
lex00 force-pushed the feat/2122-ops-rules-into-core branch from d39b5e4 to 7388b27 Compare September 6, 2026 15:42
@lex00
lex00 force-pushed the feat/2120-schedule-on-op branch from 1bf2915 to db048ba Compare September 6, 2026 16:00
@lex00
lex00 force-pushed the feat/2122-ops-rules-into-core branch from 7388b27 to d010870 Compare September 6, 2026 16:00
@lex00
lex00 force-pushed the feat/2120-schedule-on-op branch from db048ba to 383ace7 Compare September 6, 2026 16:35
@lex00
lex00 force-pushed the feat/2122-ops-rules-into-core branch from d010870 to 0f848ab Compare September 6, 2026 16:35
@lex00
lex00 force-pushed the feat/2120-schedule-on-op branch from 383ace7 to 7e482d5 Compare September 6, 2026 17:11
@lex00
lex00 force-pushed the feat/2122-ops-rules-into-core branch from 0f848ab to f0dcbdb Compare September 6, 2026 17:11
@lex00
lex00 force-pushed the feat/2120-schedule-on-op branch from 7e482d5 to 07c88d8 Compare September 6, 2026 17:27
@lex00
lex00 force-pushed the feat/2122-ops-rules-into-core branch from f0dcbdb to af649a8 Compare September 6, 2026 17:27
@lex00
lex00 changed the base branch from feat/2120-schedule-on-op to main September 6, 2026 17:53
lex00 and others added 2 commits September 6, 2026 11:54
…OPS014

The three post-synth checks are about the Op model (OpConfig), not Temporal
itself, so they move from lexicons/temporal/src/lint/post-synth/ to
packages/core/src/lint/rules/op/ and run as core-owned checks
(coreOpChecks()) in both `chant build` (unscoped, like the receipt/output/
knowledge checks) and `chant lint` (a new, downward-scoped *.op.ts scan, so
this fires with no lexicons configured and without walking up to a project
root the way op/discover.ts's discoverOps does).

Rule ids change TMP -> OPS; messages are kept except OPS014's destructive-
dispatch refusal, which is re-argued on its real ground now that #2119 made
a gated op end a run `gated` rather than refusing it outright: a converge
tick is unattended, so a destructive dispatch needs approval before it's
attempted, not a gate consulted after the tick already committed to it.

Both entity-type strings ("Temporal::Op" and the future "Chant::Op" from
duplicated activity-contracts subset in core (lifecycleDiff/shellCmd/
httpCheck) since the full roster stays in the temporal lexicon until #2117
moves activities; OPS013's structural half (unknown/later step-output
reference) needs no contract at all.

Docs: OPS012-014 get sections in lint-rules/correctness.mdx, linked from the
lint-rules overview; converging-lifecycle.mdx's TMP014 references become
OPS014, including the gate-as-fact-aware rewrite of the destructive-dispatch
reasoning. Temporal's own generated rules page and audit catalog drop the
three checks.

Fixes #2122.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JH1b63nCr6fXETJYMvL4xK
- OPS012/OPS013 point at core's real activity contracts
  (packages/core/src/op/activities/activity-contracts.ts, #2117) instead of
  the small duplicated subset this issue carried before that landed; the
  duplicate file is deleted.
- support.ts drops the dual "Temporal::Op"/"Chant::Op" string matching for
  core's own isOpEntity (packages/core/src/op/resource.ts, #2118); OPS014
  reads labels.Converge instead of searchAttributes.Converge.
- Test fixtures across the OPS012/013/014 unit tests and the build.ts/lint.ts
  integration tests move to entityType "Chant::Op" / lexicon "chant" and the
  "matches both entity types" cases become "ignores the old Temporal::Op
  entity type" cases, since matching is no longer dual.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JH1b63nCr6fXETJYMvL4xK
@lex00
lex00 force-pushed the feat/2122-ops-rules-into-core branch from af649a8 to 212fe57 Compare September 6, 2026 17:54
@lex00
lex00 merged commit 584eaf0 into main Sep 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core(lint): TMP012, TMP013, TMP014 move into core as OPS012, OPS013, OPS014

1 participant