Skip to content

Commit 14684fe

Browse files
fix(ci,test,on-ramp): green the runtest gate at source, unbreak the governance bridge, gate the consumer on-ramp
- test/e2e: the #644 case asserted a program the grammar has never accepted. Measured on the repro and 9 variants (tools/ci/diag-probe.sh): the empty arm parses in every position; what fails is a mid-block with no trailing . The case now keeps the empty arm and terminates the statement, and a companion test pins the rule so it stops being folklore. - governance-baseline.yml: 30-for-30 startup_failure. The caller-side concurrency block is the BP008 half that was missed (the local reusable was cleaned, the caller was not). Removed, matching the working sibling caller spark-theatre-gate.yml. - examples/consumers/extension-boundary: a real consumer — extern fn host surface, wasm target, host-supplied BW_* error taxonomy — with a Node harness, gated in the build job. - docs/ON-RAMP.adoc + README quick start: the page the consumer asked for, stating measured state (no release assets yet) rather than aspirational. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
1 parent 6d44e15 commit 14684fe

8 files changed

Lines changed: 468 additions & 15 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ jobs:
9595
if: always()
9696
run: bash tools/ci/diag-probe.sh
9797
# ─────────────────────────────────────────────────────────────────────
98+
- name: Consumer on-ramp example (issue #771)
99+
# The consumer-facing contract this project owes its downstream
100+
# readers: a host surface declared with `extern fn`, compiled to
101+
# wasm, driven by a host that supplies the imports, errors carried as
102+
# stable integer codes. docs/ON-RAMP.adoc is the prose; this is the
103+
# executable half, and it is gated so the on-ramp cannot rot the way
104+
# blocky-writer's "just tell us how to build" ask did. The example
105+
# finds the compiler three ways (in-tree build / PATH / dune exec),
106+
# so it exercises the same entry point a consumer has.
107+
run: ./examples/consumers/extension-boundary/build.sh
98108
- name: Run codegen WASM tests
99109
run: opam exec -- ./tools/run_codegen_wasm_tests.sh
100110
- name: Run codegen Bun-ESM tests (historical codegen-deno corpus)

‎.github/workflows/governance-baseline.yml‎

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,28 @@ on:
3535
branches: [main, master]
3636
pull_request:
3737
workflow_dispatch:
38-
# Caller-side concurrency only. The local reusable deliberately declares NO
39-
# concurrency block: a reusable that declares concurrency on the same computed
40-
# key as its caller is rejected at run-creation (the BP008 class).
41-
concurrency:
42-
group: ${{ github.workflow }}-${{ github.ref }}
43-
cancel-in-progress: true
38+
# NO `concurrency:` block — deliberately, and this is the fix for a 30-for-30
39+
# `startup_failure` streak (every run this workflow has ever had, from its
40+
# first push to 2026-10-03).
41+
#
42+
# The BP008 class is caller-plus-callee, not callee-only: a reusable-workflow
43+
# caller that declares `concurrency` alongside a callee that also declares it
44+
# is rejected at *run-creation* — no job, no `check_run`, and therefore no
45+
# way for the pinned context `governance / Validate Hypatia baseline` to ever
46+
# report. An earlier pass removed the block from the local reusable
47+
# (`governance-baseline-impl.yml`, which still has none) and left the
48+
# caller's in place, so the collision survived and the streak continued.
49+
#
50+
# The evidence for removing the caller's block instead is the sibling
51+
# workflow that works: `spark-theatre-gate.yml` is the estate's other
52+
# reusable caller, it carries the same "NO workflow-level concurrency" note
53+
# for the same reason, and its context reports on every PR. `governance.yml`
54+
# keeps its concurrency block precisely because it is a *normal* workflow,
55+
# not a caller.
56+
#
57+
# Consequence, recorded rather than hidden: two runs of this bridge on the
58+
# same ref are no longer auto-cancelled. The bridge is a ~5 s `jq` check, so
59+
# that is an acceptable price for a context that actually reports.
4460
permissions:
4561
contents: read
4662
jobs:

‎README.adoc‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,34 @@ write(buf, "world") # error: 'buf' was already used up by close()
8686

8787
== Quick start
8888

89-
// TODO: replace this block with the real toolchain commands.
89+
Build the compiler from a checkout (the only route that works today — see
90+
link:docs/ON-RAMP.adoc[docs/ON-RAMP.adoc] for why the release-binary and
91+
JSR-shim routes do not yet):
92+
9093
[source,console]
9194
----
92-
# install
93-
$ <install command here>
95+
$ git clone https://github.com/hyperpolymath/affinescript && cd affinescript
96+
$ opam install . --deps-only --with-test --yes
97+
$ dune build
98+
99+
# lex / parse / type-check / evaluate a program
100+
$ dune exec affinescript -- check examples/hello.affine
94101
95-
# compile a face program to WebAssembly
96-
$ <compiler invocation here> hello.rattle -o hello.wasm
102+
# compile it to WebAssembly
103+
$ dune exec affinescript -- compile examples/hello.affine -o hello.wasm
97104
98-
# run it
99-
$ <runner invocation here> hello.wasm
105+
# or to an ES module for a JavaScript host
106+
$ dune exec affinescript -- compile examples/hello.affine -o hello.bun.js --bun-esm
100107
----
101108

102-
A runnable example lives in `examples/` once the toolchain lands.
109+
If you are *consuming* AffineScript — a project outside this repository that
110+
wants a compiler, a target, and a host boundary — read
111+
link:docs/ON-RAMP.adoc[docs/ON-RAMP.adoc] instead of the rest of this file.
112+
It states what exists and what does not.
113+
114+
A complete, CI-gated consumer lives in
115+
`examples/consumers/extension-boundary/`; `just on-ramp-example` builds and
116+
runs it.
103117

104118
== How it works
105119

‎docs/NAVIGATION.adoc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ This guide helps you navigate the AffineScript repository structure.
8080

8181
**Guides:**
8282

83+
* link:ON-RAMP.adoc[Consumer On-Ramp] - **Start here if you are consuming AffineScript from another project** — getting a compiler, targets, declaring a host surface with `extern fn`, carrying errors across the wasm boundary (#771)
8384
* link:CAPABILITY-MATRIX.adoc[Capability Matrix] - **Live** per-component readiness (authoritative for feature readiness)
8485
* link:SOUNDNESS.adoc[Soundness Ledger] - **Live** test-anchored soundness-hole status (authoritative for "is it sound?"; the matrix links here). *Start here for soundness questions.*
8586
* link:PROOF-NEEDS.adoc[Proof-Needs Inventory] - what must be *proven* (mostly unmechanised); distinct from the soundness ledger above

0 commit comments

Comments
 (0)