Park two decisions from the bindings lane

This commit is contained in:
Joseph Ferano 2026-09-13 14:20:31 +07:00
parent 4072dd2089
commit cebd07c530

40
NEXT.md
View File

@ -1,3 +1,43 @@
## To discuss: two decisions parked during the ownership discussion
Both came out of the lane that closed the enum-layout and constant-checking gaps. Its work is sound and committed;
these are questions it raised rather than defects in it.
### 1. The header check cannot run in a worktree, and nothing says so
`.gitignore:60` ignores `vendor/raylib/web/`, so the vendored `raylib.h` exists in the main tree and **never appears
in a worktree checkout**. Every parallel lane that touches bindings is therefore checking against nothing, or
against whatever it can find. The lane that hit this found a copy in `~/.local/share/Trash` and validated it the
right way — `generate-c` rewrote `generated.flan` byte-identically before it changed anything, and the two headers
are md5-identical — but a header in the Trash is not a corpus, and the next lane may be less careful or less lucky.
The options:
- **Vendor `raylib.h` as a tracked file.** It is one header. `BUILT.md` records that requiring a header was
rejected so that "a build needs libraylib linkable and not raylib-devel installed" stays true — but tracking the
header in this repository is not the same as requiring one on the machine, since `headers` is still
`?${FLAN_RAYLIB_H}` and still opt-in. This looks like the answer and the old argument may not actually apply.
- **Fail loudly when `FLAN_RAYLIB_H` names a path that is not there.** Already the behaviour for a set-and-wrong
path; what is missing is any signal when the *default* corpus has vanished, which is the worktree case.
- Leave it, and put the warning in the agent briefs instead. Weakest — it depends on whoever writes the brief
remembering.
### 2. A missing `bindings` line does not stop a build — a judgment call, flagged for review
The lane split its findings by severity:
- A **value mismatch or a missing C name** stops an ordinary build, the way `check_structs` does.
- A **coverage or typo finding about the `bindings` file itself** gates `generate-c` only.
The consequence is the part to decide: a lane that adds a `defenum` to `raylib.flan` and forgets its `bindings`
line gets **no warning from a plain build**, only from `generate-c`. Its reasoning was that failing somebody's
build over a config file, in a message shaped like "your layout is wrong", is the wrong place to stop them.
Arguable in both directions, and the argument against it is the one this whole feature exists for: an unchecked
enum member is exactly the silent wrongness the header read was built to catch, and "you have to remember to run
`generate-c`" is the same shape as "you have to remember to check the header by eye". Overruled by dropping the
`cmapping` guard in `lib/load.ml`.
## Decided 2026-09-13: generics by monomorphisation, checked abstractly, with `where` predicates
The spike answered it (`SPIKE-GENERICS.md`, on `worktree-agent-afcd2406f3660629b`): **it runs**, the whole feature