Restore the weekly Evaluate job against latest Plutus, and keep it in sync - #40
Merged
Merged
Conversation
The weekly compatibility job could no longer resolve a build plan for run-script-evaluations: current Plutus master requires cardano-base >=0.1.5 and aeson >=2.3, which the stale index-states and flake inputs did not admit. - Bump the CHaP and Hackage index-states to match Plutus master's cabal.project (CHaP 2026-06-18 exposes cardano-base 0.1.5.0). - Update the hackage.nix and CHaP flake inputs so haskell.nix's snapshots cover those dates. - Add the allow-newer/constraints Plutus master uses for the aeson >=2.3 cascade (deriving-aeson, microstache, setup.optparse-applicative) plus postgresql-simple:aeson for our own dependency. - Adapt FromField SatInt to the new Int64-backed SatInt (unsafeToSatInt :: Int64 -> SatInt). Verified locally: both executables build against Plutus master (266f6a0) under GHC 9.6.6; fourmolu and hlint are clean.
Keep the weekly Evaluate job from breaking whenever Plutus master moves a dependency bound past our pinned index-state. - add_srp.sh now syncs the cabal.project index-state from the pinned Plutus commit's own cabal.project (read from the prefetched checkout, so it uses the exact commit with no extra network call). We then resolve against the same package set Plutus itself is tested with. - The workflow runs `nix flake update hackage CHaP` after add_srp.sh so haskell.nix's pinned snapshots cover the synced index-state dates. allow-newer/constraints stay hardcoded: they change rarely, and postgresql-simple:aeson is our own relaxation, not one Plutus master carries.
There was a problem hiding this comment.
Pull request overview
Restores the scheduled “Evaluate mainnet scripts” workflow by aligning this repo’s Cabal/Nix pins with the requirements of the latest Plutus master, and automates keeping those pins synchronized with the exact Plutus commit being evaluated.
Changes:
- Updated Cabal index-states and added solver knobs (
constraints/allow-newer) to accommodate Plutus’ newer dependency bounds (notablyaeson >= 2.3andcardano-base >= 0.1.5). - Enhanced
add_srp.shto synccabal.projectindex-states from the prefetched (pinned) Plutus checkout, avoiding drift when Plutus moves bounds. - Updated the weekly workflow to refresh the
hackage/CHaPflake inputs after syncing index-states, and adapted a DB decoding orphan (SatInt) to an upstream Plutus API change (Int64-backed).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
run-script-evaluations/run-evaluations/Database/PostgreSQL/Simple/Orphans.hs |
Adjusts FromField SatInt to read Int64, matching updated Plutus SatInt representation. |
run-script-evaluations/flake.lock |
Updates pinned hackage.nix and cardano-haskell-packages inputs to cover newer index-states. |
run-script-evaluations/cabal.project |
Bumps index-states and adds constraints/allow-newer needed for Plutus master’s dependency set. |
run-script-evaluations/add_srp.sh |
Syncs cabal.project index-states from the pinned Plutus commit’s cabal.project (no extra network fetch). |
.github/workflows/evaluate.yml |
Runs nix flake update for hackage and CHaP after add_srp.sh so haskell.nix snapshots cover the synced index-states. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The weekly "Evaluate mainnet scripts" job has been failing in the
Evaluatestep, before any script runs.add_srp.shpulls the latest Plutus master, and current master requirescardano-base >= 0.1.5andaeson >= 2.3, which our pinned index-state and flake inputs did not admit, socabalcould not resolve a build plan.I reproduced the whole job locally (
add_srp.shfor the same master commit, then plan resolution and a full build insidenix develop) and worked through four layers.Fix (first commit)
run-script-evaluations/cabal.projectto match Plutus master's owncabal.project(CHaP 2026-06-18exposescardano-base 0.1.5.0).hackageandCHaPflake inputs so haskell.nix's pinned snapshots cover those dates. Without this the solver fails withCabal-7159(requested index-state newer than the snapshot).aeson >= 2.3cascade (allow-newer: deriving-aeson:aeson, microstache:aeson,constraints: setup.optparse-applicative >=0.19.0.0), plusallow-newer: postgresql-simple:aesonfor our own dependency.postgresql-simplestill capsaeson < 2.3at its latest release but builds against 2.3.FromField SatIntto a real Plutus API change:Data.SatIntnow wrapsInt64, so it reads the field asInt64(fromField @Int64), matchingunsafeToSatInt :: Int64 -> SatInt.Prevent recurrence (second commit)
The index-states were hardcoded, so this breaks whenever master moves a bound past our pins. To keep the compatibility test aligned:
add_srp.shnow syncs thecabal.projectindex-state from the pinned Plutus commit's owncabal.project, read from the prefetched checkout (exact commit, no extra network call).nix flake update hackage CHaPafteradd_srp.shso the flake snapshots cover the synced dates.allow-newer/constraintsstay hardcoded: they change rarely, andpostgresql-simple:aesonis our own relaxation rather than one Plutus master carries.Verification
Both executables (
run-script-evaluationsandvalue-statistics) build against Plutus master (266f6a0) under GHC 9.6.6.fourmoluandhlintare clean,shellcheckpasses onadd_srp.sh. The runtime evaluation itself needs the mainnet database, so it is not exercised here.