Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
60aed86
lint(scripts): add no-weak-assertions custom check
andrew-bierman May 17, 2026
827f617
docs(plans): add 2026-05-19 coverage ratchet + quality gates plan
andrew-bierman May 20, 2026
af2f382
docs(testing): migrate TESTING.md to docs/testing.md
andrew-bierman May 20, 2026
b4bf4e0
ci(coverage): add ratchet script and baseline file
andrew-bierman May 20, 2026
a72d6d4
chore(package-json): re-sort scripts after Phase 1 additions
andrew-bierman May 20, 2026
d76bd36
ci(coverage): add matrix-driven coverage workflow with ratchet gate
andrew-bierman May 20, 2026
491ebb2
fix(ci): coverage report action path doubling
andrew-bierman May 20, 2026
c4b01d5
docs(etl): pivot remediation plan from Queues+outbox to Workflows
andrew-bierman May 20, 2026
334fbdb
feat(etl): U1 Workflows spike (throwaway POC)
andrew-bierman May 20, 2026
9216908
feat(etl): U1 standalone spike worker — Workflows verified GO
andrew-bierman May 20, 2026
a32f738
feat(etl): U2 schema migration 0048 — Workflows-aware columns
andrew-bierman May 20, 2026
35a45d8
feat(etl): row-boundary-aligned R2 chunker (chunkCsvForR2)
andrew-bierman May 20, 2026
bcc7c9e
feat(etl): CatalogEtlWorkflow — durable ETL via Cloudflare Workflows
andrew-bierman May 20, 2026
eec7ec8
feat(etl): producer cutover — default to Workflow, retain queue fallback
andrew-bierman May 20, 2026
b99bb49
feat(etl): U4 validator hardening — close SSRF, IDN, length, charset …
andrew-bierman May 20, 2026
f92dacd
chore(etl): remove standalone spike worker; wire ETL_WORKFLOW into en…
andrew-bierman May 20, 2026
4af57df
fix(etl): drop `as Error` casts in CatalogEtlWorkflow
andrew-bierman May 20, 2026
fa6ceea
refactor(etl): slim U2 to workflow_instance_id + total_embedding_fail…
andrew-bierman May 20, 2026
1f8432f
feat(etl): U7 invalid_item_logs retention sweep
andrew-bierman May 20, 2026
a1f942c
feat(etl): U6 part 1 — structured logger + error propagation fixes
andrew-bierman May 20, 2026
53bb3a7
feat(etl): U5 (minimal) — workflow-aware retry + reconcile admin endp…
andrew-bierman May 20, 2026
64d1f67
docs(etl): U8 operator runbook for the Workflows pipeline
andrew-bierman May 20, 2026
4bac86e
fix(etl): CI failures — type errors, coverage threshold, hoisted mock
andrew-bierman May 20, 2026
4672fc8
feat(etl): migration 0050 — ETag fail-closed repair + supersession au…
andrew-bierman May 20, 2026
10dbf60
feat(etl): U6 part 2 — @sentry/cloudflare wiring
andrew-bierman May 20, 2026
cbae081
fix(etl): logger uses @packrat/guards type predicates instead of raw …
andrew-bierman May 20, 2026
0f1c057
fix(etl): drop isBoolean import — @packrat/guards doesn't export it
andrew-bierman May 20, 2026
cbab838
feat(etl): GET /api/admin/analytics/catalog/audit endpoint
andrew-bierman May 21, 2026
24423c1
refactor(db): drizzle.config schema path uses in-package re-export
andrew-bierman May 21, 2026
5187b6d
chore(etl): consolidate ETL migrations to single drizzle-kit-generate…
andrew-bierman May 21, 2026
9980ed4
fix: address P0/P1 review findings on ETL workflow
andrew-bierman May 21, 2026
51c77ed
docs: fix plan doc contradiction and stale runbook section
andrew-bierman May 21, 2026
a9e7c3e
🐛 fix: chunk boundary byte offset and retention returning type
andrew-bierman May 21, 2026
086ed13
🐛 fix(etl): address PR review feedback — chunker guards + docs
andrew-bierman May 21, 2026
5b031e1
Merge pull request #2462 from PackRat-AI/fix/etl-pipeline-workflows-m…
andrew-bierman May 21, 2026
8397d9e
fix: strip .csv from workflow instance ID (CF Workflows invalid_id)
andrew-bierman May 21, 2026
0f404b5
🧪 test(api): add unit tests for catalog ETL instanceId construction
andrew-bierman May 21, 2026
9513605
style(api): fix Biome useTemplate lint in instanceId test
andrew-bierman May 21, 2026
d32dff8
🛡️ fix(etl): handle malformed CSV rows gracefully instead of aborting
andrew-bierman May 21, 2026
7b1e6d2
🐛 fix(etl): reduce chunk size 20MB→5MB to prevent WorkflowTimeoutError
andrew-bierman May 21, 2026
f8f7be5
fix(api): clamp KV expirationTtl to minimum 60s (#2466)
mikib0 May 21, 2026
6353df4
🐛 fix(etl): use parser line number in on_skip error log
andrew-bierman May 21, 2026
36f1317
Merge pull request #2465 from PackRat-AI/fix/etl-catalog-sprint-fixes
andrew-bierman May 21, 2026
c64cf9b
✨ feat(etl): add JSONL/NDJSON support to catalog ETL pipeline
andrew-bierman May 21, 2026
603d281
🛠️ fix(json-utils): use @packrat/guards, add unit tests for coverage
andrew-bierman May 21, 2026
916732b
🛠️ fix(etl): replace unsafe casts with @packrat/guards, fix test
andrew-bierman May 21, 2026
2639f80
🛠️ fix(etl): address CR/Copilot comments — chunk skip, imports, types
andrew-bierman May 21, 2026
1b27205
🛠️ fix(json-utils): correct Biome import sort order
andrew-bierman May 21, 2026
4af87df
🛠️ fix(etl): drop explicit err type on on_skip to fix TS overload res…
andrew-bierman May 21, 2026
534e3f6
🛠️ fix(etl): guard err possibly-undefined in on_skip (TS18048)
andrew-bierman May 21, 2026
cd4e13e
🛠️ fix: use pre-computed `message` var in on_skip console.warn
andrew-bierman May 21, 2026
46da63e
🛠️ fix: collapse console.warn to single line for Biome formatter
andrew-bierman May 21, 2026
3af10be
fix(etl): capture csv pump promise to prevent silent hang on R2 errors
andrew-bierman May 21, 2026
3ce56fc
Merge pull request #2471 from PackRat-AI/feat/jsonl-etl-support
andrew-bierman May 21, 2026
58c03c3
fix(api/image-detection): make all schema fields required for OpenAI …
mikib0 May 21, 2026
5049a6f
fix(etl): reduce chunk size 5MB→2MB to clear Marmot WorkflowTimeoutError
andrew-bierman May 21, 2026
06081d7
Merge pull request #2472 from PackRat-AI/fix/image-detection-openai-s…
mikib0 May 21, 2026
d096a4a
fix(etl): address Copilot review — generic comment, doc alignment, ch…
andrew-bierman May 22, 2026
7a63f84
Merge pull request #2473 from PackRat-AI/fix/marmot-chunk-size
andrew-bierman May 22, 2026
13efe08
fix(etl): guard variants.values.join crash when values is a string sc…
andrew-bierman May 22, 2026
fdf16c3
✅ test(etl): cover string-values variant branch in embeddingHelper
andrew-bierman May 22, 2026
1b7cf32
✨ feat(etl): expose failureRate, embeddingFailures, and verification …
andrew-bierman May 22, 2026
ed92701
Merge pull request #2475 from PackRat-AI/fix/etl-variants-join-crash
andrew-bierman May 23, 2026
799a4d0
Merge pull request #2455 from PackRat-AI/chore/ramp-test-coverage
andrew-bierman May 23, 2026
62b65a1
Merge pull request #2476 from PackRat-AI/feat/etl-job-quality-fields
andrew-bierman May 23, 2026
57ac5e5
fix(catalog): allow unknown item weights
andrew-bierman May 23, 2026
2411875
fix(catalog): handle nullable weights in clients
andrew-bierman May 23, 2026
f4b4298
test(api): cover logger forwarding paths
andrew-bierman May 23, 2026
1bcf0ad
test(api): cover json catalog mapping branches
andrew-bierman May 23, 2026
db8f10a
test(api): cover csv catalog mapping branches
andrew-bierman May 23, 2026
889aaa2
test(api): cover timing safe comparison branch
andrew-bierman May 23, 2026
6e6c4a1
Merge pull request #2481 from PackRat-AI/fix-ai-chat-catalog-null-weight
andrew-bierman May 23, 2026
e1f3543
fix(api): guard catalog vector search embeddings
andrew-bierman May 23, 2026
6770217
Merge pull request #2483 from PackRat-AI/codex/hotfix-catalog-vector-…
andrew-bierman May 23, 2026
4540b91
chore: bump version to v2.0.27
mikib0 May 29, 2026
68f2d96
chore: merge main into release/v2.0.27
mikib0 May 29, 2026
c020fee
Potential fix for pull request finding 'CodeQL / Workflow does not co…
mikib0 May 31, 2026
c46e448
Merge pull request #2515 from PackRat-AI/release/v2.0.27
mikib0 May 31, 2026
74aef2a
🐛 fix(api): complete single-object-args migration in json-utils + tests
andrew-bierman Jun 1, 2026
84fc13f
🐛 fix(mcp): update client.test call sites to single-object call() sig…
andrew-bierman Jun 1, 2026
472a21a
♻️ fix(api): satisfy no-owned-max-params — convert owned fns, exempt …
andrew-bierman Jun 1, 2026
25acaf4
🐛 fix(overpass): single-object queryOverpass + mock cast in client.test
andrew-bierman Jun 1, 2026
deab5b8
✅ test(analytics): cover dbPath + loadMetadata invalid-JSON path
andrew-bierman Jun 1, 2026
082aab9
✅ test(api): cover sentry.ts helpers (restore ratchet baseline)
andrew-bierman Jun 1, 2026
af299ec
✅ test(expo): cover getRelativeTime Date-object + no-translator branches
andrew-bierman Jun 1, 2026
4fe7201
✅ test(analytics): cover SpecParser getProductSpecs + filterProducts
andrew-bierman Jun 1, 2026
4b8ef08
🐛 fix(analytics): type-safe mock.calls access in spec-parser test
andrew-bierman Jun 1, 2026
ec0223b
🔒️ fix(checks): match WorkflowEntrypoint heritage exactly, not by sub…
andrew-bierman Jun 1, 2026
2964e6b
Merge pull request #2530 from PackRat-AI/fix/complete-max-params-migr…
andrew-bierman Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 280 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
name: Coverage

on:
push:
branches: ["main", "development"]
paths:
- "package.json"
- "bun.lock"
- "apps/**"
- "packages/**"
- "scripts/lint/coverage-ratchet.ts"
- "scripts/lint/coverage-baseline-update.ts"
- "scripts/lint/no-weak-assertions.ts"
- "scripts/vitest.config.ts"
- "coverage-baselines.json"
- ".github/workflows/coverage.yml"
pull_request:
branches: ["**"]
paths:
- "package.json"
- "bun.lock"
- "apps/**"
- "packages/**"
- "scripts/lint/coverage-ratchet.ts"
- "scripts/lint/coverage-baseline-update.ts"
- "scripts/lint/no-weak-assertions.ts"
- "scripts/vitest.config.ts"
- "coverage-baselines.json"
- ".github/workflows/coverage.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write # for baseline auto-commit on main
pull-requests: write # for vitest-coverage-report-action comments
Comment on lines +36 to +38

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Scope permissions to jobs, not workflow-level.

Workflow-level contents: write and pull-requests: write grant excessive permissions to all jobs. Only bump-baseline needs contents: write (and only on main), and only coverage needs pull-requests: write (for PR comments). The scripts-tests and ratchet jobs don't need write permissions at all.

🔒 Recommended fix: move permissions to job level
-permissions:
-  contents: write       # for baseline auto-commit on main
-  pull-requests: write  # for vitest-coverage-report-action comments
+permissions:
+  contents: read

 jobs:
   coverage:
     name: Coverage (${{ matrix.name }})
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      pull-requests: write  # for vitest-coverage-report-action
     strategy:
   ratchet:
     name: Coverage Ratchet
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     needs: coverage
   bump-baseline:
     name: Bump Coverage Baselines
     runs-on: ubuntu-latest
+    permissions:
+      contents: write  # for git-auto-commit-action
     needs: ratchet
   scripts-tests:
     name: Scripts Tests
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     steps:

As per coding guidelines: minimize permissions scope to reduce supply-chain attack surface.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions:
contents: write # for baseline auto-commit on main
pull-requests: write # for vitest-coverage-report-action comments
permissions:
contents: read
jobs:
coverage:
name: Coverage (${{ matrix.name }})
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # for vitest-coverage-report-action
strategy:
🧰 Tools
🪛 zizmor (1.25.2)

[error] 37-37: overly broad permissions (excessive-permissions): contents: write is overly broad at the workflow level

(excessive-permissions)


[error] 38-38: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level

(excessive-permissions)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/coverage.yml around lines 36 - 38, Move the workflow-level
permissions into each job: remove the top-level "permissions: contents: write"
and "pull-requests: write" and instead add "permissions: contents: write" only
to the bump-baseline job (and guard that job to run on main), add "permissions:
pull-requests: write" only to the coverage job, and leave scripts-tests and
ratchet jobs with no write permissions (or with minimal default read-only
permissions). Update the bump-baseline and coverage job definitions to include
these job-scoped permissions so only those jobs have the elevated rights.


jobs:
# One coverage run per tracked workspace. Uploads the coverage-summary.json
# as an artifact for the ratchet job to aggregate.
coverage:
name: Coverage (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# `summary_path` / `final_path` are repo-relative (used by artifact
# upload + ratchet restore). `summary_relative` / `final_relative`
# are relative to `working_directory` (used by the coverage report
# action, which joins them with working_directory internally).
- name: packages/api
artifact_slug: packages-api
test_command: bun run --cwd packages/api test:unit:coverage
summary_path: packages/api/coverage/unit/coverage-summary.json
final_path: packages/api/coverage/unit/coverage-final.json
summary_relative: ./coverage/unit/coverage-summary.json
final_relative: ./coverage/unit/coverage-final.json
vite_config_path: ./vitest.unit.config.ts
working_directory: ./packages/api
- name: apps/expo
artifact_slug: apps-expo
test_command: bun run --cwd apps/expo test:coverage
summary_path: apps/expo/coverage/unit/coverage-summary.json
final_path: apps/expo/coverage/unit/coverage-final.json
summary_relative: ./coverage/unit/coverage-summary.json
final_relative: ./coverage/unit/coverage-final.json
vite_config_path: ./vitest.config.ts
working_directory: ./apps/expo
- name: packages/mcp
artifact_slug: packages-mcp
test_command: bun run --cwd packages/mcp test --coverage
summary_path: packages/mcp/coverage/coverage-summary.json
final_path: packages/mcp/coverage/coverage-final.json
summary_relative: ./coverage/coverage-summary.json
final_relative: ./coverage/coverage-final.json
vite_config_path: ./vitest.config.ts
working_directory: ./packages/mcp
- name: packages/analytics
artifact_slug: packages-analytics
test_command: bun run --cwd packages/analytics test --coverage
summary_path: packages/analytics/coverage/coverage-summary.json
final_path: packages/analytics/coverage/coverage-final.json
summary_relative: ./coverage/coverage-summary.json
final_relative: ./coverage/coverage-final.json
vite_config_path: ./vitest.config.ts
working_directory: ./packages/analytics
- name: packages/overpass
artifact_slug: packages-overpass
test_command: bun run --cwd packages/overpass test --coverage
summary_path: packages/overpass/coverage/coverage-summary.json
final_path: packages/overpass/coverage/coverage-final.json
summary_relative: ./coverage/coverage-summary.json
final_relative: ./coverage/coverage-final.json
vite_config_path: ./vitest.config.ts
working_directory: ./packages/overpass
- name: packages/units
artifact_slug: packages-units
test_command: bun run --cwd packages/units test --coverage
summary_path: packages/units/coverage/coverage-summary.json
final_path: packages/units/coverage/coverage-final.json
summary_relative: ./coverage/coverage-summary.json
final_relative: ./coverage/coverage-final.json
vite_config_path: ./vitest.config.ts
working_directory: ./packages/units
steps:
- uses: actions/checkout@v6

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add persist-credentials: false to read-only checkouts.

Three checkout actions in jobs that don't push changes should disable credential persistence to minimize supply-chain risk.

🔐 Recommended fix
       - uses: actions/checkout@v6
+        with:
+          persist-credentials: false

Apply to the checkouts in coverage, ratchet, and scripts-tests jobs. The bump-baseline job's checkout (line 212) correctly preserves credentials since it needs to push.

Also applies to: 150-150, 271-271

🧰 Tools
🪛 zizmor (1.25.2)

[warning] 109-109: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 109-109: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/coverage.yml at line 109, Several checkout steps in the CI
workflow (the actions/checkout@v6 usages in the coverage, ratchet, and
scripts-tests jobs) are leaving credentials persisted; update each of those
checkout steps to include persist-credentials: false so they perform read-only
checkouts and reduce supply-chain risk, while leaving the bump-baseline job's
checkout unchanged because it needs push credentials.


- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
env:
PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN: ${{ secrets.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN }}
run: bun install --frozen-lockfile

- name: Run coverage for ${{ matrix.name }}
run: ${{ matrix.test_command }}

- name: Report coverage on PR
if: always() && github.event_name == 'pull_request'
uses: davelosert/vitest-coverage-report-action@v2
with:
name: ${{ matrix.name }}
json-summary-path: ${{ matrix.summary_relative }}
json-final-path: ${{ matrix.final_relative }}
vite-config-path: ${{ matrix.vite_config_path }}
working-directory: ${{ matrix.working_directory }}

- name: Upload coverage summary artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-summary-${{ matrix.artifact_slug }}
path: ${{ matrix.summary_path }}
if-no-files-found: error
retention-days: 7

# Aggregate every workspace's coverage-summary.json and run the ratchet.
# Fails the workflow if any workspace dropped below its baseline.
ratchet:
name: Coverage Ratchet
runs-on: ubuntu-latest
needs: coverage
if: always()
steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
env:
PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN: ${{ secrets.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN }}
run: bun install --frozen-lockfile

- name: Download all coverage summaries
uses: actions/download-artifact@v4
with:
pattern: coverage-summary-*
path: artifacts

- name: Restore summaries to their workspace paths
run: |
set -euo pipefail
# Each artifact arrives as artifacts/coverage-summary-<slug>/<path-without-leading-dir>
# actions/download-artifact@v4 unzips a single-file artifact into a directory
# named after the artifact, preserving the source file's basename.
# Copy each back to its expected location so coverage-baselines.json's
# summaryPath entries resolve.
declare -A targets=(
[packages-api]=packages/api/coverage/unit/coverage-summary.json
[apps-expo]=apps/expo/coverage/unit/coverage-summary.json
[packages-mcp]=packages/mcp/coverage/coverage-summary.json
[packages-analytics]=packages/analytics/coverage/coverage-summary.json
[packages-overpass]=packages/overpass/coverage/coverage-summary.json
[packages-units]=packages/units/coverage/coverage-summary.json
)
for slug in "${!targets[@]}"; do
target="${targets[$slug]}"
src_dir="artifacts/coverage-summary-${slug}"
if [ ! -d "$src_dir" ]; then
echo "::warning::missing artifact for $slug — coverage job may have failed"
continue
fi
mkdir -p "$(dirname "$target")"
# Find the single JSON file inside (path may be flat or preserved).
src_file=$(find "$src_dir" -name 'coverage-summary.json' | head -n1)
if [ -z "$src_file" ]; then
echo "::warning::no coverage-summary.json inside artifacts/coverage-summary-${slug}"
continue
fi
cp "$src_file" "$target"
echo "restored $slug → $target"
done

- name: Run coverage ratchet
run: bun check:coverage

# On a green push to main, auto-bump coverage-baselines.json upward.
# Never runs on PRs — PRs cannot edit the baseline file silently.
bump-baseline:
name: Bump Coverage Baselines
runs-on: ubuntu-latest
needs: ratchet
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v6
with:
# Need full token to push the auto-commit back to main.
token: ${{ secrets.GITHUB_TOKEN }}

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
env:
PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN: ${{ secrets.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN }}
run: bun install --frozen-lockfile

- name: Download all coverage summaries
uses: actions/download-artifact@v4
with:
pattern: coverage-summary-*
path: artifacts

- name: Restore summaries to their workspace paths
run: |
set -euo pipefail
declare -A targets=(
[packages-api]=packages/api/coverage/unit/coverage-summary.json
[apps-expo]=apps/expo/coverage/unit/coverage-summary.json
[packages-mcp]=packages/mcp/coverage/coverage-summary.json
[packages-analytics]=packages/analytics/coverage/coverage-summary.json
[packages-overpass]=packages/overpass/coverage/coverage-summary.json
[packages-units]=packages/units/coverage/coverage-summary.json
)
for slug in "${!targets[@]}"; do
target="${targets[$slug]}"
src_dir="artifacts/coverage-summary-${slug}"
if [ ! -d "$src_dir" ]; then
continue
fi
mkdir -p "$(dirname "$target")"
src_file=$(find "$src_dir" -name 'coverage-summary.json' | head -n1)
if [ -n "$src_file" ]; then
cp "$src_file" "$target"
fi
done

- name: Compute baseline updates
run: bun check:coverage:update

- name: Commit baseline updates
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: "chore(coverage): bump baselines after green main"
file_pattern: coverage-baselines.json

# The scripts test suite — verifies the ratchet and assertion-lint analyzers
# themselves on every PR that touches them or their tests.
scripts-tests:
name: Scripts Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
env:
PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN: ${{ secrets.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN }}
run: bun install --frozen-lockfile
- name: Run scripts test suite
run: bun test:scripts
Comment on lines +109 to +280

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.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Fetch latest commit SHAs for the action versions currently in use

echo "actions/checkout@v6:"
gh api repos/actions/checkout/commits/refs/tags/v6 --jq '.sha'

echo "oven-sh/setup-bun@v2:"
gh api repos/oven-sh/setup-bun/commits/refs/tags/v2 --jq '.sha'

echo "davelosert/vitest-coverage-report-action@v2:"
gh api repos/davelosert/vitest-coverage-report-action/commits/refs/tags/v2 --jq '.sha'

echo "actions/upload-artifact@v4:"
gh api repos/actions/upload-artifact/commits/refs/tags/v4 --jq '.sha'

echo "actions/download-artifact@v4:"
gh api repos/actions/download-artifact/commits/refs/tags/v4 --jq '.sha'

echo "stefanzweifel/git-auto-commit-action@v6:"
gh api repos/stefanzweifel/git-auto-commit-action/commits/refs/tags/v6 --jq '.sha'

Repository: PackRat-AI/PackRat

Length of output: 495


Pin GitHub Actions in .github/workflows/coverage.yml to commit SHAs.

All uses: entries reference mutable tags; pin them to the following SHAs (update every occurrence):

  • actions/checkout@v6actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
  • oven-sh/setup-bun@v2oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
  • davelosert/vitest-coverage-report-action@v2davelosert/vitest-coverage-report-action@02f3c2e641286b7fa308cd3e430783103ce6103b
  • actions/upload-artifact@v4actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
  • actions/download-artifact@v4actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
  • stefanzweifel/git-auto-commit-action@v6stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 109-109: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 150-150: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 212-215: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 271-271: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 121-121: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[error] 109-109: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 111-111: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 125-125: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 135-135: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 150-150: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 152-152: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 162-162: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 212-212: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 217-217: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 227-227: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 260-260: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 271-271: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 272-272: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[info] 260-260: action functionality is already included by the runner (superfluous-actions): use git add, git commit, and git push in a script step

(superfluous-actions)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/coverage.yml around lines 109 - 280, Replace all mutable
action tags in the workflow with the provided commit SHAs: change every
occurrence of actions/checkout@v6 →
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd, oven-sh/setup-bun@v2
→ oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6,
davelosert/vitest-coverage-report-action@v2 →
davelosert/vitest-coverage-report-action@02f3c2e641286b7fa308cd3e430783103ce6103b,
actions/upload-artifact@v4 →
actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02,
actions/download-artifact@v4 →
actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093, and
stefanzweifel/git-auto-commit-action@v6 →
stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0;
ensure you update every use of the symbols (each uses: line) in the file so no
mutable tags remain.

3 changes: 3 additions & 0 deletions .github/workflows/eas-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
required: false
type: string

permissions:
contents: read

jobs:
update:
name: Publish EAS Update
Expand Down
99 changes: 0 additions & 99 deletions .github/workflows/unit-tests.yml

This file was deleted.

Loading
Loading