Skip to content

Fix snapshot merge never matching gh-pages versioned dirs - #216

Merged
shouze merged 1 commit into
mainfrom
fix/docs-snapshot-merge-pathspec-glob
Sep 19, 2026
Merged

shouze merged 1 commit into
mainfrom
fix/docs-snapshot-merge-pathspec-glob

Conversation

@shouze

@shouze shouze commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Root cause

The deploy job's `Merge versioned snapshots from gh-pages storage` step used:

```bash
git ls-tree --name-only origin/gh-pages -- 'v[0-9]*'
```

Unlike `git log`/`git diff`, `git ls-tree` matches pathspecs literally — it does not expand glob wildcards. So this pathspec never matched anything, the loop body never ran, and every versioned snapshot stored in `gh-pages` (including `v2`) was silently skipped when building the live Pages artifact.

This is why https://fulll.github.io/github-code-search/v2/ returns a 404 even though the snapshot is safely stored in the `gh-pages` branch.

Fix

List all top-level `gh-pages` entries (no pathspec) and rely on the existing `grep -E '^v[0-9]+$'` filter that was already there to skip non-version files like `.nojekyll`.

Verified locally against the real `gh-pages` branch — old code matches nothing, fixed code correctly finds `v2`.

Next step after merge

Once merged, dispatch `docs.yaml` on `main` (`gh workflow run docs.yaml --ref main`) to redeploy and pick up the `v2` snapshot.

git ls-tree does not expand pathspec glob wildcards the way git log/git
diff do — 'v[0-9]*' is matched literally, so it never matched anything
and the deploy job's 'Merge versioned snapshots' step silently skipped
every stored snapshot, including v2. This is why
https://fulll.github.io/github-code-search/v2/ 404s even though the
snapshot is safely stored in gh-pages.

List all top-level gh-pages entries and filter with the existing grep
-E regex instead of relying on the pathspec.
Copilot AI lite review requested due to automatic review settings September 19, 2026 14:06
@github-actions

Copy link
Copy Markdown
Contributor

Coverage after merging fix/docs-snapshot-merge-pathspec-glob into main will be

96.88%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.46%100%100%99.41%282
   gh-cli.ts100%100%100%100%
   group.ts98.92%100%98.33%99.03%263–265, 525, 531, 864
   output.ts99.38%100%95.83%99.66%88
   regex.ts99.42%100%100%99.38%360
   render.ts90.99%100%88.24%91.09%177, 201–206, 208–210, 212–213, 234, 427–428, 528–532, 562–569, 571–579, 581–584
   scroll-cooldown.ts100%100%100%100%
   style.ts100%100%100%100%
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   layout-constants.ts100%100%100%100%
   mouse-hit.ts100%100%100%100%
   mouse.ts100%100%100%100%
   rows.ts99.42%100%100%99.38%239
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%
   terminal.ts100%100%100%100%

@shouze
shouze merged commit 7cbd226 into main Sep 19, 2026
4 of 5 checks passed
@shouze
shouze deleted the fix/docs-snapshot-merge-pathspec-glob branch September 19, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants