Unify Dijkstra-era placeholder messages under TODO Dijkstra#1187
Merged
Unify Dijkstra-era placeholder messages under TODO Dijkstra#1187
Conversation
This was referenced Apr 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Standardizes Dijkstra-era placeholder error messages and TODO comments across cardano-api under a single greppable token (TODO Dijkstra:), to make future cleanup/audits easy and reliable without changing behavior.
Changes:
- Replaces varied Dijkstra placeholder
errorstrings witherror "TODO Dijkstra: <function>: <reason>". - Normalizes Dijkstra-related TODO comments to the
-- TODO Dijkstra: ...format. - Adds a Herald changelog fragment marking the change as
maintenance.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cardano-api/src/Cardano/Api/Tx/Internal/Body/Lens.hs | Unifies Dijkstra-era placeholder error string for lens accessor. |
| cardano-api/src/Cardano/Api/Tx/Internal/Body.hs | Unifies Dijkstra-era placeholder error strings in tx body construction/vote extraction. |
| cardano-api/src/Cardano/Api/Plutus/Internal/Script.hs | Unifies Dijkstra-era placeholder error strings in script conversions. |
| cardano-api/src/Cardano/Api/LedgerState.hs | Normalizes Dijkstra-related TODO comments around genesis/hard-fork trigger handling. |
| cardano-api/src/Cardano/Api/Internal/Orphans/Serialisation.hs | Normalizes Dijkstra TODO comment and placeholder ToJSON error for Dijkstra ApplyTxError. |
| cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Fee.hs | Unifies Dijkstra-era placeholder error strings in fee/auto-balance paths. |
| cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Certificate/Compatible.hs | Unifies Dijkstra-era placeholder error string in certificate construction. |
| cardano-api/src/Cardano/Api/Experimental/Tx/Internal/BodyContent/New.hs | Unifies Dijkstra-era placeholder error strings in unsigned tx and vote witness extraction. |
| cardano-api/src/Cardano/Api/Experimental/Tx/Internal/AnyWitness.hs | Unifies Dijkstra-era placeholder error string for Plutus datum extraction. |
| cardano-api/src/Cardano/Api/Era/Internal/Eon/ShelleyBasedEra.hs | Unifies Dijkstra-era placeholder error string in constraints helper. |
| cardano-api/src/Cardano/Api/Era/Internal/Eon/MaryEraOnwards.hs | Unifies Dijkstra-era placeholder error string in constraints helper. |
| cardano-api/src/Cardano/Api/Era/Internal/Eon/ConwayEraOnwards.hs | Unifies Dijkstra-era placeholder error string in constraints helper. |
| cardano-api/src/Cardano/Api/Era/Internal/Eon/BabbageEraOnwards.hs | Unifies Dijkstra-era placeholder error string in constraints helper. |
| cardano-api/src/Cardano/Api/Era/Internal/Eon/AllegraEraOnwards.hs | Unifies Dijkstra-era placeholder error string in constraints helper. |
| cardano-api/src/Cardano/Api/Era/Internal/Case.hs | Unifies Dijkstra-era placeholder error strings in era case combinators. |
| cardano-api/src/Cardano/Api/Certificate/Internal.hs | Unifies Dijkstra-era placeholder error strings in anchor extraction logic. |
| .changes/20260420_cardano_api_dijkstra_placeholder_unification.yml | Adds Herald fragment documenting the maintenance-only string/TODO unification. |
All Dijkstra-era placeholder `error` messages and `TODO` comments in `cardano-api/src/` now share the greppable token `TODO Dijkstra:`, so a single `grep -r 'TODO Dijkstra'` locates every site that needs attention when Dijkstra-era support lands. No behaviour change; this is a pure message/comment unification across 30 sites in 16 files. The runtime invariant assertion at `Tx/Internal/Body.hs:2858` (`toScriptIndexDijkstra: unexpected DijkstraGuarding`) is intentionally untouched — it is an impossible-case assertion, not a pending-implementation stub. The PlutusV4 placeholder at `Plutus/Internal/Script.hs:1302` (`toShelleyScript: PlutusV4 not implemented yet.`) is tracked separately as it blocks on ledger exposing a PlutusV4 constructor.
706a137 to
2020e05
Compare
carbolymer
approved these changes
Apr 27, 2026
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.
Changelog
Context
Follow-up to #1175. A reviewer there noted that Dijkstra-era placeholders in cardano-node use three different conventions, so no single
grepcatches them all. The same problem exists in cardano-api: 27errorstubs mentioning Dijkstra, spread across 5+ phrasings (not supported,is not yet supported,not supported yet,currently not supported,is not active yet), plus 4-- TODOcomments in various forms.grep 'TODO.*Dijkstra'missed the error stubs;grep 'Dijkstra era'missed the TODOs; no single grep caught all 31.This PR unifies 30 of them (see exclusions below) under the literal contiguous token
TODO Dijkstrasogrep -rn 'TODO Dijkstra' cardano-api/srcnow returns every Dijkstra-era placeholder a future maintainer needs to audit when Dijkstra-era support lands.Format applied
error \"TODO Dijkstra: <function>: <brief reason>\"— preserves existing descriptive context so runtime stack traces remain self-explanatory.-- TODO Dijkstra: <brief reason>— colon is afterDijkstra, not betweenTODOandDijkstra, otherwisegrep 'TODO Dijkstra'misses.Sites touched (30)
Era/Internal/Case.hs:{55,73,90,107,124,141,158}Era/Internal/Eon/{AllegraEraOnwards,MaryEraOnwards,BabbageEraOnwards,ConwayEraOnwards,ShelleyBasedEra}.hsCertificate/Internal.hs:{829,846},Tx/Internal/Body.hs:{2665,3107},Tx/Internal/Body/Lens.hs:172,Plutus/Internal/Script.hs:{1429,1463}Experimental/Tx/Internal/Fee.hs:{431,1545},Experimental/Tx/Internal/AnyWitness.hs:128,Experimental/Tx/Internal/Certificate/Compatible.hs:74,Experimental/Tx/Internal/BodyContent/New.hs:{197,849}Internal/Orphans/Serialisation.hs:273(error) + L271 (adjacent TODO)Internal/Orphans/Serialisation.hs:271,LedgerState.hs:{1168,1514,1515}Intentional exclusions
Tx/Internal/Body.hs:2858—toScriptIndexDijkstra: unexpected DijkstraGuarding at index Nis a runtime invariant assertion, not a "Dijkstra era not yet supported" placeholder.DijkstraGuardingis a ledger-side constructor with no correspondingScriptWitnessIndexcase; the error fires only if the ledger ever hands us one. Fixing that would mean adding a newScriptWitnessIndexvariant (a breaking change) — different kind of work from everything else on the list.Plutus/Internal/Script.hs:1302—toShelleyScript: PlutusV4 not implemented yet.is a PlutusV4 stub that blocks on ledger exposing a PlutusV4 constructor. Will be tracked as a dedicated issue rather than prefixed withTODO Dijkstra(it's PlutusV4-gated, not Dijkstra-gated).How to trust this PR
.hsfiles.cabal build cardano-api -j4.Checklist