FE-1410: Define the seeds-per-trial contract in the optimization manifest - #9224
Open
kube wants to merge 1 commit into
Open
FE-1410: Define the seeds-per-trial contract in the optimization manifest#9224kube wants to merge 1 commit into
kube wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
kube
marked this pull request as ready for review
August 17, 2026 23:52
PR SummaryCursor Bugbot is generating a summary for commit 6b22c5e. Configure here. |
Contributor
There was a problem hiding this comment.
Pull request overview
Defines the multi-seed optimization contract without changing CLI execution behavior.
Changes:
- Adds validated
execution.seedsPerTrialsupport and seed-aware work limits. - Extends optimization protocol types for replicate results.
- Exports the shared deterministic seed derivation.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.changeset/optimization-seeds-per-trial.md |
Records the publishable API addition. |
libs/@hashintel/petrinaut-core/src/index.ts |
Exports the new public APIs. |
libs/@hashintel/petrinaut-core/src/optimization.test.ts |
Tests seed bounds and work budgeting. |
libs/@hashintel/petrinaut-core/src/optimization.ts |
Defines the manifest and protocol contracts. |
libs/@hashintel/petrinaut-core/src/simulation/index.ts |
Re-exports seed derivation. |
libs/@hashintel/petrinaut-core/src/simulation/monte-carlo/index.ts |
Exposes seed derivation from Monte Carlo. |
libs/@hashintel/petrinaut-core/src/simulation/monte-carlo/run-state.ts |
Makes seed derivation public. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…fest Adds an optional execution.seedsPerTrial field (1-100, default 1) to the optimization manifest schema, counts every trial seed against the total simulation-step budget, extends the describe/evaluate contract types with the seeds-per-trial count and per-seed replicates (both optional so the CLI can adopt them separately), and exports the Monte Carlo deriveRunSeed derivation for the CLI to reuse. Manifests without the field parse and behave exactly as before.
kube
force-pushed
the
cf/fe-1410-optimization-manifest-define-the-seeds-per-trial-contract-in
branch
from
August 18, 2026 00:33
6b22c5e to
a9554ae
Compare
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.
🌟 What is the purpose of this PR?
Contract layer for running M seeded simulations per optimization trial (FE-1408, split into a stack). It defines what a multi-seed trial looks like in the manifest and the CLI protocol types, without changing any behaviour: manifests without the new field parse and run exactly as before, and the CLI is untouched.
Stack: this PR → FE-1411 (async-safe protocol) → FE-1408 (worker pool) → arch-docs/bindings follow-ups.
🔗 Related links
🔍 What does this change?
@hashintel/petrinaut-coreonly:execution.seedsPerTrial(integer 1–100, default 1) on the optimization manifest schema, including inputs restored fromsessionStorage.stepsPerRun × seedsPerTrial × trials ≤ 5,000,000, with the issue anchored toexecution.seedsPerTrialwhen the multiplier causes the excess.PetrinautOptimizationDescribeResult.studygains an optionalseedsPerTrial;PetrinautOptimizationEvaluateResultgains an optionalreplicates: [{ seed, objective }]. Both are optional so the CLI adopts them in the next layer of the stack without a lockstep merge.deriveRunSeed(the Monte Carlo per-run seed derivation) is exported for the CLI to reuse, so optimization replicate seeds and Monte Carlo experiment seeds share one derivation.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
optimization.test.ts— field bounds (rejects 0 / 1.5 / 101), the seeds-aware total-work budget (including the issue path), and unchanged parsing of manifests without the field.❓ How to test this?
🤖 Generated with Claude Code