fix(cd): mv artifact - #4
Conversation
|
Coverage after merging fix-cd-mv-artifact into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR adjusts the CD workflow’s artifact “rename” step in an attempt to fix artifact movement/renaming during release builds.
Changes:
- Updated the workflow’s
mvinvocation from verbose-only to interactive + verbose (-iv) when renaming the built binary prior to upload.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| src="dist/github-code-search-$(echo '${{ matrix.target }}' | sed 's/^bun-//')" | ||
| [ -f "${src}.exe" ] && src="${src}.exe" | ||
| mv -v "$src" "dist/${{ matrix.artifact }}" | ||
| mv -iv "$src" "dist/${{ matrix.artifact }}" |
There was a problem hiding this comment.
Using mv -i in a GitHub Actions step can block or behave unexpectedly if the destination already exists (it may prompt for confirmation, resulting in a hang or a skipped move). More importantly, for several matrix entries src already equals dist/${{ matrix.artifact }} (e.g., linux and windows), so this mv will fail with “are the same file” regardless of -i. Consider computing dest="dist/${{ matrix.artifact }}" and skipping the move when src == dest, and keep the command non-interactive (e.g., plain mv -v with a pre-check/removal or a no-clobber strategy).
| mv -iv "$src" "dist/${{ matrix.artifact }}" | |
| dest="dist/${{ matrix.artifact }}" | |
| if [ "$src" != "$dest" ]; then | |
| # Ensure we don't get blocked by interactive prompts and avoid | |
| # "are the same file" errors when src == dest. | |
| [ -e "$dest" ] && rm -f "$dest" | |
| mv -v "$src" "$dest" | |
| fi |
Apply fixes for determinism, redundant computation, and UX documentation: **scroll-cooldown.ts + scroll-cooldown.test.ts** — Fix non-deterministic test - recordScroll() now accepts optional \`now\` parameter (default: Date.now()) - Tests pass explicit timestamp instead of relying on live clock - Eliminates race condition where Date.now() advances between test capture and function call, causing flaky assertions **render.ts** — Remove redundant repoSelected recomputation - Use group.repoSelected directly instead of recomputing from extractSelected - Comment clarifies that repoSelected is kept in sync by selection logic in tui.ts and render/selection.ts, removing per-frame overhead **docs/architecture/components.md** — Clarify double-click detection ownership - Update mouse hit-test component description: remove claim that hitTestClick() handles double-click detection (it doesn't — only maps coordinates to row+zone) - Add note: double-click detection is implemented in tui.ts via timestamp tracking **src/tui.ts** — Document mouse click semantics - Add explicit comment explaining single-click (navigate) vs double-click (action) - Reference docs/usage/interactive-mode.md § Mouse support for UX spec - Clarifies this is a UX feature complementing keyboard shortcuts Fixes Copilot review issues: - #1: Deterministic test (scroll-cooldown.test.ts:22) - #2: Accept 'now' parameter (scroll-cooldown.ts:26) - #3: Document click semantics (tui.ts:391) - #4: Clarify hit-test responsibility (components.md:115) - #5: Remove redundant repoSelected computation (render.ts:577)
Apply fixes for determinism, redundant computation, and UX documentation: **scroll-cooldown.ts + scroll-cooldown.test.ts** — Fix non-deterministic test - recordScroll() now accepts optional \`now\` parameter (default: Date.now()) - Tests pass explicit timestamp instead of relying on live clock - Eliminates race condition where Date.now() advances between test capture and function call, causing flaky assertions **render.ts** — Remove redundant repoSelected recomputation - Use group.repoSelected directly instead of recomputing from extractSelected - Comment clarifies that repoSelected is kept in sync by selection logic in tui.ts and render/selection.ts, removing per-frame overhead **docs/architecture/components.md** — Clarify double-click detection ownership - Update mouse hit-test component description: remove claim that hitTestClick() handles double-click detection (it doesn't — only maps coordinates to row+zone) - Add note: double-click detection is implemented in tui.ts via timestamp tracking **src/tui.ts** — Document mouse click semantics - Add explicit comment explaining single-click (navigate) vs double-click (action) - Reference docs/usage/interactive-mode.md § Mouse support for UX spec - Clarifies this is a UX feature complementing keyboard shortcuts Fixes Copilot review issues: - #1: Deterministic test (scroll-cooldown.test.ts:22) - #2: Accept 'now' parameter (scroll-cooldown.ts:26) - #3: Document click semantics (tui.ts:391) - #4: Clarify hit-test responsibility (components.md:115) - #5: Remove redundant repoSelected computation (render.ts:577)
Apply fixes for determinism, redundant computation, and UX documentation: **scroll-cooldown.ts + scroll-cooldown.test.ts** — Fix non-deterministic test - recordScroll() now accepts optional \`now\` parameter (default: Date.now()) - Tests pass explicit timestamp instead of relying on live clock - Eliminates race condition where Date.now() advances between test capture and function call, causing flaky assertions **render.ts** — Remove redundant repoSelected recomputation - Use group.repoSelected directly instead of recomputing from extractSelected - Comment clarifies that repoSelected is kept in sync by selection logic in tui.ts and render/selection.ts, removing per-frame overhead **docs/architecture/components.md** — Clarify double-click detection ownership - Update mouse hit-test component description: remove claim that hitTestClick() handles double-click detection (it doesn't — only maps coordinates to row+zone) - Add note: double-click detection is implemented in tui.ts via timestamp tracking **src/tui.ts** — Document mouse click semantics - Add explicit comment explaining single-click (navigate) vs double-click (action) - Reference docs/usage/interactive-mode.md § Mouse support for UX spec - Clarifies this is a UX feature complementing keyboard shortcuts Fixes Copilot review issues: - #1: Deterministic test (scroll-cooldown.test.ts:22) - #2: Accept 'now' parameter (scroll-cooldown.ts:26) - #3: Document click semantics (tui.ts:391) - #4: Clarify hit-test responsibility (components.md:115) - #5: Remove redundant repoSelected computation (render.ts:577)
No description provided.