Skip to content

fix: make Stable effect handling strict by default - #1165

Merged
godofecht merged 9 commits into
mainfrom
feat/effects-default
Oct 1, 2026
Merged

godofecht merged 9 commits into
mainfrom
feat/effects-default

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Implements #563 in the Flow-native compiler.\n\nStable effect rows and runtime effect dispatch are strict by default. restores permissive compile-time checking, and restores zero/no-op runtime fallback.\n\nThe bootstrap regeneration path uses the explicit permissive compiler-build mode, then verifies a fixed point. The effect parity suite passes 15/15.

@godofecht
godofecht force-pushed the feat/effects-default branch from fad6b04 to 2a75976 Compare October 1, 2026 18:48
@godofecht
godofecht force-pushed the feat/effects-default branch from 62a9a6d to 2d5c1cd Compare October 1, 2026 20:36
@godofecht
godofecht merged commit eb007b1 into main Oct 1, 2026
37 checks passed
godofecht added a commit that referenced this pull request Oct 1, 2026
#1165 made effect handling strict by default and marked the tests that rely
on the zero/no-op fallback with `# effects-mode: permissive`. Only
`./flow test` read the pragma. `./flow test-lang` failed
tests/lang/test_effects.flow at type check, and `./flow test-runtime`
aborted tests/runtime/test_effects_showcase.flow and
test_async_primitives.flow with exit 134. No CI job runs either runner on
those directories, so main stayed green.

One helper, effects_permissive, now reads the pragma for all three runners.
test-lang and test-runtime compile such a program with
FLOWC_PERMISSIVE_EFFECTS=1 and run it with FLOW_PERMISSIVE_EFFECTS=1.

tests/scripts/effects_pragma.flow runs both runners on pragma files and
checks that test_effects.flow without the pragma still fails with an
unhandled effect. The two runner checks fail on the previous tests.flow.
godofecht added a commit that referenced this pull request Oct 1, 2026
#1165 made effect handling strict by default and marked the tests that rely
on the zero/no-op fallback with `# effects-mode: permissive`. Only
`./flow test` read the pragma. `./flow test-lang` failed
tests/lang/test_effects.flow at type check, and `./flow test-runtime`
aborted tests/runtime/test_effects_showcase.flow and
test_async_primitives.flow with exit 134. No CI job runs either runner on
those directories, so main stayed green.

One helper, effects_permissive, now reads the pragma for all three runners.
test-lang and test-runtime compile such a program with
FLOWC_PERMISSIVE_EFFECTS=1 and run it with FLOW_PERMISSIVE_EFFECTS=1.

tests/scripts/effects_pragma.flow runs both runners on pragma files and
checks that test_effects.flow without the pragma still fails with an
unhandled effect. The two runner checks fail on the previous tests.flow.
godofecht added a commit that referenced this pull request Oct 1, 2026
#1165 made effect handling strict by default and marked the tests that rely
on the zero/no-op fallback with `# effects-mode: permissive`. Only
`./flow test` read the pragma. `./flow test-lang` failed
tests/lang/test_effects.flow at type check, and `./flow test-runtime`
aborted tests/runtime/test_effects_showcase.flow and
test_async_primitives.flow with exit 134. No CI job runs either runner on
those directories, so main stayed green.

One helper, effects_permissive, now reads the pragma for all three runners.
test-lang and test-runtime compile such a program with
FLOWC_PERMISSIVE_EFFECTS=1 and run it with FLOW_PERMISSIVE_EFFECTS=1.

tests/scripts/effects_pragma.flow runs both runners on pragma files and
checks that test_effects.flow without the pragma still fails with an
unhandled effect. The two runner checks fail on the previous tests.flow.
godofecht added a commit that referenced this pull request Oct 1, 2026
#1165 made effect handling strict by default and marked the tests that rely
on the zero/no-op fallback with `# effects-mode: permissive`. Only
`./flow test` read the pragma. `./flow test-lang` failed
tests/lang/test_effects.flow at type check, and `./flow test-runtime`
aborted tests/runtime/test_effects_showcase.flow and
test_async_primitives.flow with exit 134. No CI job runs either runner on
those directories, so main stayed green.

One helper, effects_permissive, now reads the pragma for all three runners.
test-lang and test-runtime compile such a program with
FLOWC_PERMISSIVE_EFFECTS=1 and run it with FLOW_PERMISSIVE_EFFECTS=1.

tests/scripts/effects_pragma.flow runs both runners on pragma files and
checks that test_effects.flow without the pragma still fails with an
unhandled effect. The two runner checks fail on the previous tests.flow.
godofecht added a commit that referenced this pull request Oct 1, 2026
…effects pragma in test runners (#1166)

* docs: regenerate stdlib-api.md and fail CI when it drifts

docs/library/stdlib-api.md was behind lib/stdlib (std.process gained
ProcPipe, ProcHandle and the spawn/wait functions). The generator also
stamped the run date into the header, so the page changed every day and
could not be compared. The header no longer carries a date.

gen_stdlib_docs gains --check [FILE], which exits 1 when the page differs
from the generator output. The Doc links job (ungated) runs it, and
tests/scripts/stdlib_api_drift.flow pins the check: the committed page
passes, a page with an extra row fails, and the header has no date. All
three checks fail on the previous tree.

* docs: run the bootstrap suite through ./flow test-lang

The bootstrap suite in AGENTS.md was a hand-written FLOWC_IN/cc loop that
linked only libm. test_generic_channels, test_concurrent_link and
test_import_stdlib_bare import the concurrency stdlib and failed to link
(undefined flow_thread_*, flow_race_* and __atomic_*_n). The compiler
handles all three; `./flow test-lang` already links the concurrency runtime
for such programs and passes them. The section now documents that entry
point. Old loop: 251 pass, 3 fail. ./flow test-lang: 254 pass, 0 fail.

tests/scripts/bootstrap_suite_doc.flow reads the command from the section
and runs it on the three programs. Both checks fail on the old AGENTS.md.

* fix: test-lang and test-runtime honour the effects-mode pragma

#1165 made effect handling strict by default and marked the tests that rely
on the zero/no-op fallback with `# effects-mode: permissive`. Only
`./flow test` read the pragma. `./flow test-lang` failed
tests/lang/test_effects.flow at type check, and `./flow test-runtime`
aborted tests/runtime/test_effects_showcase.flow and
test_async_primitives.flow with exit 134. No CI job runs either runner on
those directories, so main stayed green.

One helper, effects_permissive, now reads the pragma for all three runners.
test-lang and test-runtime compile such a program with
FLOWC_PERMISSIVE_EFFECTS=1 and run it with FLOW_PERMISSIVE_EFFECTS=1.

tests/scripts/effects_pragma.flow runs both runners on pragma files and
checks that test_effects.flow without the pragma still fails with an
unhandled effect. The two runner checks fail on the previous tests.flow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant