Skip to content

Conversation

@sxlijin
Copy link
Collaborator

@sxlijin sxlijin commented Jan 5, 2026

https://discord.com/channels/1119368998161752075/1456644449466581125

[2:46 PM]baml-sam: Aha! I have it!
[2:47 PM]baml-sam: If you're inside the venv, and you run baml-cli init before baml-py is installed, the shell will cache the path to the global baml-cli install
[2:49 PM]baml-sam: After you install baml-py, the shell will continue to use the cached global baml-cli
[2:50 PM]baml-sam: Shell path resolution caching does use PATH in the cache key, but the cache key doesn't respect filesystem state

@vercel
Copy link

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
promptfiddle Skipped Skipped Jan 5, 2026 7:04pm

Comment on lines +29 to +55
name: "wasm-pack test"
runs-on: ubuntu-latest
if: ${{ inputs.code_changed == 'true' || inputs.run_all }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: Swatinem/rust-cache@v2
with:
workspaces: "baml_language -> target"

- name: "Install Rust toolchain"
run: |
rustup show
rustup target add wasm32-unknown-unknown
working-directory: baml_language

- name: "Install wasm-pack"
uses: taiki-e/install-action@v2
with:
tool: wasm-pack

- name: "Run wasm-pack tests (baml_playground_wasm)"
run: wasm-pack test --node crates/baml_playground_wasm
working-directory: baml_language

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 days ago

In general, to fix this kind of issue you add a permissions block either at the top level of the workflow (to apply to all jobs) or within the specific job. The block should grant only the minimal scopes required (often contents: read for simple CI/test workflows).

For this workflow, the single best fix is to add a workflow-level permissions block granting only contents: read. This will apply to the wasm-pack-test job and any future jobs that do not override it, and it should not change existing behavior because the steps only read the repository and run tests. Concretely, in .github/workflows/wasm-pack-tests.reusable.yaml, insert:

permissions:
  contents: read

near the top, after the on: section (or after concurrency: if you prefer), while keeping indentation consistent with other top-level keys. No additional imports or definitions are needed; it is purely a YAML configuration change.

Suggested changeset 1
.github/workflows/wasm-pack-tests.reusable.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/wasm-pack-tests.reusable.yaml b/.github/workflows/wasm-pack-tests.reusable.yaml
--- a/.github/workflows/wasm-pack-tests.reusable.yaml
+++ b/.github/workflows/wasm-pack-tests.reusable.yaml
@@ -10,6 +10,9 @@
         required: true
         type: boolean
 
+permissions:
+  contents: read
+
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}-wasm-pack-tests
   cancel-in-progress: true
EOF
@@ -10,6 +10,9 @@
required: true
type: boolean

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-wasm-pack-tests
cancel-in-progress: true
Copilot is powered by AI and may make mistakes. Always verify output.
with:
persist-credentials: false

- uses: Swatinem/rust-cache@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'WASM Pack Tests (Reusable)' step
Uses Step
uses 'Swatinem/rust-cache' with ref 'v2', not a pinned commit hash
working-directory: baml_language

- name: "Install wasm-pack"
uses: taiki-e/install-action@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'WASM Pack Tests (Reusable)' step
Uses Step
uses 'taiki-e/install-action' with ref 'v2', not a pinned commit hash
Comment on lines +23 to +71
name: "Unit Tests (jsdom)"
runs-on: ubuntu-latest
if: ${{ inputs.code_changed == 'true' || inputs.run_all }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: "Setup pnpm"
uses: pnpm/action-setup@v4
with:
version: 9

- name: "Setup Node.js"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: typescript2/pnpm-lock.yaml

- name: "Install dependencies"
run: pnpm install --frozen-lockfile
working-directory: typescript2

- uses: Swatinem/rust-cache@v2
with:
workspaces: "baml_language -> target"

- name: "Install Rust toolchain"
run: |
rustup show
rustup target add wasm32-unknown-unknown
working-directory: baml_language

- name: "Install wasm-pack"
uses: taiki-e/install-action@v2
with:
tool: wasm-pack

- name: "Build WASM"
run: pnpm --filter pkg-playground build:wasm
working-directory: typescript2

- name: "Run unit tests"
run: pnpm --filter app-vscode-webview test:unit:run
working-directory: typescript2

browser-tests:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 days ago

To fix the problem, explicitly restrict the GITHUB_TOKEN permissions used by this workflow. The safest approach is to add a permissions block at the workflow root so it applies to all jobs unless overridden. Based on the current steps, the jobs only need to read the repository contents (for actions/checkout), and do not need any write scopes or other resource permissions.

Concretely:

  • Edit .github/workflows/webview-tests.reusable.yaml.
  • Add a root-level permissions: block after the on: section (before concurrency:), setting contents: read.
  • No other permissions or changes to steps are required, since there is no evidence of needing write access or other scopes.

This keeps existing functionality intact while ensuring least-privilege for the GITHUB_TOKEN in both unit-tests and browser-tests jobs.

Suggested changeset 1
.github/workflows/webview-tests.reusable.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/webview-tests.reusable.yaml b/.github/workflows/webview-tests.reusable.yaml
--- a/.github/workflows/webview-tests.reusable.yaml
+++ b/.github/workflows/webview-tests.reusable.yaml
@@ -10,6 +10,9 @@
         required: true
         type: boolean
 
+permissions:
+  contents: read
+
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}-webview-tests
   cancel-in-progress: true
