Skip to content

Commit 84423bd

Browse files
committed
design: what implementation found that the design did not
Four items, three visible only once the code ran: a nested std::map in an exported module truncating the BMI and reporting it in an unrelated file; the removed key's first casualties being this repository's own fixtures; one assertion that could only fail on macOS doing so; and the same statement in both tables collapsing rather than installing one package twice.
1 parent 7088e11 commit 84423bd

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.agents/docs/2026-09-03-xlings-workspace-as-the-one-table.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,35 @@ reached, and because two of these were wrong in a way worth remembering.
509509
| A three-phase deprecation | one release (§2.4) | three manifests |
510510
| Keys are program names | keys are xvm targets, roots included (§12) | measured |
511511
512+
### 15.1 What implementation found that the design did not
513+
514+
Four things, and three of them were only visible once the code ran.
515+
516+
**A nested `std::map` in an exported module truncates the BMI.** `XlingsConfig`
517+
first carried `map<string, map<string, string>>`. The module compiled and the
518+
BMI it wrote was unreadable: consumers failed with `Bad file data` and
519+
`failed to load pendings for 'std::map'`, pointing at an unrelated file's
520+
ordinary `std::map` alias. The emitter needs the addresses and never the inner
521+
keys, so a `vector` costs nothing and the field is one. xlings' own source
522+
carries a note about the same GCC 16 shape, with a different workaround.
523+
524+
**The removed key's first casualties were this repository's own fixtures.**
525+
e2e 88 and 205 declared `[xlings.envs]` and went red on CI, not locally,
526+
because the local run had not reached them. That is the expected shape of
527+
removing a key that did nothing: the things that used it were the things that
528+
did not depend on it working.
529+
530+
**One assertion could only fail on macOS, and did.**
531+
`Manifest.XlingsWorkspaceAcceptsPerPlatformValues` compared
532+
`host_platform_key()` against `"macos"`, and aligning that function with
533+
xlings' `macosx` made the comparison false on exactly one of the three hosts.
534+
The test was written in terms of the function so it would run everywhere; the
535+
literal on the other side of the comparison is what defeated that.
536+
537+
**`deps` and `workspace` agreeing is not two entries.** Both feed the same
538+
derived list, so the same statement written twice asked xlings to install one
539+
package twice. It collapses, and only the advisory is produced.
540+
512541
The two that mattered: reading a SubOS **state** file as though it were an
513542
authored **project** file, and asserting a blast radius without checking which
514543
environment the call runs in. Both were arguments from the shape of the code

0 commit comments

Comments
 (0)