Skip to content

fix: address unresolved review comments from #1058#1067

Merged
BYK merged 1 commit into
mainfrom
fix/release-args-and-1058-followups
Jun 4, 2026
Merged

fix: address unresolved review comments from #1058#1067
BYK merged 1 commit into
mainfrom
fix/release-args-and-1058-followups

Conversation

@BYK

@BYK BYK commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #1058 that addresses the review threads still open after the
earlier follow-ups (#1059, #1063). Each thread is mapped below.

Release commands — eliminate the silent args.join(" ") defect (thread 3349270396)

The sentry bot flagged that release restore 1.0.0 extra silently joins extra
positionals into "1.0.0 extra". This args.join(" ").trim() pattern was shared
by all release commands, so rather than a one-off guard this fixes the whole
class:

  • All version-only release commands (archive, restore, create, delete,
    deploys, finalize, view, set-commits) now declare a single
    kind: "tuple" positional, so Stricli enforces arity — extra args are
    rejected instead of silently swallowed.
  • release deploy becomes a 3-positional tuple (<version> <environment> [name]);
    multi-word deploy names must be quoted (e.g. "Deploy #42"), matching standard
    CLI conventions and the existing docs example.
  • New resolveReleaseTarget() helper in src/commands/release/parse.ts
    centralizes the version-parse + org-resolution + ContextError boilerplate.
  • New GritQL lint rule lint-rules/no-args-join-in-release.grit bans
    args.join() in src/commands/release/ so the anti-pattern cannot return
    (verified it fires on a reintroduced args.join).

sourcemap resolve — single counting loop (thread 3356439786)

Replaced two files.filter(...) passes with one for...of loop tallying both
resolved and withDebugId.

sourcemap inject — remote detection + sort (threads 3356454439, 3356458605)

  • Remote sourcemap detection now uses an anchored ^https?:// regex instead of
    two startsWith checks.
  • Path sort uses byte-wise comparison instead of locale-dependent localeCompare
    (matching the plain .sort() already used in upload.ts).

proguard — precompute namespace bytes (threads 3356471815, 3356474050)

uuidV5() reparsed the hyphenated namespace UUID into bytes on every call. The
namespace is fixed, so the bytes are now precomputed once at module load.
Behavior-preserving — golden vectors unchanged (void\n
5db7294d-87fc-5726-a5c0-4a90679657a5, namespace 4f44f30f-...).

Already handled (resolving with notes)

Testing

  • Full unit suite: 7449 passed / 0 failed / 13 skipped.
  • bun run typecheck, bun run lint (incl. new GritQL rule), check:fragments,
    check:errors all green.
  • Added resolveReleaseTarget unit tests; updated the release deploy and
    sourcemap resolve tests for the new signatures.

Follow-up to #1058 (and #1059/#1063) addressing the review threads that
remained open after the earlier follow-ups.

Release commands — eliminate the silent `args.join(" ")` defect:
- All version-only release commands (archive, restore, create, delete,
  deploys, finalize, view, set-commits) now declare a single `kind: "tuple"`
  positional so Stricli enforces arity. Previously `kind: "array"` +
  `args.join(" ").trim()` silently swallowed extra positionals
  (`restore 1.0.0 extra` → `"1.0.0 extra"`).
- `release deploy` converts to a 3-positional tuple
  (`<version> <environment> [name]`); multi-word names must be quoted.
- New `resolveReleaseTarget()` helper in release/parse.ts centralizes the
  version parse + org resolution + ContextError boilerplate.
- New GritQL lint rule `no-args-join-in-release.grit` bans `args.join()` in
  release commands so the anti-pattern cannot be reintroduced.

sourcemap resolve — single pass over files for the resolved/withDebugId
counters instead of two `.filter()` calls.

sourcemap inject — use an anchored `^https?://` regex for remote sourcemap
detection; replace locale-dependent `localeCompare` path sort with a
byte-wise comparison (matching upload.ts).

proguard — precompute the namespace bytes once instead of reparsing the
hyphenated UUID string on every `uuidV5()` call. Behavior-preserving
(golden vectors unchanged).

Regenerated skill/docs reference files reflect the single-positional
signatures.
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1067/

Built to branch gh-pages at 2026-06-04 14:43 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 81.16%. Project has 4427 uncovered lines.
❌ Project coverage is 81.81%. Comparing base (base) to head (head).

Files with missing lines (9)
File Patch % Lines
src/commands/sourcemap/resolve.ts 0.00% ⚠️ 7 Missing
src/lib/sourcemap/inject.ts 75.00% ⚠️ 2 Missing and 2 partials
src/commands/release/deploys.ts 33.33% ⚠️ 2 Missing
src/commands/release/archive.ts 100.00% ⚠️ 1 partials
src/commands/release/deploy.ts 85.71% ⚠️ 1 Missing
src/commands/release/finalize.ts 100.00% ⚠️ 1 partials
src/commands/release/restore.ts 100.00% ⚠️ 1 partials
src/commands/release/set-commits.ts 80.00% ⚠️ 1 Missing
src/commands/release/view.ts 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    81.86%    81.81%    -0.05%
==========================================
  Files          341       341         —
  Lines        24359     24336       -23
  Branches     15915     15911        -4
==========================================
+ Hits         19939     19909       -30
- Misses        4420      4427        +7
- Partials      1663      1661        -2

Generated by Codecov Action

@BYK BYK merged commit 9c8ece7 into main Jun 4, 2026
27 checks passed
@BYK BYK deleted the fix/release-args-and-1058-followups branch June 4, 2026 14:55
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