infra: add sync:ii-spec script and port 16 upstream spec commits#249
Open
marc0olo wants to merge 6 commits into
Open
infra: add sync:ii-spec script and port 16 upstream spec commits#249marc0olo wants to merge 6 commits into
marc0olo wants to merge 6 commits into
Conversation
Adds scripts/sync-ii-spec.mjs — a deterministic 1:1 sync script that transforms docs/ii-spec.mdx from dfinity/internet-identity into docs/references/internet-identity-spec.md. Applies the same pattern as sync-motoko: strip MDX imports, remove H1, inline the Candid .did file, rewrite 8 absolute link patterns to relative paths, inject frontmatter. Bumps .sources/internetidentity to af980848..74ad617 (16 commits) and regenerates internet-identity-spec.md from the new pin. Updates AGENTS.md: internetidentity row now says to run npm run sync:ii-spec instead of manually applying patches; link-adaptation note updated to match.
|
🤖 Here's your preview: https://uc7il-jaaaa-aaaam-ai2gq-cai.icp0.io |
…cope Three corrections to the sync script: - Add m flag to H1 regex so it matches after leading blank lines from import stripping - Move Candid inlining after link rewriting so .did code comments are not rewritten - Exclude code blocks from the remaining-links check (prose only) - Restore sidebar order: 14 to match previous value
FETCH_HEAD is a file that could theoretically be overwritten between steps if another fetch runs. Using the hash saved to step outputs is safer and more explicit.
checkEmdash already tracks inFence state to skip code blocks. checkForbiddenPatterns was missing the same logic, causing false positives on URLs inside Candid/code block comments.
…nline Consistent with ic.did / http-gateway.did: copy internet_identity.did to public/references/internet-identity.did and replace the <CodeBlock> inline with a prose download link. Reduces internet-identity-spec.md from 2075 to 736 lines. Workflow updated to stage the .did file.
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
scripts/sync-ii-spec.mjs— a deterministic sync script (same pattern assync-motoko.sh) that transformsdocs/ii-spec.mdxfromdfinity/internet-identityintodocs/references/internet-identity-spec.mdinternetcomputer.orglink patterns to relative paths, inline the Candid.didfile in place of<CodeBlock>, inject frontmatter, append link-adaptation log comment.sources/internetidentityfromaf980848to74ad617(579 total upstream commits; 7 toucheddocs/ii-spec.mdx, 49 touchedinternet_identity.did)"sync:ii-spec": "./scripts/sync-ii-spec.mjs"topackage.json.github/workflows/sync-ii-spec.yml—workflow_dispatchworkflow that fetches latestinternet-identitymain, filters for changes to the two spec files only, and opens a PR if relevant changes existAGENTS.md:internetidentitybump row now points tonpm run sync:ii-specand the new workflowscripts/validate.js:checkForbiddenPatternsnow skips code blocks (same ascheckEmdash), preventing false positives on URLs inside Candid code commentsSync recommendation
sync from dfinity/internet-identity — docs/ii-spec.mdx, src/internet_identity/internet_identity.did