EOF
@@ -10,6 +10,9 @@
required: true
type: boolean

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-webview-tests
cancel-in-progress: true
Copilot is powered by AI and may make mistakes. Always verify output.
persist-credentials: false

- name: "Setup pnpm"
uses: pnpm/action-setup@v4

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Webview Tests (Reusable)' step
Uses Step
uses 'pnpm/action-setup' with ref 'v4', not a pinned commit hash
working-directory: baml_language

- name: "Install wasm-pack"
uses: taiki-e/install-action@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Webview Tests (Reusable)' step
Uses Step
uses 'taiki-e/install-action' with ref 'v2', not a pinned commit hash
Comment on lines +72 to +122
name: "Browser Tests (Playwright)"
runs-on: ubuntu-latest
if: ${{ inputs.code_changed == 'true' || inputs.run_all }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: "Setup pnpm"
uses: pnpm/action-setup@v4
with:
version: 9

- name: "Setup Node.js"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: typescript2/pnpm-lock.yaml

- name: "Install dependencies"
run: pnpm install --frozen-lockfile
working-directory: typescript2

- uses: Swatinem/rust-cache@v2
with:
workspaces: "baml_language -> target"

- name: "Install Rust toolchain"
run: |
rustup show
rustup target add wasm32-unknown-unknown
working-directory: baml_language

- name: "Install wasm-pack"
uses: taiki-e/install-action@v2
with:
tool: wasm-pack

- name: "Build WASM"
run: pnpm --filter pkg-playground build:wasm
working-directory: typescript2

- name: "Install Playwright browsers"
run: npx playwright install chromium
working-directory: typescript2/app-vscode-webview

- name: "Run browser tests"
run: pnpm --filter app-vscode-webview test:browser:run
working-directory: typescript2

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 days ago

In general, to fix this kind of issue you explicitly define a permissions block for the workflow or for individual jobs, restricting the GITHUB_TOKEN to the least privileges needed. For pure build/test workflows that only need to read the repository, contents: read is usually sufficient.

For this specific file, the simplest fix that does not change functionality is to add a root-level permissions block (so it applies to all jobs) with contents: read. No steps in unit-tests or browser-tests need write access to GitHub resources, so this should not break anything. The best place is right after the on: block and before concurrency: to keep the YAML well-organized. No imports or additional methods are needed; this is a pure YAML configuration change within .github/workflows/webview-tests.reusable.yaml.

Suggested changeset 1
.github/workflows/webview-tests.reusable.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/webview-tests.reusable.yaml b/.github/workflows/webview-tests.reusable.yaml
--- a/.github/workflows/webview-tests.reusable.yaml
+++ b/.github/workflows/webview-tests.reusable.yaml
@@ -10,6 +10,9 @@
         required: true
         type: boolean
 
+permissions:
+  contents: read
+
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}-webview-tests
   cancel-in-progress: true
EOF
@@ -10,6 +10,9 @@
required: true
type: boolean

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-webview-tests
cancel-in-progress: true
Copilot is powered by AI and may make mistakes. Always verify output.
persist-credentials: false

- name: "Setup pnpm"
uses: pnpm/action-setup@v4

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Webview Tests (Reusable)' step
Uses Step
uses 'pnpm/action-setup' with ref 'v4', not a pinned commit hash
run: pnpm install --frozen-lockfile
working-directory: typescript2

- uses: Swatinem/rust-cache@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Webview Tests (Reusable)' step
Uses Step
uses 'Swatinem/rust-cache' with ref 'v2', not a pinned commit hash
working-directory: baml_language

- name: "Install wasm-pack"
uses: taiki-e/install-action@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Webview Tests (Reusable)' step
Uses Step
uses 'taiki-e/install-action' with ref 'v2', not a pinned commit hash
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 5, 2026

CodSpeed Performance Report

Merging #2918 will not alter performance

Comparing sam/path-check (c62bbc2) with canary (6e39706)

Summary

✅ 15 untouched
⏩ 14 skipped1

Footnotes

  1. 14 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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