René's URL Explorer Experiment


Title: test: accept structural goldens in place with PSLUA_GOLDEN_ACCEPT by Unisay · Pull Request #106 · purescript-lua/purescript-lua · GitHub

Open Graph Title: test: accept structural goldens in place with PSLUA_GOLDEN_ACCEPT by Unisay · Pull Request #106 · purescript-lua/purescript-lua

X Title: test: accept structural goldens in place with PSLUA_GOLDEN_ACCEPT by Unisay · Pull Request #106 · purescript-lua/purescript-lua

Description: What this does Adds an --accept-style escape hatch to the golden harness. When a codegen or optimizer change legitimately moves the generated IR or Lua, you can rewrite the affected goldens in place instead of deleting them by hand: PSLUA_GOLDEN_ACCEPT=1 cabal test spec A mismatching golden is overwritten with the actual output and the test passes, the same way tasty-golden --accept does. The safety asymmetry Acceptance is opt-in per golden. The harness gains acceptableGolden, a variant of defaultGolden that carries an acceptable :: Bool flag: golden.ir and golden.lua are derived: a pure function of the code under test. They use acceptableGolden, so PSLUA_GOLDEN_ACCEPT may rewrite them. eval/golden.txt is the hand-verified semantic oracle. It stays on defaultGolden (acceptable = False), so it is never auto-accepted. A program-output change still fails the run until you fix the regression or update the oracle on purpose. This is the guard scripts/golden_reset lacks: that script deletes every golden.*, the eval oracle included, which is how a past regression slipped through unnoticed. PSLUA_GOLDEN_ACCEPT only touches the structural goldens. Docs Adds docs/GOLDEN_TESTING.md: what each artifact is, why the eval golden is the oracle, the accept / reset / full-diff knobs, and how to add a new golden test. Also adds a CLAUDE.md note that the golden harness re-implements the IR pipeline in compileCorefn, so any new IR pass must live inside optimizedUberModule or the goldens silently bypass it. Scope Test infrastructure only, no compiler or runtime change. Independent of #105 (the magic-do fix for #46); this branch is cut from main. Verification cabal test spec: 233/0 on main plus this branch. Checked the asymmetry directly: perturbed both golden.ir and eval/golden.txt for one module, then ran with PSLUA_GOLDEN_ACCEPT=1. The golden.ir was accepted and rewritten back to the regenerated output (clean git diff), while the eval/golden.txt test still failed and the file was left untouched. fourmolu, hlint, nix fmt clean on the touched files.

Open Graph Description: What this does Adds an --accept-style escape hatch to the golden harness. When a codegen or optimizer change legitimately moves the generated IR or Lua, you can rewrite the affected goldens in plac...

X Description: What this does Adds an --accept-style escape hatch to the golden harness. When a codegen or optimizer change legitimately moves the generated IR or Lua, you can rewrite the affected goldens in plac...

