Conversation
Both JP sync agents were told to find the pushed changeset with `git diff HEAD~1 HEAD`, but the compiled workflows check out with `fetch-depth: 1`. In a single-commit shallow clone `HEAD~1` does not exist, so that command fails, and the documented fallback (`git log --name-only -1`) lists the whole `en/` tree on a merge commit instead of a real changeset. With no reliable way to scope the sync, the xplat agent emitted a `noop` and skipped the QR Code translation (run 36129656534). Because `if-no-changes: ignore` is set, the run was still reported green, so the miss was invisible. The Angular agent improvised its way around the same problem by querying the GitHub MCP server, and shipped only a TOC entry for a page that was never translated - leaving a dangling JP TOC href that fails the relative-link check. Step 1 now resolves the changeset through the `github` MCP CLI (`get_commit`, or `get_pull_request_files` for a PR merge, which also avoids the 300-file per-commit cap), and Step 3 reads each file's patch from that same response. Local git is used only for the HEAD SHA, which a shallow clone does provide. The agents are explicitly told not to fall back to the broken git commands, and to emit `report_incomplete` rather than `noop` when the MCP calls themselves fail, so a future miss surfaces instead of passing as a clean run. Author attribution now prefers the commit/PR author from the MCP response, since on a merge commit the local committer is whoever pressed merge rather than the person who wrote the docs. The security block is updated to list the read-only `github` MCP CLI among the permitted actions. Lock files are recompiled; the prompt body is runtime-imported, so only `body_hash` changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ChronosSF
added a commit
that referenced
this pull request
Sep 28, 2026
The JP TOC entries added by this branch pointed at a page that did not exist, so buildSidebar() dropped them and check-relative-links failed for both the xplat and Angular doc sets. The xplat JP sync that should have produced this page skipped it: run 36129656534 could not determine the changeset in a shallow clone and emitted a noop, which `if-no-changes: ignore` reported as a green run. The workflow fix is separate (#868); this adds the missing translation. Mirrors docs/xplat/src/content/en/components/inputs/qr-code.mdx in full, following the translation rules in .github/workflows/sync-jp-docs-xplat.md: prose translated, `_language: ja` added, and imports, JSX tags and their non-prose attributes, {Token} placeholders and code fences preserved byte-for-byte. QR terminology follows JIS X 0510 (誤り訂正, 位置検出パターン, モジュール). Also restores the trailing newline on jp/toc.json, dropped in d992a98. Both relative link checks now report 0 broken. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
Both JP sync agents are told to find the pushed changeset with:
but the compiled workflows check the repo out with
fetch-depth: 1. In a single-commit shallow cloneHEAD~1does not exist, so that command fails. The documented fallback,git log --name-only --format="" -1, does not degrade gracefully either — on a merge commit it lists the entireen/tree rather than a changeset.What that cost us
When the QR Code docs merged to
vnext(#837,e0c49ec), the xplat sync run 36129656534 hit exactly this and gave up, reporting anoop:Because
safe-outputs.create-pull-request.if-no-changes: ignoreis set andnoopis a legitimate safe-output, the run was reported green. The skip was indistinguishable from "nothing to do."Meanwhile the Angular agent (run 36129656538) improvised around the same shallow clone by querying the GitHub MCP server, and correctly found that the only tracked change under
docs/angular/src/content/en/was a new TOC entry. It shipped that entry — #858 — for a page the xplat sync had just silently failed to translate. The result is a JP TOC href with no page behind it, which failscheck-relative-links.This class of miss has bitten us before:
1780f11c34was a manual replay of failed Angular + xplat JP syncs for four EN PRs.Change
Step 1 in both agent prompts now resolves the changeset through the read-only
githubMCP CLI, which is already mounted and allow-listed in the compiled workflows:github get_commit --owner … --sha <sha>— for a merge commit GitHub returns the diff against the first parent, which is precisely what the merge brought ontovnext.github get_pull_request_files --owner … --pullNumber NNNwhen the push was a PR merge. Preferred for merges, and required past 300 changed files, since GitHub truncates a commit'sfilesarray at 300 entries.Local git is now used only for the HEAD SHA, which a shallow clone does provide.
Step 3 reads each file's
patchfrom that same response, falling back tocaton the working tree (which sits at the pushed commit) when GitHub omits the patch for a large or newly added file.Two guardrails against silent misses:
git diff HEAD~1 HEADorgit log --name-only -1, and not to emitnoopmerely because local git could not produce a diff.report_incompleterather thannoop, so the failure surfaces instead of passing as a clean run.Author attribution now prefers the commit/PR author from the MCP response — on a merge commit the local committer is whoever pressed merge, not the person who wrote the docs.
The SECURITY block is updated to list the read-only
githubMCP CLI among the permitted actions, so the agent doesn't read it as off-limits.Notes for review
githubMCP server andshell(github:*)were already available to both agents — the Angular agent used them unprompted.frontmatter_hashis unchanged.gh awv0.88.7 that produced them. The prompt body is runtime-imported ({{#runtime-import …}}), so the only lock change isbody_hash.🤖 Generated with Claude Code