Skip to content

Commit 3f2f326

Browse files
fix(codegen): #555 decision — back-port loud handler failure to core-WASM, JS-text, Deno-ESM (#566)
Executes the decision requested in #555: **back-port the loud failure now, implement dispatch later.** - `lib/codegen.ml`: `ExprHandle`/`ExprResume` → `Error UnsupportedFeature`, mirroring `codegen_gc.ml:896-948`. The ADR-013/016 CPS line covers Async-effect *calls*, not `handle` expressions — async lowering unaffected (CPS harnesses stay green). - `lib/js_codegen.ml` + `lib/codegen_deno.ml`: `failwith` at handle/resume sites → converted to `Error` by each backend's existing entry wrapper. Declared `/ Async` rows on Deno-ESM still lower via `async function` (`fd_is_async`). - New regression suite **E2E Handler Fence (#555)** + fixture `handle_return_arm.affine` (the execution-proven 41-vs-42 probe): interpreter must keep evaluating it; all three compile backends must fail loudly naming the fence. Gate: 385 tests green (381 + 4 new). The first runtime-behaviour tests effect handlers have ever had on the compile backends. Does NOT close #555 — general handler dispatch remains open there; this removes the silent-wrong-value class only (v1 ledger #563, T0 item 2). Follow-up (deliberate, after #565 lands to avoid a doc conflict): one-line CAPABILITY-MATRIX effects-row touch-up from "silently drop handler arms" to "fail loudly (fence landed)". 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 6d0aab0 commit 3f2f326

17 files changed

Lines changed: 157 additions & 22 deletions

.github/workflows/affine-vscode-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ concurrency:
2929
jobs:
3030
publish:
3131
runs-on: ubuntu-latest
32+
timeout-minutes: 10
3233
steps:
3334
- name: Checkout code
3435
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/casket-pages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
# point also keeps the workflow re-triggerable post-enablement.
2727
precheck:
2828
runs-on: ubuntu-latest
29+
timeout-minutes: 10
2930
outputs:
3031
enabled: ${{ steps.check.outputs.enabled }}
3132
steps:
@@ -45,6 +46,7 @@ jobs:
4546
needs: precheck
4647
if: needs.precheck.outputs.enabled == 'true'
4748
runs-on: ubuntu-latest
49+
timeout-minutes: 10
4850
steps:
4951
- name: Checkout
5052
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
@@ -119,6 +121,7 @@ jobs:
119121
name: github-pages
120122
url: ${{ steps.deployment.outputs.page_url }}
121123
runs-on: ubuntu-latest
124+
timeout-minutes: 10
122125
needs: [precheck, build]
123126
if: needs.precheck.outputs.enabled == 'true'
124127
steps:

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ concurrency:
1515
jobs:
1616
build:
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
1820
steps:
1921
- name: Checkout code
2022
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -70,6 +72,8 @@ jobs:
7072
run: opam exec -- dune build @fmt
7173
lint:
7274
runs-on: ubuntu-latest
75+
timeout-minutes: 10
76+
7377
steps:
7478
- name: Checkout code
7579
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -93,6 +97,8 @@ jobs:
9397
# §"Bench standards". Does NOT block merge. Promotion to a
9498
# ratcheted gate requires a calibrated baseline first.
9599
runs-on: ubuntu-latest
100+
timeout-minutes: 10
101+
96102
steps:
97103
- name: Checkout code
98104
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -137,6 +143,8 @@ jobs:
137143
# docs/standards/TESTING.adoc §"Coverage (visibility-only)".
138144
# No merge-blocking floor today.
139145
runs-on: ubuntu-latest
146+
timeout-minutes: 10
147+
140148
steps:
141149
- name: Checkout code
142150
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -191,6 +199,8 @@ jobs:
191199
# (previously gated on #104's npm publish). A real regression should
192200
# turn this job red and gate, so no `continue-on-error`.
193201
runs-on: ubuntu-latest
202+
timeout-minutes: 10
203+
194204
steps:
195205
- name: Checkout code
196206
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -234,6 +244,8 @@ jobs:
234244
# commit still build cleanly and (b) gate `tools/res-to-affine/`
235245
# walker work that depends on the generated parser.
236246
runs-on: ubuntu-latest
247+
timeout-minutes: 10
248+
237249
steps:
238250
- name: Checkout code
239251
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ permissions: read-all
1818
jobs:
1919
analyze:
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 10
2122
permissions:
2223
contents: read
2324
security-events: write

.github/workflows/instant-sync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414
jobs:
1515
dispatch:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 10
1718
# Skip the dispatch job entirely when the FARM_DISPATCH_TOKEN secret is
1819
# not configured (e.g. on forks, or before the secret is provisioned).
1920
# Without this gate the action errors with "Parameter token or opts.auth

.github/workflows/panic-attack.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ permissions:
2828
jobs:
2929
scan:
3030
runs-on: ubuntu-latest
31+
timeout-minutes: 10
3132
steps:
3233
- name: Checkout
3334
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/publish-jsr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ concurrency:
3737
jobs:
3838
publish:
3939
runs-on: ubuntu-latest
40+
timeout-minutes: 10
4041
steps:
41-
- uses: actions/checkout@v6
42+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
4243
- uses: denoland/setup-deno@v2
4344
with:
4445
deno-version: v2.x

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ concurrency:
3030
jobs:
3131
prepare:
3232
runs-on: ubuntu-latest
33+
timeout-minutes: 10
3334
steps:
3435
- name: Checkout code
3536
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -56,6 +57,7 @@ jobs:
5657
- os: macos-14
5758
target: macos-arm64
5859
runs-on: ${{ matrix.os }}
60+
timeout-minutes: 10
5961
steps:
6062
- name: Checkout code
6163
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -93,6 +95,7 @@ jobs:
9395
checksums:
9496
needs: build
9597
runs-on: ubuntu-latest
98+
timeout-minutes: 10
9699
steps:
97100
- name: Collect binaries and publish SHA256SUMS
98101
env:

.github/workflows/scorecard-enforcer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ permissions: read-all
1818
jobs:
1919
scorecard:
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 10
2122
permissions:
2223
security-events: write
2324
id-token: write # For OIDC
@@ -38,6 +39,7 @@ jobs:
3839
# Check specific high-priority items
3940
check-critical:
4041
runs-on: ubuntu-latest
42+
timeout-minutes: 10
4143
steps:
4244
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
4345
- name: Check SECURITY.md exists

.github/workflows/semgrep.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ concurrency:
1717
jobs:
1818
semgrep:
1919
runs-on: ubuntu-latest
20+
timeout-minutes: 10
2021
permissions:
2122
security-events: write
2223
contents: read

0 commit comments

Comments
 (0)