Skip to content

Commit 047ba71

Browse files
committed
ci: remove lost-commit check — merge-to-main-first is the rule, not a guarded invariant
1 parent dd08e21 commit 047ba71

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

.claude/docs-guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ git branch -D temp/docs-fix-vX.Y # local branch no longer needed
5454

5555
The commits remain reachable via the tag — no remote branch is needed.
5656

57-
**On the next release:** `sync-docs-tag.yml` resets `docs/vX.Y` to the release commit. Because the fix was already merged to `main`, the release will contain it, and the reset preserves it. The CI will emit a warning if commits would be lost, giving the release driver a chance to verify.
57+
**On the next release:** `sync-docs-tag.yml` resets `docs/vX.Y` to the release commit. Because the fix was already merged to `main`, the release will contain it, and the reset preserves it automatically.
5858

5959
## Writing Guidelines
6060

.claude/skills/release/task6-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The tag push triggers two automated workflows:
77
1. **`docs.yml` (`publish-versioned-docs` job):** Builds and publishes the versioned docs to `/X.Y/` on the `docs-deployment` branch (served at `https://cli.internetcomputer.org/X.Y/`). The `versions.json` PR must not be merged until that deployment succeeds, otherwise the root redirect will point to a path that does not exist yet.
88

99
2. **`sync-docs-tag.yml`:** Creates or moves the `docs/vX.Y` tag to the new release commit — no manual action required. This keeps the docs-override tag in sync with the latest patch. Because the tag is moved via `GITHUB_TOKEN`, the push does not re-trigger `docs.yml` (GitHub prevents recursive workflow runs from `GITHUB_TOKEN` pushes).
10-
- If `docs/vX.Y` had commits not present in the release (i.e. docs-only fixes applied between patches), the workflow emits a CI warning. Those commits must already be in `main` — if they are, the reset is safe and the changes survive in the release. If they are not, escalate to the release driver before proceeding.
10+
- The reset overwrites any docs-only commits that were on `docs/vX.Y` but not in the release. This is safe as long as the "merge to main first" rule was followed — those commits will be in the release itself. See `.claude/docs-guidelines.md` → "Docs-Only Fixes for Released Versions".
1111

1212
Once the `versions.json` PR merges to `main`, the `publish-root-files` CI job runs automatically and copies `og-image.png`, `llms.txt`, `llms-full.txt`, and `feed.xml` from the new version's folder to the deployment root — no manual step needed.
1313

.github/workflows/sync-docs-tag.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,6 @@ jobs:
4646
echo "MINOR=${MINOR}" >> $GITHUB_ENV
4747
echo "DOCS_TAG=docs/v${MINOR}" >> $GITHUB_ENV
4848
49-
- name: Warn if docs tag has commits not in release
50-
run: |
51-
# If docs/vX.Y already exists and has commits that are NOT in the release tag,
52-
# those commits were docs-only fixes applied between releases. They WILL be
53-
# overwritten by the reset below. Warn loudly so the release driver can verify
54-
# those changes are already merged to main (and therefore baked into this release).
55-
if git ls-remote --exit-code --tags origin "refs/tags/${DOCS_TAG}" > /dev/null 2>&1; then
56-
git fetch origin "refs/tags/${DOCS_TAG}:refs/tags/${DOCS_TAG}" 2>/dev/null || true
57-
EXTRA=$(git log --oneline "${TAG}..refs/tags/${DOCS_TAG}" 2>/dev/null || true)
58-
if [[ -n "$EXTRA" ]]; then
59-
echo "::warning::${DOCS_TAG} has commits not in ${TAG} that will be overwritten:"
60-
echo "$EXTRA" | while read -r line; do
61-
echo "::warning:: $line"
62-
done
63-
echo "::warning::Ensure these changes are merged to main so they survive future releases."
64-
fi
65-
fi
66-
6749
- name: Create or move docs tag to release commit
6850
run: |
6951
if git ls-remote --exit-code --tags origin "refs/tags/${DOCS_TAG}" > /dev/null 2>&1; then

0 commit comments

Comments
 (0)