You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): three foundational unblocks for the main-branch baseline (PR-queue clear)
Every open PR (#357–#360) is MERGEABLE/UNSTABLE because main itself has three
independent baselines red. Same red shows up on every new PR. Fix each at
source so it stops blocking the whole queue.
## 1. `bench/dune` — `Unknown field "alias"` (build + lint)
`(test ...)` in dune 3.x does not accept `(alias <name>)` as an inline field.
The pattern that works under dune 3.14:
(executable ...) ; build the bench runner without auto-@runtest
(rule (alias bench) ; only run when explicitly targeted via @bench
(action (run ...)))
Preserves the visibility-only contract (`just bench` / `dune runtest @bench`
still work; normal `dune runtest` no longer pulls bench in).
## 2. Anti-pattern false-positive on `.res` test fixture (governance)
`tools/res-to-affine/test/fixtures/sample.res` is the input corpus for the
`.res → .affine` migration tool (#57). The estate ban on `.res` files
correctly flags it, but the file is fixture-by-construction. The governance
bundle already supports an in-file pragma read from the first 8 lines —
add `// hypatia:ignore cicd_rules/banned_language_file` to the fixture
header so the exemption travels with the file rather than living in a
side-channel `.hypatia-ignore` list.
## 3. npm 404 on `@hyperpolymath/affine-vscode` (vscode-smoke)
The adapter package is gated on owner action #104 (org create + NPM_TOKEN +
`affine-vscode-v0.1.0` tag push) and has not landed. Until then `npm install`
404s and the smoke harness can't even load the extension.
Two layers of fix:
- `editors/vscode/package.json`: move `@hyperpolymath/affine-vscode` from
`dependencies` → `optionalDependencies` so `npm install` tolerates the
404 instead of erroring out. When the package eventually publishes, real
installs pick it up automatically.
- `lib/codegen_node.ml`: the `--vscode-extension` codegen was emitting an
unconditional `const _makeVscodeBindings = require("...")` at top level.
Replace with a defensive `try { } catch (_e) { if code !== MODULE_NOT_FOUND
throw }` wrapper plus a guarded `extraImports` that returns `{}` when the
adapter is absent. Other require errors (syntax, transitive failure) are
still rethrown so real bugs aren't masked. Same patch applied to the
already-committed `editors/vscode/out/extension.cjs` so today's CI sees
the fix without a compiler rebuild round-trip.
This is the upstream fix — any future extension compiled with
`--vscode-extension` inherits graceful degradation. activate() / deactivate()
resolve cleanly when the adapter is missing; the in-editor smoke harness
(#139) verifies activation + command registration + restartLsp cycling,
which do not require the binding adapter.
Refs #104 (adapter publish remains owner-blocked but no longer load-bearing
for CI); Refs #57 (migration assistant); Refs #139 (vscode smoke harness).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments