Skip to content

v6.1.2: Harden release verification#4

Merged
tyl3r-ch merged 2 commits intomainfrom
new-ideas
Apr 11, 2026
Merged

v6.1.2: Harden release verification#4
tyl3r-ch merged 2 commits intomainfrom
new-ideas

Conversation

@tyl3r-ch
Copy link
Copy Markdown
Contributor

@tyl3r-ch tyl3r-ch commented Apr 11, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Version bumped to 6.1.2
    • Release verification process updated to enhance installation reliability

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

📝 Walkthrough

Walkthrough

This PR bumps the package version from 6.1.1 to 6.1.2 in package.json and src/lib/constants.ts, and enhances the release workflow with retry logic for NPX and bunx install path verification steps, each attempting up to 6 times with 10-second intervals before failing.

Changes

Cohort / File(s) Summary
Version Bump
package.json, src/lib/constants.ts
Updated version constant and package metadata from 6.1.1 to 6.1.2.
Workflow Enhancement
.github/workflows/release.yml
Added retry mechanism (6 attempts, 10-second intervals) to NPX and bunx install path verification steps with explicit timeout error messages.

Possibly related PRs

Poem

🐰 A version hops forth, from one-one to two,
With retries in workflows, now stronger and true!
Six chances to verify, each bundled just right,
The release path glimmers, shining so bright! ✨

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'v6.1.2: Harden release verification' directly describes the main change—adding retry logic and stricter verification to the release workflow steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch new-ideas

Comment @coderabbitai help to get the list of available commands and usage tips.

@tyl3r-ch tyl3r-ch enabled auto-merge April 11, 2026 01:59
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
.github/workflows/release.yml (1)

85-95: Extract shared retry logic to avoid drift between npx and bunx checks.

These blocks are structurally identical; moving them into one helper in each run script keeps behavior consistent and lowers maintenance risk.

♻️ Example refactor
       - name: Verify npx install path
         run: |
           VERSION="$(node -p "require('./package.json').version")"
-          EXPECTED="TTDash v${VERSION}"
-          for attempt in 1 2 3 4 5 6; do
-            OUTPUT="$(npm exec --yes --package "@roastcodes/ttdash@${VERSION}" -- ttdash --help 2>&1)" && {
-              printf '%s\n' "$OUTPUT"
-              printf '%s\n' "$OUTPUT" | grep -F "$EXPECTED" >/dev/null
-              exit 0
-            }
-            sleep 10
-          done
-          echo "npm exec install path did not become ready in time."
-          exit 1
+          EXPECTED="TTDash v${VERSION}"
+          verify_install() {
+            local cmd="$1"
+            local label="$2"
+            for attempt in 1 2 3 4 5 6; do
+              OUTPUT="$(eval "$cmd" 2>&1)" && {
+                printf '%s\n' "$OUTPUT"
+                printf '%s\n' "$OUTPUT" | grep -F "$EXPECTED" >/dev/null && exit 0
+              }
+              sleep 10
+            done
+            echo "${label} install path did not become ready in time."
+            exit 1
+          }
+          verify_install 'npm exec --yes --package "@roastcodes/ttdash@'"${VERSION}"'" -- ttdash --help' 'npm exec'

Also applies to: 100-110

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 85 - 95, The retry loop that runs
the check (variables EXPECTED and OUTPUT, the for-attempt loop, the npm exec
"--package "@roastcodes/ttdash@${VERSION}" -- ttdash --help" invocation, the
grep check and exit logic) is duplicated for different runners (npx/bunx/npm
exec); extract that shared retry logic into a single reusable helper function or
script invoked by each run step so both checks call the same implementation;
implement a helper (e.g., retry_check or run_with_retries) that accepts the
command to run and the expected string, reuse it in the run blocks instead of
copying the for loop, and ensure it preserves the same sleep, attempts, exit
codes, and output printing behavior.
src/lib/constants.ts (1)

1-1: Consider eliminating dual version sources.

server.js reads runtime version from package.json (Line 12), while this constant is maintained separately. Keeping both can drift over time; consider deriving UI/library version from one source (or enforcing equality in CI).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/constants.ts` at line 1, The file exports a hardcoded VERSION
constant (export const VERSION) which duplicates the runtime version pulled from
package.json in server.js; replace the hardcoded value by deriving it from
package.json (e.g., import or require package.json at build/runtime or generate
constants.ts during the build) so there is a single source of truth, or
alternatively add a CI check that asserts equality between package.json's
version and the VERSION export; update the symbol VERSION in
src/lib/constants.ts accordingly and ensure any consumers still import VERSION
as before.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 85-95: The retry loop that runs the check (variables EXPECTED and
OUTPUT, the for-attempt loop, the npm exec "--package
"@roastcodes/ttdash@${VERSION}" -- ttdash --help" invocation, the grep check and
exit logic) is duplicated for different runners (npx/bunx/npm exec); extract
that shared retry logic into a single reusable helper function or script invoked
by each run step so both checks call the same implementation; implement a helper
(e.g., retry_check or run_with_retries) that accepts the command to run and the
expected string, reuse it in the run blocks instead of copying the for loop, and
ensure it preserves the same sleep, attempts, exit codes, and output printing
behavior.

In `@src/lib/constants.ts`:
- Line 1: The file exports a hardcoded VERSION constant (export const VERSION)
which duplicates the runtime version pulled from package.json in server.js;
replace the hardcoded value by deriving it from package.json (e.g., import or
require package.json at build/runtime or generate constants.ts during the build)
so there is a single source of truth, or alternatively add a CI check that
asserts equality between package.json's version and the VERSION export; update
the symbol VERSION in src/lib/constants.ts accordingly and ensure any consumers
still import VERSION as before.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cf9d4fe7-2e6f-4959-86a0-4e1939995bec

📥 Commits

Reviewing files that changed from the base of the PR and between 8ae8e65 and 4bd7521.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • package.json
  • src/lib/constants.ts

@tyl3r-ch tyl3r-ch merged commit 16dd19c into main Apr 11, 2026
6 checks passed
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.

1 participant