DF-831: staged CI workflow — delta-translate on merge, open a PR - #211
Conversation
Staged at i18n/config/translate.yml, not .github/workflows/, where it would run on every merge to main and fail: no secrets, and gt.config.json targets a navigation path that does not exist yet. Flow: push to main touching docs/, guides/, docs.json or the glossary → gtx-cli delta translation via gt-lock.json → validation gate → create-pull-request against main with an i18n label and a reviewer checklist. concurrency cancel-in-progress so a later push supersedes an in-flight run. The part worth keeping regardless of which engine wins is the gate: validate-mdx-parity.mjs --link-prefix --require-anchors --allow-code-comments build-locale-nav.mjs ko --check build-glossary.mjs ko --check A translation that renames a <Frame>, translates a code identifier, drops an import, unprefixes a link, or drifts a heading anchor looks exactly like a normal diff to a reviewer. Something has to prove it did not break 914 <Frame> tags, 2,721 links, and 3,723 heading anchors — and Mintlify's own translation PR needs that gate just as much as ours would. If we go native, delete translate.yml and keep those three steps as a small verify-i18n.yml; the recipe is in config/README.md. Because structure is machine-verified, the PR body asks reviewers only for what a machine cannot judge: glossary adherence, the 리텐션 / 데이터 보관 split, particles after Latin words, register, and a rendered layout check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Confidence Score: 4/5The workflow should not be activated until glossary artifacts are generated before validation; dependency pinning is also advisable. A source-glossary change reaches a check-only validation step without any preceding artifact generation, preventing the promised translation PR from being opened. Files Needing Attention: i18n/config/translate.yml
|
| Filename | Overview |
|---|---|
| i18n/config/translate.yml | Adds the staged translation workflow, but glossary-only source changes fail its check-only artifact gate and executable dependencies are not immutable. |
| i18n/config/README.md | Clearly documents staging, activation prerequisites, and the Mintlify-native fallback. |
Sequence Diagram
sequenceDiagram
participant Main as Push to main
participant CI as Translation workflow
participant GTX as gtx-cli
participant Gate as Validation gate
participant PR as Translation PR
Main->>CI: Matching documentation change
CI->>GTX: Delta translation
GTX-->>CI: Localized changes
CI->>Gate: MDX, navigation, glossary checks
alt All checks pass
Gate-->>CI: Valid
CI->>PR: Open review PR
else Any check fails
Gate-->>CI: Failure
CI--xPR: No PR opened
end
Reviews (1): Last reviewed commit: "DF-831: staged CI workflow — delta-trans..." | Re-trigger Greptile
| - name: Check the glossary artifacts are in sync | ||
| run: node i18n/scripts/build-glossary.mjs ko --check |
There was a problem hiding this comment.
Glossary artifacts are never generated
When the source glossary changes without separately regenerated artifacts, this workflow invokes only build-glossary.mjs --check, causing validation to fail before the translation PR is opened.
| - name: Check the glossary artifacts are in sync | |
| run: node i18n/scripts/build-glossary.mjs ko --check | |
| - name: Generate and check glossary artifacts | |
| run: | | |
| node i18n/scripts/build-glossary.mjs ko | |
| node i18n/scripts/build-glossary.mjs ko --check |
Source Used: Linear — [M3] Build CI: delta-translate on merge to main → open PR
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| name: Delta-translate and open a PR | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
Workflow dependencies remain mutable
Once activated, the workflow resolves mutable action tags and an unpinned gtx-cli while granting repository write permissions and exposing provider credentials, increasing supply-chain risk and allowing incompatible releases to break translation runs. How this was verified: The workflow contains no immutable references or package lock, and its executable steps receive write permissions or provider secrets.
Documents in
i18n/cross-reference each other, so relative links to files added later in the stackresolve once the stack has landed. The final state is link-checked; every relative link resolves.
Operational sequencing — none of this happens on merge
Merging this stack changes nothing a reader sees.
docs.jsonis untouched, no workflow is installed, andno
ko/tree exists at the repo root. Turning Korean on is a separate, deliberate sequence:docs.jsonlanguagesarray;cp i18n/nav/ko.json ./ko.jsondocs/+guides/intoko/gt.config.jsonto root,translate.ymlto.github/workflows/, setGT_API_KEY+GT_PROJECT_ID/koSteps 3 and 6 are the only ones that change live behaviour. Both are reversible by reverting one file.
Adds:
config/translate.yml; expandsconfig/README.mdto cover both filesIf Mintlify-native translations win the DF-827 decision, delete
translate.yml— Mintlify opens the translation PR itself, on a continuous schedule, with a human merge gate. This workflow would be a duplicate pipeline for a feature we already pay for.The flow
pushtomaintouchingdocs/,guides/,docs.jsonor the glossary →gtx-clidelta translation viagt-lock.json→ validation gate →create-pull-requestagainstmainwith ani18nlabel and a reviewer checklist.concurrency: cancel-in-progressso a later push supersedes an in-flight run.The part worth keeping regardless of engine
A translation that renames a
<Frame>, translates a code identifier, drops an import, unprefixes a link, or drifts a heading anchor looks exactly like a normal diff to a reviewer. Something has to prove it did not break 914<Frame>tags, 2,721 links, and 3,723 heading anchors — and Mintlify's own translation PR needs that gate just as much as ours would.So if we go native: delete
translate.yml, keep those three steps as a smallverify-i18n.yml. The recipe is inconfig/README.md.Reviewer burden, deliberately narrowed
Because structure is machine-verified, the PR body this workflow generates asks reviewers only for what a machine cannot judge: glossary adherence, the
리텐션/데이터 보관split, particles after Latin words, register, and a rendered layout check.Secrets needed before this can move
GT_API_KEYandGT_PROJECT_IDas repo secrets — only if General Translation wins.