Skip to content

Commit a3f8914

Browse files
Merge branch 'main' into claude/fix-vscode-smoke-vscode-import
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
2 parents bbd78d8 + 8ff1b6b commit a3f8914

494 files changed

Lines changed: 8775 additions & 20149 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
## 🚨 Disambiguation (read first)
2+
3+
**This repo is `hyperpolymath/affinescript`.** It is **NOT** `hyperpolymath/ephapax`.
4+
5+
| | This repo | NOT this repo |
6+
|---|---|---|
7+
| Name | **AffineScript** | Ephapax |
8+
| Path | `hyperpolymath/affinescript` | `hyperpolymath/ephapax` |
9+
| File extension | `.affine` (plus face dialects) | `.eph` |
10+
| Build | `dune-project` at root | `Cargo.toml` at root |
11+
| Type checker | `lib/borrow.ml` (OCaml) | `ephapax-linear/src/{linear,affine}.rs` (Rust) |
12+
| Proofs | None mechanized; soundness arguments live in `lib/borrow.ml` + `docs/CAPABILITY-MATRIX.adoc` + issue #177 (CORE-01) | `formal/Semantics.v` (Coq), `src/abi/Ephapax/…` (Idris2) |
13+
14+
**The trap.** Ephapax is internally dyadic — it contains `ephapax-linear` and `ephapax-affine` *sublanguages* inside one Rust crate. **The `ephapax-affine` sublanguage is NOT AffineScript.** The word `affine` is shared because both type systems happen to be substructural-logic-family — that's a logic-family fact, not a project relationship.
15+
16+
**Rule for agents:** before applying any prior-session lesson, memory entry, or snippet, check whether it was about *AffineScript* or about *ephapax*. They share zero AST / typing / borrow-checker / codegen. The only shared surface is the compile target (`hyperpolymath/typed-wasm`) and the shared Rust verifier crate (`crates/typed-wasm-verify/` *in* that repo).
17+
18+
When in doubt: state the context shift explicitly ("switching from ephapax context to AffineScript context") so the user sees the boundary respected.
19+
20+
**Canonical disambiguation doc** (single source of truth):
21+
https://github.com/hyperpolymath/nextgen-languages/blob/main/docs/disambiguation/ephapax-vs-affinescript.md
22+
23+
**Companion memory entry** (in user auto-memory):
24+
`feedback_affinescript_ephapax_siblings_not_impl_proof.md`
25+
26+
---
27+
128
## Machine-Readable Artefacts
229

330
The following files in `.machine_readable/` contain structured project metadata:

.github/workflows/casket-pages.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ jobs:
8080
8181
- name: Setup Pages
8282
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
83+
with:
84+
# Self-provision Pages on first run instead of failing with
85+
# 404 ("Get Pages site failed"). The repo had Pages disabled
86+
# at the GitHub level since the workflow was added; rather
87+
# than maintain that as out-of-band state, let the workflow
88+
# enable it. Idempotent on subsequent runs. The workflow's
89+
# own permissions (pages: write, id-token: write) authorise
90+
# this.
91+
enablement: true
8392

8493
- name: Upload artifact
8594
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0

.github/workflows/ci.yml

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ on:
1010
permissions:
1111
contents: read
1212

13+
# Actions concurrency pool. Applied only to read-only check workflows
14+
# (no publish/mutation), so cancelling a superseded run is always safe.
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1319
jobs:
1420
build:
1521
runs-on: ubuntu-latest
@@ -169,7 +175,6 @@ jobs:
169175
run: opam install . --deps-only --with-test --with-doc
170176

171177
- name: Run tests with bisect_ppx instrumentation
172-
continue-on-error: true
173178
run: |
174179
opam exec -- dune runtest --force --instrument-with bisect_ppx
175180
@@ -211,14 +216,12 @@ jobs:
211216
# (see CLAUDE.md "Runtime Exemptions") because the VS Code extension
212217
# host is npm/Node-native and no Deno/JSR equivalent exists.
213218
#
214-
# The extension's wasm module imports the `Vscode` /
215-
# `VscodeLanguageClient` modules from the @hyperpolymath/affine-vscode
216-
# adapter. Until #104 publishes the adapter to npm, we install the
217-
# in-tree source at packages/affine-vscode/ as a file: dependency so
218-
# `require("@hyperpolymath/affine-vscode")` in out/extension.cjs
219-
# resolves and the WASM instantiates cleanly. Drop the file: step
220-
# once the npm publish lands; the optionalDependencies entry will
221-
# take over.
219+
# Self-contained as of the codegen-embed fix: `--vscode-extension`
220+
# codegen now inlines the affine-vscode adapter source into the
221+
# generated .cjs at compile time, so activation no longer depends on
222+
# the @hyperpolymath/affine-vscode npm package being installed
223+
# (previously gated on #104's npm publish). A real regression should
224+
# turn this job red and gate, so no `continue-on-error`.
222225
runs-on: ubuntu-latest
223226

224227
steps:
@@ -232,25 +235,33 @@ jobs:
232235

233236
- name: Install test runner dependencies
234237
working-directory: editors/vscode
235-
# The compiled out/extension.cjs is checked in (see #35 Phase 3),
236-
# so the smoke test does not need the OCaml toolchain — only the
237-
# Node-side test runner deps. peerDeps `vscode` is provided by
238-
# @vscode/test-electron at launch.
238+
# The compiled out/extension.cjs is checked in (see #35 Phase 3)
239+
# and now embeds the affine-vscode adapter inline (codegen-embed),
240+
# so the smoke test only needs the @vscode/test-electron runner
241+
# deps. `vscode` itself is provided by the test runner at launch.
242+
# The #381 SKIP-when-missing guard remains downstream as a safety
243+
# net but is now expected to find the adapter present.
239244
run: npm install --no-audit --no-fund
240245

241-
- name: Install in-tree affine-vscode adapter (pre-#104)
246+
- name: Report adapter availability
242247
working-directory: editors/vscode
243-
# Until @hyperpolymath/affine-vscode is published to npm (#104),
244-
# wire the in-tree source as a file: dependency so the wasm's
245-
# Vscode / VscodeLanguageClient imports resolve at instantiation.
246-
# --no-save keeps editors/vscode/package.json clean; --no-audit /
247-
# --no-fund match the previous step's flags for log noise parity.
248-
run: npm install --no-audit --no-fund --no-save file:../../packages/affine-vscode
248+
# Surface the @hyperpolymath/affine-vscode publish state in the
249+
# workflow log before the smoke runs. Either it resolves (smoke
250+
# exercises real activation) or it doesn't (smoke skips cleanly
251+
# per the #139 suiteSetup detector). Either case is a green run.
252+
run: |
253+
if node -e "require.resolve('@hyperpolymath/affine-vscode')" 2>/dev/null; then
254+
echo "::notice title=adapter::@hyperpolymath/affine-vscode present — smoke will run"
255+
else
256+
echo "::notice title=adapter::@hyperpolymath/affine-vscode NOT installed (optional, awaits #104 npm publish) — smoke will skip"
257+
fi
249258
250259
- name: Run in-editor smoke (xvfb)
251260
working-directory: editors/vscode
252261
# Headless display required because @vscode/test-electron launches
253-
# the real Electron-based VS Code binary.
262+
# the real Electron-based VS Code binary. When the adapter is not
263+
# available the suite calls `this.skip()` in suiteSetup and exits
264+
# 0 with all tests marked skipped (mocha's expected behaviour).
254265
run: xvfb-run -a npm test
255266

256267
migration-assistant:

0 commit comments

Comments
 (0)