Opengraph URL: https://github.com/purescript-lua/purescript-lua/pull/106

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0ad55872-417f-beed-54f6-f275fe237a26
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCE4E:F7C4C:A3D7F4:DD14D8:6B00EFF6
html-safe-nonce0022fdb757972e81283356407f1d58a6f277f62d75ddda0db5263068eef7b728
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTRFOkY3QzRDOkEzRDdGNDpERDE0RDg6NkIwMEVGRjYiLCJ2aXNpdG9yX2lkIjoiNjUyMzkwMDI0NjAzNTA2Njg3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc92c7322981cc88b2e36032ecdfbe95c5bf50708294b29c97dfa29d57b7caf61
hovercard-subject-tagpull_request:3906442091
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/purescript-lua/purescript-lua/pull/106/files
twitter:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
og:image:altWhat this does Adds an --accept-style escape hatch to the golden harness. When a codegen or optimizer change legitimately moves the generated IR or Lua, you can rewrite the affected goldens in plac...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/purescript-lua/purescript-lua git https://github.com/purescript-lua/purescript-lua.git
octolytics-dimension-user_id131581790
octolytics-dimension-user_loginpurescript-lua
octolytics-dimension-repository_id587200487
octolytics-dimension-repository_nwopurescript-lua/purescript-lua
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id587200487
octolytics-dimension-repository_network_root_nwopurescript-lua/purescript-lua
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/purescript-lua/purescript-lua/pull/106/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F106%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F106%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=purescript-lua%2Fpurescript-lua
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/106/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/106/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/106/files
purescript-luahttps://github.com/purescript-lua
purescript-luahttps://github.com/purescript-lua/purescript-lua
Codehttps://github.com/purescript-lua/purescript-lua
Issues48 (48)https://github.com/purescript-lua/purescript-lua/issues
Pull requestshttps://github.com/purescript-lua/purescript-lua/pulls
Discussionshttps://github.com/purescript-lua/purescript-lua/discussions
Actionshttps://github.com/purescript-lua/purescript-lua/actions
Projectshttps://github.com/purescript-lua/purescript-lua/projects
Security and qualityhttps://github.com/purescript-lua/purescript-lua/security
Insightshttps://github.com/purescript-lua/purescript-lua/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
Unisayhttps://github.com/Unisay
mainhttps://github.com/purescript-lua/purescript-lua/tree/main
chore/golden-accepthttps://github.com/purescript-lua/purescript-lua/tree/chore/golden-accept
Conversation 0 https://github.com/purescript-lua/purescript-lua/pull/106
Commits 1 https://github.com/purescript-lua/purescript-lua/pull/106/commits
Checks 2 https://github.com/purescript-lua/purescript-lua/pull/106/checks
Files changed https://github.com/purescript-lua/purescript-lua/pull/106/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/106/files
test: accept structural goldens in place with PSLUA_GOLDEN_ACCEPT https://github.com/purescript-lua/purescript-lua/pull/106/files#top
Show all changes 1 commit https://github.com/purescript-lua/purescript-lua/pull/106/files
9569cad test: add PSLUA_GOLDEN_ACCEPT to accept structural goldens in place Unisay Jun 21, 2026 https://github.com/purescript-lua/purescript-lua/pull/106/commits/9569cade47f275d22e1b59b3d97eda2dc4f5189c
Clear filters https://github.com/purescript-lua/purescript-lua/pull/106/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/106/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/106/files
CLAUDE.md https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
GOLDEN_TESTING.md https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-3e6b1b77c1ad001315d4eafbef51e5fe8a0e10e9f9877fd4dae78c984ec69002
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-e10bc6586bdc2afb3eed89cc8935f6ff0059d32a82668123ce53808a6046c019
Golden.hs https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
CLAUDE.mdhttps://github.com/purescript-lua/purescript-lua/pull/106/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
View file https://github.com/purescript-lua/purescript-lua/blob/9569cade47f275d22e1b59b3d97eda2dc4f5189c/CLAUDE.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/106/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
docs/GOLDEN_TESTING.mdhttps://github.com/purescript-lua/purescript-lua/pull/106/files#diff-3e6b1b77c1ad001315d4eafbef51e5fe8a0e10e9f9877fd4dae78c984ec69002
View file https://github.com/purescript-lua/purescript-lua/blob/9569cade47f275d22e1b59b3d97eda2dc4f5189c/docs/GOLDEN_TESTING.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/106/{{ revealButtonHref }}
test/Language/PureScript/Backend/Lua/Golden/Spec.hshttps://github.com/purescript-lua/purescript-lua/pull/106/files#diff-e10bc6586bdc2afb3eed89cc8935f6ff0059d32a82668123ce53808a6046c019
View file https://github.com/purescript-lua/purescript-lua/blob/9569cade47f275d22e1b59b3d97eda2dc4f5189c/test/Language/PureScript/Backend/Lua/Golden/Spec.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/106/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-e10bc6586bdc2afb3eed89cc8935f6ff0059d32a82668123ce53808a6046c019
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-e10bc6586bdc2afb3eed89cc8935f6ff0059d32a82668123ce53808a6046c019
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-e10bc6586bdc2afb3eed89cc8935f6ff0059d32a82668123ce53808a6046c019
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-e10bc6586bdc2afb3eed89cc8935f6ff0059d32a82668123ce53808a6046c019
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-e10bc6586bdc2afb3eed89cc8935f6ff0059d32a82668123ce53808a6046c019
test/Test/Hspec/Golden.hshttps://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
View file https://github.com/purescript-lua/purescript-lua/blob/9569cade47f275d22e1b59b3d97eda2dc4f5189c/test/Test/Hspec/Golden.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/106/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
https://github.com/purescript-lua/purescript-lua/pull/106/files#diff-17df0942ad1492f8fd15db31076737f4827683a3901d481a18b50deb10642af5
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/106/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.