Skip to content

FE-1158: Add boolean predicates to experiment metrics#8974

Draft
kube wants to merge 1 commit into
petrinaut-langfrom
cf/fe-1158-experiments-prototype
Draft

FE-1158: Add boolean predicates to experiment metrics#8974
kube wants to merge 1 commit into
petrinaut-langfrom
cf/fe-1158-experiments-prototype

Conversation

@kube

@kube kube commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

🌟 What is the purpose of this PR?

🔗 Related links

  • ...

🚫 Blocked by

  • ...

🔍 What does this change?

  • ...

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing
  • modifies an npm-publishable library and I have added a changeset file(s)
  • modifies a Cargo-publishable library and I have amended the version
  • modifies a Cargo-publishable library, but it is not yet ready to publish
  • modifies a block that will need publishing via GitHub action once merged
  • I am unsure / need advice

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change
  • are in a state where docs changes are not yet required but will be
  • require changes to docs which are made as part of this PR
  • require changes to docs which are not made in this PR
    • Provide more detail here
  • I am unsure / need advice

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph
  • affected the execution graph, and the turbo.json's have been updated to reflect this
  • I am unsure / need advice

⚠️ Known issues

🐾 Next steps

🛡 What tests cover this?

❓ How to test this?

  1. Checkout the branch / view the deployment
  2. Try X
  3. Confirm that Y

📹 Demo

Predicates are boolean-returning custom-code metrics evaluated per run:
each run is tested every frame until the predicate first returns true,
the time is recorded, and the run is not tested again.

- Compile predicates through the HIR metric surface with a boolean
  return type (HirCompileOptions.metricReturnTypes), sharing the
  metric buffer ABI and LSP session validation.
- Model predicate specs as a discriminated union member
  (MonteCarloPredicateSpec) travelling in-band in metricSpecs; runtimes
  split once via splitMonteCarloMetricSpecs.
- Stream versioned predicate snapshots from the worker into a new
  predicates store on the experiment handle.
- UI: Predicate toggle on custom-code experiment metrics; view-drawer
  boxes show floored true-percentage, run counts, and the median
  simulation time at which runs first satisfied the predicate.
- Cover the compiled boolean artifact path end-to-end against real
  frame buffers, and update the user docs and BUFFER_ABI.md.
@vercel

vercel Bot commented Jul 7, 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 7, 2026 11:50pm
petrinaut Ready Ready Preview Jul 7, 2026 11:50pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Jul 7, 2026 11:50pm

@github-actions github-actions Bot added 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 labels Jul 7, 2026

kube commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

1 participant