Repository navigation
feat(forgejo|temporal): meet the tier-1 lexicon contract (#1072) - #1119
Merged
Merged
Conversation
Builds forgejo up to the same tier-1 bar as the cloud-resource lexicons instead of relaxing the bar for it (issue #1072's maintainer decision: option 1). Forgejo stays a thin github dialect throughout — nothing here forks or reimplements github's authoring surface: - Lint rules: forgejoPlugin.lintRules() wraps every github rule under a WFJ- prefix (e.g. WFJ-GHA001), keeping the check/fix logic untouched. A plain re-export under github's own ids would collide the moment a project (or `chant audit`) loads the github and forgejo plugins together, which packages/core/src/audit/core.ts's defaultChecksProvider already does for post-synth checks. - LSP: completionProvider()/hoverProvider() forward straight to github's. - Packaging: a real (if empty) generate/bundle pipeline now produces dist/manifest.json with a chantVersion, matching every other lexicon. - Docs: a Starlight site (src/codegen/docs.ts) documenting the dialect and migration path, deferring to github's docs for the entities/lint catalog themselves. - A plugin.test.ts and an example project (ci-workflow) exercising the reused entities end to end. Removes forgejo's 8 entries from KNOWN_FAILURES in scripts/check-lexicons.ts.
Builds temporal up to the same tier-1 bar as the cloud-resource lexicons instead of relaxing the bar for it (issue #1072's maintainer decision: option 1). Temporal stays product-agnostic throughout (#809) — nothing here adds a dependency on another product's activities: - Lint rule: TMP020 flags proxyActivities() calls with inline startToCloseTimeout instead of a named TEMPORAL_ACTIVITY_PROFILES entry. It is a genuinely new source-level check, not a duplicate of the existing TMP001/002/010/011 post-synth checks — those validate the chant-serialized entity graph (TemporalNamespace/Schedule/SearchAttribute), while proxyActivities() calls live in plain workflow TypeScript the build pipeline never serializes, so pre-synth lint is the only stage that can see this pattern at all. - LSP: completions/hover over its own 4-resource catalog (src/generated/lexicon-temporal.json), the same LexiconIndex-based pattern docker and github already use. - An example project (local-dev-server: TemporalDevStack composite + SearchAttribute + TemporalSchedule) exercising the full resource surface. - Regenerated docs (rules.mdx, index.mdx) and fixed the stale lint-rules.mdx page, which pre-dated the TMP00x checks and still described them as unimplemented "future" ideas. Removes temporal's 4 entries from KNOWN_FAILURES in scripts/check-lexicons.ts. Also regenerates docs/src/content/docs/concepts/typescript-as-data.mdx's fold-coverage figure (53/98 -> 54/100): the two new example projects (forgejo's and this one) grow the corpus fold-differential measures over; drift stays 0.
…nt rule imports it at runtime
lex00
force-pushed
the
feat/1072-forgejo-temporal-tier1
branch
from
July 27, 2026 05:49
1732fa7 to
e248394
Compare
This was referenced Jul 27, 2026
This was referenced Sep 7, 2026
lex00
added a commit
that referenced
this pull request
Sep 13, 2026
… (#2451) * fix(core): write the NUL key separator as an escape, not a raw byte (#2280) Three source files carried literal NUL bytes inside template literals, used as separators in composite keys. The values were right and the code worked. What broke was every tool that reads the files as text: ripgrep classifies a file containing NUL as binary, so it answers "binary file matches" instead of the matching lines, and a repo-wide search omits the file entirely. The issue named one file. The gate added here found three: graph-ir.ts 3 NUL 911 lines audit/core.ts 2 NUL 449 lines graph-layout.ts 1 NUL 185 lines 1545 lines invisible to every grep-driven search of this repository for as long as the bytes were there. That is worse than a silent bug, because it is a silent bug in the tool you would reach for to find bugs: any audit, any "I searched the codebase", any refactor that greps for a symbol defined in one of those files quietly skipped it and reported success. NUL stays the separator — it is the right one, being the character that cannot occur in an identifier or an attribute name. It is now written as an escape: four ASCII characters in the file, the same single code unit at runtime, so the keys are byte-identical. The gate walks every shipped .ts for a NUL byte, since one file was never the interesting number and finding the other two by eye was luck. * test(fold): close the corpus, so an entry in neither list fails (#2225) `EXPECTED_FOLD` is a ratchet over names known to fold, and the gate only walks names already in it: const regressed = EXPECTED_FOLD.filter((n) => byName.get(n)?.mode !== "fold"); So an entry absent from the list could never appear in `regressed`, whether it folded or not. A new corpus entry that never folds passed by construction, and twice did: forgejo's ci-workflow joined in #1119 and sat run-fallback for a month, and fountain-steward joined in #2129 with every *.op.ts default-exporting its Op, moving the published count's denominator only. Neither dropped the numerator, so neither tripped anything. `EXPECTED_RUN_FALLBACK` names all thirteen entries that do not fold today, each with the reason chant actually gives — read off the fold decisions rather than guessed. Three gates close the corpus: an entry in neither list fails by name, no entry is in both, and a listed fallback that starts folding or leaves the corpus fails so the list can only shrink. Option (a) from the issue. (b), refusing when the live count drops, would have caught neither case above: both left the numerator flat while the denominator grew. Writing the gate first turned up the same hole in the other direction — seven entries FOLD and were never ratcheted, so a regression in any of them would have gone unnoticed: argo-cd-gke, cc-gcp-canonical, cockroachdb-multi-region-gke, fan-out-estate, github-pr-preview, testing-harness-aws, k8s/operator-stack All seven are added to EXPECTED_FOLD, taking it from 89 to 96, which is the live fold count. None is removed. Verified the gate fails as intended by dropping one entry from both lists and watching it name that entry.
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 free
to 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.
Summary
Implements option 1 from #1072 (maintainer decision): build forgejo and temporal up to the same tier-1 lexicon-contract bar as the cloud-resource lexicons, instead of relaxing the contract for them. Two logical commits, one per lexicon (each independently green against
just check-lexicons,just build,just test):feat(forgejo): meet the tier-1 lexicon contract (#1072)— forgejo stays a thin github dialect throughout. Lint rules are wrapped (not re-exported verbatim) under aWFJ-prefix to avoid an id collision when a project loads github+forgejo together (chant auditalready does this for post-synth checks). LSP completions/hover forward straight to github's. A real (if empty) generate/bundle pipeline now shipsdist/manifest.json. A Starlight docs site and aplugin.test.tsand example project round it out.feat(temporal): meet the tier-1 lexicon contract (#1072)— temporal stays product-agnostic (Relocate remaining product activities out of the temporal lexicon #809). Adds one genuinely new source-level lint rule (TMP020, onproxyActivities()inline options — a check post-synth can't do since it only sees the chant-serialized entity graph, not workflow TypeScript), LSP completions/hover over its own resource catalog, an example project, and fixes docs that had drifted (a stale "no lint rules" page, a mis-generated rules table).Every fixed tier-1 check has its
KNOWN_FAILURESentry removed in the corresponding commit.What's still tracked (not touched by this PR)
github's 2 entries (#1069— theexpressionintrinsic export-name check) are unrelated to #1072 and left as-is.Test plan
just build— cleanjust lint— cleanjust test(full vitest suite) — 764 files / 8777 tests passed, 5 skipped (pre-existing), 0 failedjust check-lexicons— forgejo 17/17, temporal 17/17, only github's 2 pre-existing bug(github): 'expression' intrinsic is registered but never exported from src/index.ts #1069 entries remain tracked, no untracked failuresnpm run build -w @intentius/chant-lexicon-temporal— cleannpm run build -w @intentius/chant-lexicon-forgejo— cleanjust fold-differential— 100/100 built both ways, drift 0 (corpus grew 98→100 from the two new required example projects; fold-coverage doc regenerated 53/98 → 54/100 accordingly)