Skip to content

fix: release-doc-sync action checkout pollutes caller's working tree#20

Merged
TMHSDigital merged 1 commit intomainfrom
fix/release-doc-sync-pollution
Apr 25, 2026
Merged

fix: release-doc-sync action checkout pollutes caller's working tree#20
TMHSDigital merged 1 commit intomainfrom
fix/release-doc-sync-pollution

Conversation

@TMHSDigital
Copy link
Copy Markdown
Owner

Fixes a pollution bug surfaced during Phase 2b smoke test on Docker.

The release-doc-sync composite action was checking out the meta-repo to a path inside GITHUB_WORKSPACE (.release-doc-sync), causing the caller's git add -A step to pick up the directory as a 160000-mode gitlink in every release commit (Subproject commit pointer to whatever SHA v1.0 resolved to at the time).

Fix

Move the meta-repo checkout to ${{ runner.temp }}/release-doc-sync (outside the workspace, invisible to the caller's git add).

- path: .release-doc-sync
+ path: ${{ runner.temp }}/release-doc-sync
...
- working-directory: .release-doc-sync
+ working-directory: ${{ runner.temp }}/release-doc-sync

Path resolution remains correct in both directions:

  • Script location: ${{ runner.temp }}/release-doc-sync/scripts/release_doc_sync/sync.py (relative to the new working-directory)
  • Files to edit: still passed as absolute path via CALLER_PATH=${{ github.workspace }}/${{ inputs.caller-path }}--repo-path "$CALLER_PATH"

Regression guard

Adds test_meta_repo_checkout_is_outside_workspace to tests/test_release_doc_sync.py. The new test:

  1. Asserts the checkout's path: contains runner.temp and does not start with . (workspace-relative dot path).
  2. Asserts the run step's working-directory: matches the checkout path.
  3. Sanity-verified: fails with a clear error message if reverted to .release-doc-sync, passes on the fixed path.

Combined with the existing test_steps_follow_drift_check_pattern (now agnostic of specific path string), the constraint cannot be silently re-introduced.

Why caught now

Surfaced during Phase 2b smoke test on Docker-Developer-Tools (the canary for TMHSDigital/Developer-Tools-Directory#5). Inspection of the release commit (16afa03) showed:

.cursor-plugin/plugin.json | 2 +-
.release-doc-sync          | 1 +    ← BUG
CHANGELOG.md               | 4 ++++
CLAUDE.md                  | 2 +-
README.md                  | 2 +-

Caught before Phase 2c parallel rollout could propagate the pollution to 5 more tool repos.

VERSION: 1.8.0 → 1.8.1 (PATCH). After merge, the v1.0 floating tag will be force-updated to point at v1.8.1.

Refs TMHSDigital/Developer-Tools-Directory#5.

The composite action was checking out the meta-repo to a path inside
GITHUB_WORKSPACE (.release-doc-sync). The caller's release.yml does
git add -A after the action runs, which picked up the directory as
a 160000-mode gitlink (submodule pointer to meta-repo HEAD SHA).
Every release commit was polluted with this stale pointer.

Fix: move the meta-repo checkout to ${{ runner.temp }}/release-doc-sync,
which is outside the workspace and not visible to the caller's
git add. The action's run step's working-directory updated to match.

Surfaced during Phase 2b smoke test on Docker (#5).
Caught before Phase 2c parallel rollout could propagate the pollution
to 5 more tool repos.

Adds a regression test guarding against future re-introduction.

Signed-off-by: 154358121+TMHSDigital@users.noreply.github.com
Made-with: Cursor
@github-actions github-actions Bot added the ci label Apr 25, 2026
@github-actions
Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant