fix(scripts): resolve the test's script path natively, and record a drifted example folder (iou-architectuur#105) - #237
Merged
Conversation
…rifted example folder Items 5 and 6 of sgort/iou-architectuur#105. ## 5. test:scripts failed on Windows, and took the second suite with it scripts/promotion-targets.test.mjs resolved the script under test with new URL('./promotion-targets.mjs', import.meta.url).pathname On Windows that is '/C:/Users/.../promotion-targets.mjs' -- the leading slash makes it not a native path, so execFileSync(process.execPath, [SCRIPT, ...]) could not resolve it and every command-line check failed. Demonstrated rather than assumed, on this Linux host: .pathname /C:/Users/.../promotion-targets.mjs fileURLToPath(url,{windows:true}) C:\Users\...\promotion-targets.mjs The script itself was never at fault -- run by hand it answered correctly and exited 0, and Linux CI passed throughout, so only Windows contributors saw it. A knock-on: test:scripts joins the two suites with &&, so dso-dossier.test.mjs never ran there either. Now fileURLToPath(new URL(...)), which gives a native path on every platform. A guard goes with it: the test exits 1 if SCRIPT is not an existing path. That is portable and it is exactly how the bug hid -- false on Windows, true everywhere else -- so the same mistake cannot return silently. The issue asked for the other scripts to be checked for the same pattern. dso-dossier.test.mjs uses .href for a dynamic import, which is correct; promotion-targets.test.mjs's other two uses (line 27 .href, line 155 a URL passed to readFileSync) are both fine. Only the one line needed changing. Both suites pass here: 24 checks each, and test:scripts now runs both. ## 6. The AWB missing-information form -- four of five were already fixed The issue found camunda:formKey="embedded:deployment:awb-missing-info-form.html" in five files, referring to a form that exists nowhere. Four are fixed on acc already: the seeded and fixture copies of AwbShellProcess and AwbZorgtoeslagProcess now carry camunda:formRef to kapvergunning-aanvullende-gegevens and zorgtoeslag-aanvullende-gegevens, both of which exist, so Gateway_StillIncomplete's ${supplementReceived} branch has something that can set it. The fifth is examples/organizations/flevoland/thuisbatterij/, which this repository has already written off: e2e-fixtures/manifest.json says the fixture was taken from the deployed bundle "not from examples/organizations/flevoland/thuisbatterij/ -- that folder's -main/-subprocess pair and its two forms have drifted behind what is actually deployed", and the 2026-09-24 swimlanes plan says the source of truth is packages/frontend/public/examples/flevoland/ and that folder is not touched. Reading it against the tree shows the drift is wider than the item: -main.bpmn references THREE forms that exist nowhere, not one -- thuisbatterij-subsidie-start, awb-missing-info-form.html and thuisbatterij-notify-applicant. The maintained copy's three all resolve. So the file is left as it is, and a README records what the folder is. Fixing one of three dangling references would fix a third of the problem while making a written-off file look maintained; fixing all three would mean re-deriving a definition the repository has already replaced. Neither of the two existing statements about this folder is visible from inside it, which is the gap the README closes -- and it says to delete itself if the folder is ever made current.
4 tasks done
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.
Items 5 and 6 of sgort/iou-architectuur#105.
5 —
test:scriptsfailed on Windows, and took the second suite with itscripts/promotion-targets.test.mjs:8resolved the script under test withnew URL(...).pathname. On Windows that is/C:/Users/.../promotion-targets.mjs— the leading slash makes it not a native path, soexecFileSync(process.execPath, [SCRIPT, …])could not resolve it and every command-line check failed.Demonstrated rather than assumed, from this Linux host:
The script itself was never at fault — run by hand it answered correctly and exited 0, and Linux CI passed throughout, so only Windows contributors saw it. Knock-on:
test:scriptsjoins the two suites with&&, sodso-dossier.test.mjsnever ran there either.Now
fileURLToPath(new URL(...)), which gives a native path on every platform.A guard goes with it. The test exits 1 if
SCRIPTis not an existing path — portable, and exactly how the bug hid: false on Windows, true everywhere else. The same mistake cannot return silently.The other scripts were checked, as the issue asked.
dso-dossier.test.mjsuses.hreffor a dynamic import, which is correct; this file's other two uses (line 27.href, line 155 a URL passed toreadFileSync) are both fine. One line needed changing.Both suites pass: 24 checks each, and
test:scriptsnow runs both.6 — four of the five were already fixed; the fifth is a folder the repo has written off
The issue found
camunda:formKey="embedded:deployment:awb-missing-info-form.html"in five files, naming a form that exists nowhere. Four are already fixed onacc: the seeded and fixture copies ofAwbShellProcessandAwbZorgtoeslagProcessnow carrycamunda:formReftokapvergunning-aanvullende-gegevensandzorgtoeslag-aanvullende-gegevens, both of which exist — soGateway_StillIncomplete's${supplementReceived}branch has something that can set it.The fifth is
examples/organizations/flevoland/thuisbatterij/, which this repository has already written off in two places:e2e-fixtures/manifest.json— the fixture came from the deployed bundle "not fromexamples/organizations/flevoland/thuisbatterij/— that folder's-main/-subprocesspair and its two forms have drifted behind what is actually deployed"packages/frontend/public/examples/flevoland/.examples/organizations/flevoland/thuisbatterij/is not touched."Reading it against the tree shows the drift is wider than the item.
-main.bpmnreferences three forms that exist nowhere, not one:thuisbatterij-subsidie-startawb-missing-info-form.htmlthuisbatterij-notify-applicantThe maintained copy's three all resolve.
So the BPMN is left as it is and a README records what the folder is. Repairing one of three dangling references would fix a third of the problem while making a written-off file look maintained; repairing all three would mean re-deriving a definition the repository has already replaced. Neither existing statement about this folder is visible from inside it, which is the gap the README closes — and it says to delete itself if the folder is ever made current.
If you would rather have the BPMN repaired outright, say so and I will — it is a different call, not a harder one.
Checks
test:scripts24 + 24 ·check-rip-bpmn-copiesgreen (12 fingerprinted, 2 fixture copies identical) ·prettier --checkclean on both changed files.