Repository navigation
fix(examples): let hello.affine use the builtin println so just jaffa hello runs - #80
Merged
Merged
Conversation
…a hello` runs
The example declared its own `effect IO { fn println(s: String) -> (); }`.
That declaration shadows AffineScript's builtin `println`, which already
carries the `IO` effect. `eval` then performs the declared effect, finds no
handler, and stops with "Runtime error: Unhandled effect: println" (exit 124,
affinescript's own error code; it is not a timeout).
Dropping the declaration makes check, eval, compile, preview-js and lint all
pass under affinescript 0.1.1, through `just jaffa …` and `bin/jaffa`. The
README's copy of the example gets the same change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GpUzjdhWFi26k6s7AWxYcf
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔍 Hypatia Security ScanFindings: 53 issues detected
View findings[
{
"reason": "Job `triage` in label-triage.yml has no `timeout-minutes:` declaration. Default is 6 hours — a stuck codeload fetch or runner hang can burn budget. Add `timeout-minutes: 10` (or proportional).",
"type": "missing_timeout_minutes",
"file": ".github/workflows/label-triage.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium",
"recipe_id": "recipe-add-workflow-timeout-minutes",
"job": "triage"
},
{
"reason": "Job `sync` in labels.yml has no `timeout-minutes:` declaration. Default is 6 hours — a stuck codeload fetch or runner hang can burn budget. Add `timeout-minutes: 10` (or proportional).",
"type": "missing_timeout_minutes",
"file": ".github/workflows/labels.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium",
"recipe_id": "recipe-add-workflow-timeout-minutes",
"job": "sync"
},
{
"line": 38,
"reason": "job in .github/workflows/labels.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
"type": "RE001",
"file": ".github/workflows/labels.yml",
"action": "report",
"rule_module": "research_extensions",
"severity": "medium"
},
{
"line": 44,
"reason": "job in .github/workflows/push-email-notify.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
"type": "RE001",
"file": ".github/workflows/push-email-notify.yml",
"action": "report",
"rule_module": "research_extensions",
"severity": "medium"
},
{
"line": 82,
"reason": "job in .github/workflows/hypatia-scan.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
"type": "RE001",
"file": ".github/workflows/hypatia-scan.yml",
"action": "report",
"rule_module": "research_extensions",
"severity": "medium"
},
{
"line": 52,
"reason": "job in .github/workflows/label-triage.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
"type": "RE001",
"file": ".github/workflows/label-triage.yml",
"action": "report",
"rule_module": "research_extensions",
"severity": "medium"
},
{
"line": 33,
"reason": "workflow .github/workflows/labels.yml:33 job `sync` has no `timeout-minutes:` — defaults to 360 min on hang",
"type": "WH006",
"file": ".github/workflows/labels.yml",
"action": "report",
"rule_module": "workflow_hardening",
"severity": "medium"
},
{
"line": 47,
"reason": "workflow .github/workflows/label-triage.yml:47 job `triage` has no `timeout-minutes:` — defaults to 360 min on hang",
"type": "WH006",
"file": ".github/workflows/label-triage.yml",
"action": "report",
"rule_module": "workflow_hardening",
"severity": "medium"
},
{
"line": null,
"reason": "workflow .github/workflows/hypatia-scan.yml uploads SARIF to code scanning but masks the scanner's failure (`|| true` / `|| echo 0`) and never asserts the findings artefact is a non-empty array. When the scanner fails, this uploads a SARIF with zero results, and GitHub AUTO-CLOSES every previously-open alert for that category — silently, with the job green.",
"type": "WH014",
"file": ".github/workflows/hypatia-scan.yml",
"action": "report",
"rule_module": "workflow_hardening",
"severity": "high"
},
{
"reason": "Code scanning (Hypatia): hypatia/workflow_audit/missing_timeout_minutes -- Hypatia workflow_audit: missing_timeout_minutes -- 7 day(s) old",
"type": "CSA001",
"file": ".github/workflows/labels.yml",
"action": "review",
"rule_module": "code_scanning_alerts",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
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.



Summary
This makes
just jaffa hellorun. Onmain(16fb94a) it fails withRuntime error: Unhandled effect: println, and so dobin/jaffa eval examples/hello.affineand the README'sevalexample.The cause is in the example, not in affinescript.
examples/hello.affinedeclared its own effect:AffineScript already has a builtin
println, typedString -{IO}-> ()(affinescriptlib/typecheck.ml:1824). The declaration shadows that builtin with an effect operation.evalthen performs the operation, finds no handler, and stops. The exit code 124 is affinescript's own error code. It is not a timeout: the run takes under a second, and a "Module not found" error returns 124 as well.I had earlier reported this as an affinescript 0.1.1 interpreter bug (in #79's Testing table and in my report to the owner). That was wrong.
Changes
examples/hello.affine: theeffect IO { … }block is removed. A short comment explains why it must not come back.mainkeeps its-{IO}->annotation, which now names the builtin's effect.README.adoc"Hello" section: its copy of the example gets the same change, so the README shows the source that runs.Not changed
letand===, which it does not use. That was true before this PR too; making the example match the comment is a separate change.docs/AFFIRMATION.adocanddocs/affirmations/AFFIRMATION-2026-10-07.adoc. The 10-07 affirmation (line 178) records that the README'sevalexample fails. Once this merges, that describes the repo as it was when signed. Agents do not edit signed affirmations; re-affirming is the owner's decision.examples/hello.affine,examples/faces/hello-jaffa.affine) fail the same way, andhello-jaffa.affinealso fails withModule 'io' not found. affinescript is not changed here; the finding is logged for its owner.evalprints the string with its quotes ("Hello, JaffaScript!"). That is how the interpreter displays the value, not something this repo controls.📌 New pins
4d5c674e2d153fc54b8bd992c052da3f3e50a4d3uses:,actions.lock, lockfile or container digest is added or changed.RSR Quality Checklist
Required
affinescript lint --face jaffareportsNo issues found.affinescript lintas above, andasciidoctor --failure-level=WARNpasses onREADME.adoc.unsafeblocks: n/a, no Rust changed.examples/hello.affinekeeps itsMPL-2.0header;README.adockeeps its header..envfiles.As Applicable
.machine_readable/*.a2ml: no. A2ML is retired.README.adoc's copy of the example.TOPOLOGY.md: n/a.CHANGELOG: not updated; this is an example fix.Testing
All runs used just 1.56.0 and affinescript 0.1.1, in this branch's worktree at
4d5c674.main16fb94ajust jaffa helloUnhandled effect: println"Hello, JaffaScript!"just jaffa run examples/hello.affinejust jaffa check examples/hello.affineType checking passedjust jaffa build examples/hello.affine <tmp>/hello.wasmjust jaffa preview examples/hello.affinefn main,let greeting)just jaffa lint examples/hello.affineNo issues found./bin/jaffa eval/check/compileon the exampleevalrc 124[source,affine]block, extracted and run withevalUnhandled effect: println(rc 124) under the same binary. So the pass above comes from the change, not from the environment.Red checks on this head
To be filled in once CI has run on this head.
Screenshots
n/a, no UI change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GpUzjdhWFi26k6s7AWxYcf