FE-1528: Skip combination enumeration for token-independent lambdas - #9389
Merged
kube merged 5 commits intoSep 3, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
kube
force-pushed
the
cf/fe-1528-skip-combination-enumeration-for-lambdas-that-read-no-input
branch
from
August 30, 2026 13:08
5ce29d2 to
1067f0d
Compare
kube
force-pushed
the
cf/fe-1528-skip-combination-enumeration-for-lambdas-that-read-no-input
branch
from
September 1, 2026 23:17
1067f0d to
0a6a63f
Compare
kube
force-pushed
the
cf/fe-1528-skip-combination-enumeration-for-lambdas-that-read-no-input
branch
from
September 2, 2026 15:04
0a6a63f to
24bc08d
Compare
kube
force-pushed
the
cf/fe-1528-skip-combination-enumeration-for-lambdas-that-read-no-input
branch
from
September 2, 2026 16:12
24bc08d to
195a080
Compare
kube
marked this pull request as ready for review
September 2, 2026 18:31
github-merge-queue
Bot
removed this pull request from the merge queue due to a manual request
Sep 3, 2026
kube
dismissed
YannisZa’s stale review
September 3, 2026 12:31
The merge-base changed after approval.
TimDiekmann
previously approved these changes
Sep 3, 2026
TimDiekmann
left a comment
Member
There was a problem hiding this comment.
re-approval of pre-rebase
kube
force-pushed
the
cf/fe-1528-skip-combination-enumeration-for-lambdas-that-read-no-input
branch
from
September 3, 2026 13:03
44f7ccb to
1bf9cc4
Compare
TimDiekmann
previously approved these changes
Sep 3, 2026
kube
force-pushed
the
cf/fe-1528-skip-combination-enumeration-for-lambdas-that-read-no-input
branch
from
September 3, 2026 14:03
1bf9cc4 to
bb1e659
Compare
TimDiekmann
approved these changes
Sep 3, 2026
Base automatically changed from
cf/fe-1526-enumerate-weighted-arc-token-combinations-lazily-in-the
to
main
September 3, 2026 16:16
kube
deleted the
cf/fe-1528-skip-combination-enumeration-for-lambdas-that-read-no-input
branch
September 3, 2026 16:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before this PR, a lambda's only per-combination input is the token attributes it reads. When it reads none, its rate is the same for every combination. Engine still enumerated every combination for such a lambda, evaluating the same rate
C(n, w)times per frame.Engine draws one acceptance uniform per transition per frame and fires the first passing combination, so either the first combination fires or none does. Testing only the first combination is therefore exact: same RNG stream, same consumed tokens, meaning the first
win place order, same trajectories for every seed. Measured onbenchmarks/coloured-enumeration.mjswith a never-firing weight-2 arc, per run-frame:Before the lazy enumeration of FE-1526, the eager implementation cost 13.8 ms per run-frame on the 400-token case.
Links
Changes
Core
analyzeHirmarks token-independent lambdasreadsNoInputTokensBenchmarks
benchmarks/coloured-enumeration.mjsgains a token-independent caseNext steps
WebGPU pair scan could use the same flag to skip its unranking loop.
Test coverage
hir/artifacts.test.ts:simulation/engine/compute-possible-transition.test.ts:simulation/monte-carlo/token-independent-lambda.test.ts:How to test
turbo run build test:unit --filter '@hashintel/petrinaut-core'cd libs/@hashintel/petrinaut-corenode benchmarks/coloured-enumeration.mjs, imports from../dist