Skip to content

Allow transition Lambdas to read place token counts#9030

Draft
kube wants to merge 1 commit into
mainfrom
codex/petrinaut-lambda-place-counts
Draft

Allow transition Lambdas to read place token counts#9030
kube wants to merge 1 commit into
mainfrom
codex/petrinaut-lambda-place-counts

Conversation

@kube

@kube kube commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Introduction

Allow transition Lambda functions to read total token counts for any place through an optional third places argument, while keeping the default Lambda template unchanged.

Description

  • Adds typed places.PlaceName.count access across the LSP and HIR pipeline.
  • Compiles count access to direct reads from the dense place-count buffer in single-run and Monte Carlo simulation.
  • Resolves referenced place IDs once at instantiation, including subnet instances, and bumps the HIR artifact ABI to v5.

Impact

Existing two-argument Lambdas remain compatible. Authors can now base predicates and stochastic rates on coloured or uncoloured place counts without per-evaluation recounting or object allocation. Precompiled HIR artifacts must be regenerated.

Validation

  • yarn workspace @hashintel/petrinaut-core lint:tsc
  • yarn workspace @hashintel/petrinaut-core lint:eslint
  • yarn workspace @hashintel/petrinaut-core test:unit run — 814 tests passed

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jul 15, 2026 2:16pm
petrinaut Ready Ready Preview, Comment Jul 15, 2026 2:16pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Jul 15, 2026 2:16pm

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team type/legal Owned by the @legal team labels Jul 15, 2026
@kube
kube force-pushed the codex/petrinaut-lambda-place-counts branch from 6dca6ff to c9dc0ef Compare July 15, 2026 14:01
@github-actions github-actions Bot removed area/deps Relates to third-party dependencies (area) type/legal Owned by the @legal team labels Jul 15, 2026
"__params",
"__pool",
"__places",
`"use strict"; return (${source});`,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants