writeonce/docs/stories/language-runtime-database/05-language-surface.md
shoney.arickathil f8d3a8861c docs: reprioritise to log-watcher-executable only; update stories and plans
Every remaining item is now traced to a measurement on the sample; anything the
sample does not exercise is deferred by name with the measurement that says so.

- new plan docs/plan/compiler/2026-08-14-logwatcher-executable.md — six tasks
  between "it runs" and "you can leave it running": the ownership pass learning
  stdlib return types (>1 MB leaked in 8s of `run` mode, one fs.read_all
  result), dropping a projected temporary (`for e in parse_dir(d).entries`
  leaks the shell per rescan), the runtime's own argv container (128 B every
  run), honouring the stop signal in blocking calls (a server in accept ignores
  SIGTERM), closing accepted connections (net.close exists, unused), and a soak
  that would have caught all of it. Opens with the measured starting point and
  closes with an explicit out-of-scope list
- story 7 (log-watcher proof): status banner separating the met compile-and-run
  half from the executable half, plus a new Given/When/Then — clean SIGTERM
  exit, zero leaks, flat RSS and descriptors across a soak
- story 5: grammar half landed, strictness half deliberately deferred
- story 6: landed for the surface the workload uses, with the two lifetime
  defects it exposed pointed at the new plan
- story 7b: recorded as off this workload's path, measured — the sample has no
  @gc class, 0 RC_INC/RC_DEC against 78 DROPs
- 00-status.md: NEXT PLAN is the executable list; story table and in-progress
  row point at the new plan; deferrals carry their evidence
- plan 8 (haxe-parity): banner now says on hold behind the executable plan, and
  its task states are corrected — Task 5 shipped, Tasks 6 and 7 are half done

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 22:16:14 +02:00

65 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Iteration 5 — language surface (Haxe-parity adoptions)
> Format: fiberloom `product/story-iteration-template`. Part of
> [Story — one language, one runtime, one database, one binary](00-story.md).
> **Status (2026-08-14):** the *grammar* half landed — modules, `and`/`or`,
> interpolation, `const`, loop control, switch expressions, typedef records,
> enum payloads, try/catch, `nil`/`?T`, statics, `pub(read)` syntax, container
> literals, `for k, v in m`, and `as` — which is what let the driving workload
> compile. The *strictness* half (`?T` forced handling `WO-E211`–`E213`,
> `pub(read)` write enforcement, `using`, `#if`, reject-row diagnostics) is
> **deliberately deferred** behind
> [`plan/compiler/2026-08-14-logwatcher-executable.md`](../../plan/compiler/2026-08-14-logwatcher-executable.md):
> it makes the language refuse more, not the program run. Plan 8 stays open
> for it.
## Goals
- The language grows from milestone grammar to a daily-driver surface: the
systems-track verdict table's every **adopt** row — switch expressions,
typedef records with `?fields`, `?T` optionals with null-narrowing,
enum payload variants, try/catch/throw over traps, `static` members,
`abstract` newtypes, `using` extensions, `use` modules, `is`, `pub` /
`pub(read)`, `#if` build flags, string interpolation, loop control.
- Every **reject** row (inheritance, `Dynamic`, `cast`, macros, FFI…)
refuses with a diagnostic citing doctrine — the language's boundaries are
as deliberate as its features.
## Acceptance Criteria
- What to achieve?
- **Given** the verdict table in the systems-track spec,
- **when** the corpus runs,
- **then** every adopt row has at least one golden fixture and one
must-fail fixture passing, and every reject row that would parse
produces its doctrine-citing diagnostic.
- What to achieve?
- **Given** a switch over a union missing one variant and lacking
`default`,
- **when** it compiles,
- **then** the diagnostic names exactly the missing variants.
- What to achieve?
- **Given** the three fenced VM changes (catch frames, variant objects,
boxed scalar optionals),
- **when** they land,
- **then** the format doc is updated in the same change and all prior
trap fixtures still pass byte-for-byte.
## Out Of Scope
- Stdlib modules and program mode (iteration 6).
- Any new VM capability beyond the three fenced changes.
## Info
- Normative table: `docs/superpowers/specs/2026-08-01-systems-track-design.md` Part 1.
- Order inside the plan matters: modules first (everything imports through
them), data shapes before optionals, rejects last.
## Proposed Solution
- Execute the existing plan: `compiler/plan/2026-08-01-haxe-parity-language.md`
(nine tasks, each shipping its fixtures and error-catalog entries in the
same task).