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
## Summary
Every open PR (#357–#360) is `MERGEABLE` / `UNSTABLE` because **main
itself** has three independent baselines red. The same four checks fail
on each PR. Fix each red at source so the queue inherits a clean
baseline.
- **`bench/dune`** — `Unknown field "alias"` (breaks `build` + `lint`)
- **anti-pattern policy** — flags
`tools/res-to-affine/test/fixtures/sample.res` (intentional fixture for
#57)
- **`vscode-smoke`** — `npm install` 404s on the not-yet-published
`@hyperpolymath/affine-vscode` (#104 owner-blocked)
## Foundational fixes (one PR; each at the correct upstream level)
| Surface | File | Fix |
|---|---|---|
| dune 3.x compatibility | `bench/dune` | Replace `(test ...) (alias
bench)` with `(executable ...)` + a dedicated `(rule (alias bench)
...)`. Keeps `just bench` / `dune runtest @bench` working; doesn't
auto-pull bench into `@runtest`. |
| Banned-language fixture exemption |
`tools/res-to-affine/test/fixtures/sample.res` | In-file `//
hypatia:ignore cicd_rules/banned_language_file` pragma (governance
bundle reads first 8 lines for `hypatia:ignore <rule>`). Exemption
travels with the file rather than living in a side-channel
`.hypatia-ignore`. |
| Compiler upstream | `lib/codegen_node.ml` | Wrap the
`--vscode-extension` adapter require in `try { } catch (_e) { if
(_e.code !== "MODULE_NOT_FOUND") throw _e; }`. `extraImports` returns
`{}` when the adapter is absent. Real require errors (syntax, transitive
failures) are still rethrown so genuine bugs aren't masked. Any future
extension built with this flag inherits graceful degradation. |
| Committed compiler output | `editors/vscode/out/extension.cjs` | Apply
the same try/catch in the regenerated `.cjs` so today's CI picks up the
fix without a full compiler rebuild round-trip. |
| Package metadata | `editors/vscode/package.json` | Move
`@hyperpolymath/affine-vscode` from `dependencies` →
`optionalDependencies` so `npm install` tolerates the 404 instead of
failing the install. When `#104` lands the publish-tag, real installs
pick the package up automatically. |
## Why one PR, not three
The three fixes touch independent surfaces but the queue is blocked on
the **union** of the three failures. Splitting would require landing
this PR first (otherwise the dune red blocks every dependent fix), then
landing the other two on a now-green main. Bundling avoids that rebase
round-trip and lets PRs #357–#360 inherit a clean baseline in one merge.
## Why this is foundational, not a workaround
- The dune fix matches dune ≥3.0's canonical pattern for "build this but
only run on explicit alias" — not a hack.
- The fixture pragma uses the governance bundle's documented in-file
exemption mechanism (same machinery used by other estate repos).
- The defensive adapter load is at the **codegen source** in
`lib/codegen_node.ml`, so any future extension compiled with
`--vscode-extension` inherits the behaviour. The committed `.cjs` patch
is a regen-equivalent (would be reproduced verbatim by a fresh `dune
build && affinescript compile … --vscode-extension`).
## Test plan
- [ ] `build` job passes (`dune build` no longer hits the `(alias
bench)` syntax error)
- [ ] `lint` job passes (same)
- [ ] `governance / Language / package anti-pattern policy` passes
(fixture exempted by pragma)
- [ ] `vscode-smoke` passes (`npm install` tolerates optional
`@hyperpolymath/affine-vscode`; extension activates without the adapter;
commands register; restartLsp cycles; deactivate resolves)
- [ ] No regression on green checks (CodeQL, Semgrep, Hypatia scans,
governance subjobs, migration-assistant, etc.)
- [ ] After merge: PRs #357–#360 transition `UNSTABLE` → `CLEAN` (after
rebase or new CI cycle)
Refs #104 (adapter publish remains owner-blocked but no longer
load-bearing for CI), Refs #57 (migration assistant — fixture intent),
Refs #139 (vscode smoke harness).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments