Skip to content

fix: Allow manually running the tree-shake test workflow - #3318

Merged
iwoplaza merged 1 commit into
releasefrom
fix/treeshake-workflow-dispatch
Nov 5, 2026
Merged

iwoplaza merged 1 commit into
releasefrom
fix/treeshake-workflow-dispatch

Conversation

@iwoplaza

@iwoplaza iwoplaza commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

The job's if condition skipped every workflow_dispatch run, since there's no pull_request in the event.

@iwoplaza
iwoplaza marked this pull request as ready for review November 4, 2026 13:03
Copilot AI balanced review requested due to automatic review settings November 4, 2026 13:03
@iwoplaza
iwoplaza changed the base branch from main to release November 4, 2026 13:03
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

pkg.pr.new

No packages changed since release

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased ❔ Unknown
0 355 0 0

No notable changes.

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

( ◦°^°◦) 🧭 Aye, I charted this one-line workflow fix and she be sound for manual dispatch, matey.

Reviewed changes

  • Manual dispatch guard — the job if now short-circuits on github.event_name == 'workflow_dispatch', so manual runs are no longer skipped, while fork PRs stay skipped via the original head.repo.full_name check.
  • Dispatch path — verified the rest of the job behaves correctly without a pull_request in the payload: target_branch supplies the comparison ref, checkout uses the dispatched ref, and the comment step logs and skips because context.issue.number is undefined (results still land in the step summary).

One non-blocking observation: manual dispatch is the only path that passes --webpack, and it has never actually executed in CI (all five workflow_dispatch runs are skipped). The first manual run will also be the first CI exercise of that path, so it is worth watching for heap pressure in the named variant.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Resolution Time Benchmark

---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.46, 0.96, 2.26, 3.18, 3.64, 6.52, 12.58, 12.85]
  line [0.53, 1.06, 2.06, 3.19, 3.59, 6.61, 13.27, 11.56]
  line [0.56, 1.06, 2.23, 3.02, 3.79, 6.99, 13.84, 12.66]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.16, 0.29, 0.39, 0.48, 0.62, 0.62, 0.76, 0.89]
  line [0.14, 0.25, 0.37, 0.49, 0.63, 0.64, 0.76, 0.83]
  line [0.13, 0.25, 0.35, 0.45, 0.61, 0.61, 0.80, 0.85]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.50, 1.19, 1.96, 4.11, 6.70, 13.65, 30.27, 58.97]
  line [0.52, 1.20, 2.01, 4.18, 7.00, 13.78, 28.64, 59.26]
  line [0.58, 1.26, 1.94, 3.77, 7.86, 14.52, 30.43, 60.06]
Loading

Copilot AI left a comment

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.

🔵 Needs a closer look

The change rejects valid numeric-string vector indexing and permits repeated-component swizzle assignments that are invalid in WGSL.

No open issues 🎉

What changed in this PR

Enables manually dispatched tree-shake tests while retaining the existing pull-request restriction. The PR also includes broader TypeGPU, ecosystem, documentation, and testing updates.

Changes:

  • Allows manual tree-shake runs and adds a Lavapipe-backed GPU-testing workflow.
  • Updates shader generation, vector swizzles, schema memory layouts, declarations, and stable encoder APIs.
  • Extends GPU algorithms and tone mapping, improves WebGL resource management, and updates CLI dependency versioning, tests, and examples.

This pull request requires changes. Four unresolved review comments need to be addressed:

  • packages/typegpu/src/data/alignmentOf.ts:74 — moderate, 1 vote: Size-only decorators lose inherited struct alignment. Preserve it by recursing through regular decorated schemas when no explicit alignment is present.
  • packages/typegpu/src/tgsl/accessIndex.ts:68 — moderate, 1 vote: Valid numeric-string vector indices such as v['0'] are rejected as swizzles. Normalize them to numeric indices before constructing the swizzle.
  • packages/typegpu/src/tgsl/swizzle.ts:94 — moderate, 2 votes: Numeric-string tuple indices also regress comptime vector access. Normalize canonical component indices before validating swizzle names.
  • packages/typegpu/src/tgsl/wgslGenerator.ts:2196 — moderate, 2 votes: Repeated-component swizzle assignments such as v.xx = ... pass mutation validation despite being invalid WGSL. Reject duplicate components during resolution.
File Description
pnpm-workspace.yaml Registers the native WebGPU test dependency.
packages/​typegpu/​tests/​vertexLayout.test.ts Tests nested struct vertex offsets.
packages/​typegpu/​tests/​vector.test.ts Tests vector indexing and comptime behavior.
packages/​typegpu/​tests/​unstruct.test.ts Tests packed nested structs and alignment.
packages/​typegpu/​tests/​unroll.test.ts Updates vector-access snapshots.
packages/​typegpu/​tests/​tgsl/​wgslGenerator.test.ts Tests square optimization and vector accesses.
packages/​typegpu/​tests/​tgsl/​memberAccess.test.ts Updates swizzle metadata assertions.
packages/​typegpu/​tests/​schemaPrototype.test.ts Tests callable schema prototypes.
packages/​typegpu/​tests/​renderPipeline.test.ts Tests entry-function type assignability.
packages/​typegpu/​tests/​internal/​schemaMemoryLayoutCache.test.ts Tests nested layout caching.
packages/​typegpu/​tests/​internal/​partialIo.test.ts Tests loose-schema padding and strides.
packages/​typegpu/​tests/​internal/​generationHelpers.test.ts Updates swizzle representation assertions.
packages/​typegpu/​tests/​internal/​babelCommonJs.test.ts Tests Babel CommonJS output validity.
packages/​typegpu/​tests/​internal/​arrayBufferIO.noEval.test.ts Tests fallback writers with nested alignment.
packages/​typegpu/​tests/​immediates.test.ts Uses stable render-bundle encoders.
packages/​typegpu/​tests/​guardedComputePipeline.test.ts Uses stable command encoders.
packages/​typegpu/​tests/​disarray.test.ts Tests inherited alignment and element strides.
packages/​typegpu/​tests/​declare.test.ts Tests declaration dereferencing and resolution.
packages/​typegpu/​tests/​data/​sizeOf.test.ts Tests shader-time size queries.
packages/​typegpu/​tests/​data/​alignmentOf.test.ts Tests shader-time alignment queries.
packages/​typegpu/​tests/​computePipeline.test.ts Updates encoder calls and type assertions.
packages/​typegpu/​tests/​bufferBindings.test.ts Tests direct template buffer references.
packages/​typegpu/​tests/​bindGroupLayout.test.ts Tests textures as external-texture inputs.
packages/​typegpu/​tests/​attributes.test.ts Tests replacement of duplicate attributes.
packages/​typegpu/​src/​tgsl/​wgslGenerator.ts Updates exponentiation, comptime branches, and mutation validation.
packages/​typegpu/​src/​tgsl/​swizzle.ts Introduces resolvable vector swizzle objects.
packages/​typegpu/​src/​tgsl/​generationHelpers.ts Reorders imports.
packages/​typegpu/​src/​tgsl/​accessProp.ts Routes vector properties through swizzles.
packages/​typegpu/​src/​tgsl/​accessIndex.ts Routes known vector indices through swizzles.
packages/​typegpu/​src/​tgpuUnstableNamespace.ts Adds a Babel-compatible namespace barrel.
packages/​typegpu/​src/​tgpuBindGroupLayout.ts Expands external-texture binding inputs.
packages/​typegpu/​src/​tgpu.ts Updates the unstable-namespace re-export.
packages/​typegpu/​src/​std/​numeric.ts Optimizes side-effect-free squares to multiplication.
packages/​typegpu/​src/​data/​wgslTypes.ts Types writable permutation swizzles.
packages/​typegpu/​src/​data/​vectorImpl.ts Adds permutation swizzle setters.
packages/​typegpu/​src/​data/​unstruct.ts Preserves standard Function prototype methods.
packages/​typegpu/​src/​data/​struct.ts Preserves standard Function prototype methods.
packages/​typegpu/​src/​data/​sizeOf.ts Makes public size queries comptime-callable.
packages/​typegpu/​src/​data/​schemasEqual.ts Compares deduplicated attribute collections.
packages/​typegpu/​src/​data/​schemaMemoryLayout.ts Caches nested layouts and centralizes strides.
packages/​typegpu/​src/​data/​partialIO.ts Uses schema-specific array strides.
packages/​typegpu/​src/​data/​offsetUtils.ts Supports loose schemas and packed-format offsets.
packages/​typegpu/​src/​data/​offsets.ts Removes extra unstruct trailing padding.
packages/​typegpu/​src/​data/​disarray.ts Preserves standard Function prototype methods.
packages/​typegpu/​src/​data/​compiledIO.ts Uses centralized array strides.
packages/​typegpu/​src/​data/​attributes.ts Replaces attributes of matching kinds.
packages/​typegpu/​src/​data/​array.ts Preserves standard Function prototype methods.
packages/​typegpu/​src/​data/​alignmentOf.ts Updates custom alignment and supports comptime queries.
packages/​typegpu/​src/​core/​vertexLayout/​vertexLayout.ts Uses shared member offsets and strides.
packages/​typegpu/​src/​core/​root/​rootTypes.ts Promotes typed encoder APIs to stable methods.
packages/​typegpu/​src/​core/​pipeline/​webgpuLimitations.ts Uses shared strides for uniform checks.
packages/​typegpu/​src/​core/​pipeline/​drawState.ts Updates encoder guidance in warnings.
packages/​typegpu/​src/​core/​function/​tgpuVertexFn.ts Widens bare vertex-function assignability.
packages/​typegpu/​src/​core/​function/​tgpuFragmentFn.ts Widens bare fragment-function assignability.
packages/​typegpu/​src/​core/​declare/​tgpuDeclare.ts Adds declaration dereferencing and JavaScript no-op behavior.
packages/​typegpu/​src/​core/​commandEncoder/​commandEncoder.ts Updates the documentation example to the stable API.
packages/​typegpu/​src/​common/​writeSoA.ts Uses shared strides for scatter writes.
packages/​typegpu/​package.json Adds Babel regression-test dependencies.
packages/​typegpu-testing-utility/​src/​gpu.ts Adds real-device fixtures and deterministic inputs.
packages/​typegpu-testing-utility/​package.json Exports GPU fixtures and adds WebGPU.
packages/​typegpu-radiance-cascades/​src/​runner.ts Uses stable command encoders.
packages/​typegpu-radiance-cascades/​src/​holographic/​index.ts Uses stable command encoders.
packages/​typegpu-gl/​tests/​webglFallback.test.ts Tests texture and framebuffer destruction.
packages/​typegpu-gl/​tests/​utils/​extendedTest.ts Gives mock resources distinct identities.
packages/​typegpu-gl/​tests/​uniforms.test.ts Tests uniform bindings across programs and stages.
packages/​typegpu-gl/​tests/​garbageCollection.test.ts Tests resource retention and collection.
packages/​typegpu-gl/​src/​webglTexture.ts Adds texture-destruction cleanup callbacks.
packages/​typegpu-gl/​src/​tgpuRootWebGL.ts Updates resource tracking and linked-program management.
packages/​typegpu-color/​src/​tonemapping.ts Adds four exposure-aware tone maps.
packages/​typegpu-color/​src/​index.ts Exports tone-mapping APIs.
packages/​typegpu-cli/​tsdown.config.ts Embeds public workspace package versions.
packages/​typegpu-cli/​templates/​template-waku-bare/​_package.json Uses workspace-version placeholders.
packages/​typegpu-cli/​templates/​template-vite-react/​_package.json Uses workspace-version placeholders.
packages/​typegpu-cli/​templates/​template-vite-complex/​_package.json Uses workspace-version placeholders.
packages/​typegpu-cli/​templates/​template-vite-bare/​_package.json Uses workspace-version placeholders.
packages/​typegpu-cli/​templates/​template-nextjs-bare/​_package.json Uses workspace-version placeholders.
packages/​typegpu-cli/​templates/​template-expo-bare/​_package.json Uses workspace-version placeholders.
packages/​typegpu-cli/​src/​utils/​pkg.ts Resolves package-specific version ranges.
packages/​typegpu-cli/​src/​utils/​inputs.ts Uses package-specific addon versions.
packages/​typegpu-cli/​src/​utils/​files.ts Resolves template dependency placeholders.
packages/​typegpu-cli/​src/​steps/​typegpu.ts Installs package-specific versions.
packages/​typegpu-algorithm/​vitest.gpu.config.mts Configures standalone real-GPU tests.
packages/​typegpu-algorithm/​vitest.config.mts Configures shader-aware unit tests.
packages/​typegpu-algorithm/​tsdown.config.ts Configures algorithm-package builds.
packages/​typegpu-algorithm/​tsconfig.json Configures source type checking.
packages/​typegpu-algorithm/​tests/​utils.ts Adds dispatch-count assertions.
packages/​typegpu-algorithm/​tests/​scan.test.ts Tests scan plans and resource reuse.
packages/​typegpu-algorithm/​tests/​bitonic.test.ts Tests bitonic specialization and dispatch planning.
packages/​typegpu-algorithm/​src/​types.ts Defines shared sorter and recording contracts.
packages/​typegpu-algorithm/​src/​scan/​types.ts Defines binary-operation options.
packages/​typegpu-algorithm/​src/​scan/​schemas.ts Defines scan layouts and workgroup storage.
packages/​typegpu-algorithm/​src/​scan/​prefixScan.ts Adds reusable scans and reduction helpers.
packages/​typegpu-algorithm/​src/​scan/​kernels.ts Implements scan and block-sum kernels.
packages/​typegpu-algorithm/​src/​scan/​index.ts Exports scan APIs.
packages/​typegpu-algorithm/​src/​runPass.ts Shares compute-pass recording logic.
packages/​typegpu-algorithm/​src/​radix/​types.ts Defines radix sorter options.
packages/​typegpu-algorithm/​src/​radix/​schemas.ts Defines radix layouts and key access.
packages/​typegpu-algorithm/​src/​radix/​scatter.ts Implements stable radix scattering.
packages/​typegpu-algorithm/​src/​radix/​key.ts Implements sortable key mappings.
packages/​typegpu-algorithm/​src/​radix/​index.ts Exports radix APIs.
packages/​typegpu-algorithm/​src/​radix/​count.ts Implements radix histogram counting.
packages/​typegpu-algorithm/​src/​index.ts Exports algorithm-package APIs.
packages/​typegpu-algorithm/​src/​dispatch.ts Adds multidimensional workgroup decomposition.
packages/​typegpu-algorithm/​src/​bitonic/​types.ts Defines bitonic sorter contracts.
packages/​typegpu-algorithm/​src/​bitonic/​index.ts Exports bitonic APIs.
packages/​typegpu-algorithm/​README.md Updates package names and encoder examples.
packages/​typegpu-algorithm/​package.json Renames the package and adds GPU testing.
packages/​tgpu-gen/​tests/​structs.test.ts Tests additional generated type aliases.
packages/​tgpu-gen/​gen.mjs Adds half, boolean, and matrix aliases.
package.json Adds recursive GPU-test execution.
apps/​typegpu-docs/​tests/​individual-example-tests/​vaporrave.test.ts Updates vector-access and binding snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​uniformity.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​tonemapping.test.ts Adds a tone-mapping shader snapshot.
apps/​typegpu-docs/​tests/​individual-example-tests/​tgsl-parsing-test.test.ts Updates vector-mutation snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​smoky-triangle.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​slime-mold.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​slime-mold-3d.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​ripple-cube.test.ts Updates vector-access and square snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​perlin-noise.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​jump-flood-voronoi.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​jelly-switch.test.ts Updates square-optimization snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​jelly-slider.test.ts Updates vector-access and square snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​game-of-life.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​fluid-double-buffering.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​clouds.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​chroma-keying.test.ts Updates square-optimization snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​caustics.test.ts Updates vector-access snapshots.
apps/​typegpu-docs/​tests/​individual-example-tests/​3d-fish.test.ts Updates vector-access and mutation snapshots.
apps/​typegpu-docs/​src/​utils/​examples/​sandboxModules.ts Registers the renamed algorithm package.
apps/​typegpu-docs/​src/​examples/​tests/​sort/​index.ts Updates algorithm imports.
apps/​typegpu-docs/​src/​examples/​tests/​prefix-scan/​index.ts Updates algorithm imports.
apps/​typegpu-docs/​src/​examples/​tests/​prefix-scan/​functions.ts Updates the binary-operation type import.
apps/​typegpu-docs/​src/​examples/​rendering/​triplanar-mapping/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​rendering/​simple-shadow/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​rendering/​render-bundles/​index.ts Uses stable command and bundle encoders.
apps/​typegpu-docs/​src/​examples/​rendering/​render-bundles-with/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​rendering/​radiance-cascades-drawing/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​rendering/​global-illumination/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​rendering/​area-light/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​image-processing/​tonemapping/​meta.json Registers the tone-mapping example.
apps/​typegpu-docs/​src/​examples/​image-processing/​tonemapping/​index.ts Adds interactive tone-map comparisons.
apps/​typegpu-docs/​src/​examples/​image-processing/​tonemapping/​index.html Adds the example canvas.
apps/​typegpu-docs/​src/​examples/​image-processing/​monocular-light-injection/​renderer.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​algorithms/​sort/​index.ts Updates algorithm imports and encoder calls.
apps/​typegpu-docs/​src/​examples/​algorithms/​genetic-racing/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​examples/​advanced/​appjs-venue/​index.ts Uses stable command encoders.
apps/​typegpu-docs/​src/​content/​docs/​ecosystem/​typegpu-radiance-cascades.mdx Updates the documented encoder call.
apps/​typegpu-docs/​src/​content/​docs/​apis/​utils.mdx Documents declaration dereferencing.
apps/​typegpu-docs/​src/​content/​docs/​apis/​pipelines.mdx Documents stable encoder APIs.
apps/​typegpu-docs/​src/​content/​docs/​apis/​data-schemas.mdx Documents shader-time layout queries.
apps/​typegpu-docs/​src/​content/​docs/​apis/​buffers.mdx Updates the documented encoder call.
apps/​typegpu-docs/​package.json Uses the renamed algorithm dependency.
.github/​workflows/​treeshake-test.yml Allows manually dispatched jobs.
.github/​workflows/​test-gpu.yml Adds manual Lavapipe-backed GPU testing.

Review effort: Balanced

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues are identified for the workflow change enabling manual tree-shake test runs.

No open issues 🎉

Review effort: Balanced

@iwoplaza
iwoplaza merged commit 9be6461 into release Nov 5, 2026
8 checks passed
@iwoplaza
iwoplaza deleted the fix/treeshake-workflow-dispatch branch November 5, 2026 09:54
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.

3 participants