docs(fork-c/S0): setup contract — byte-baseline + commit-discipline, E6b disposition + two-corpus partition, A–E6 reuse/delete ledger

S0 of the ratified Fork C plan (zero-legacy name-resolution redesign, S0→S6).
Pure setup/documentation: NO production code change, NO behavior change.
Single-author output byte-identical to wt-stdlib-base by construction.

Deliverables under docs/fork-c/ (docs/, not current/, because current/ is
gitignored and the contract must be committed):

S0.1 — byte-baseline + commit-discipline: the committed examples/expected/*
snapshots are the single-author byte-identity reference; the zero-diff repro is
`zig build && zig build test && bash tests/run_examples.sh`. Resolver-target set
explicitly excluded + listed. Commit-classification rule: mirror | consumer-cutover | deletion.

S0.2 — E6b disposition + two-corpus partition: transitional E6b src NOT merged
(grep-clean: no resolveRegistrationSigTypeInSource / sig_registration_mode /
e6br_gate.test.zig on baseline). Harvested 0811–0829 trees + goldens (never the
src), empirically partitioned by running each through the base compiler vs the
E6b target:
  - baseline-green (mirror-equivalence): 0795–0798 (merged) + 0823, 0828 — given
    examples/expected/ markers, locked into the S0 baseline.
  - resolver-target (known-wrong old behavior): 0811–0822, 0824–0827, 0829 + the
    re-filed E6BR-5 nested-pattern regression — a listed xfail harness under
    tests/resolver-target/ (manifest + TARGET goldens, NO active marker), flips
    active+green at S3.9. 0811/0829 noted as old-selector-wrong on the E6b-unmerged
    base; E6BR-5 subsumed by the whole-AST resolver, NOT an E6b attempt-6.

S0.3 — A–E6 reuse/delete ledger: every load-bearing A–E6 artifact mapped REUSED
(Fork C home) or DELETED/TRANSITIONAL (S3/S6 phase); E6c/d/e dropped, F/H/I/K
absorbed/superseded.

Gate over the baseline-green corpus: zig build + zig build test (LSP corpus sweep
574 files, no crash) + bash tests/run_examples.sh (540 passed, 0 failed) all exit 0.
This commit is contained in:
agra
2026-06-09 10:29:23 +03:00
parent 1f755284d9
commit 1ce3a4e9e0
114 changed files with 1584 additions and 0 deletions

57
docs/fork-c/README.md Normal file
View File

@@ -0,0 +1,57 @@
# Fork C — setup contract (S0)
Zero-legacy name-resolution redesign (S0→S6), replacing E6cK. This directory is the
**committed S0 contract** the remaining 26 steps (S1→S6) execute against. It is pure
setup/documentation — **S0 introduces no production code change and no behavior
change**; single-author output is byte-identical to `wt-stdlib-base` by construction.
**Authority:** `runs/stdlib/design/fork-c-deepdive/reconciled.md` (§5 by-construction
audit, §6 staged roadmap + deletion lists, §8 fold-in) and
`runs/stdlib/design/fork-c-plan/planspec-r3.json` (the S0.1/S0.2/S0.3 intent +
acceptance, Adi-confirmed — they govern).
## Doc-area decision
Deliverables live under **`docs/fork-c/`**, NOT `current/fork-c/`. Reason: `current/`
is **gitignored** in this repo (`.gitignore``current/`), so a new `current/fork-c/`
tree would not be committed; the S0 contract must be committed. `docs/` is tracked.
## Baseline
- **Base:** `wt-stdlib-base @ 1f755284d98c6e8ebba953045c06e35d8cbe6278` (AE6a merged).
- **E6b:** `flow/stdlib/E6b @ af737b0` — PAUSED, **unmerged**, all transitional, destined
for S3/S6 deletion. Its semantics goldens are harvested; its src is never merged.
- **This branch:** `flow/stdlib/S0` (branched from the base; S0 HEAD == base).
## Contents
| file | sub-step | what |
|---|---|---|
| `S0.1-byte-baseline-and-commit-discipline.md` | S0.1 | the byte-identity reference + the zero-diff reproduction command + resolver-target exclusion + the `mirror \| consumer-cutover \| deletion` commit-classification discipline |
| `S0.2-e6b-disposition-and-two-corpus-partition.md` | S0.2 | E6b src not merged (grep-clean) + the harvested corpus partitioned baseline-green vs resolver-target + 0811/0829 placement + the E6BR-5 re-file + the mirror/flip statement |
| `S0.3-reuse-delete-ledger.md` | S0.3 | every load-bearing AE6 artifact mapped REUSED (Fork C home) or DELETED/TRANSITIONAL (S3/S6 phase); E6c/d/e dropped, F/H/I/K absorbed/superseded |
| `../../tests/resolver-target/` | S0.2 | the listed resolver-target harness: `manifest.md` (18 cases), `expected/` TARGET goldens, the E6BR-5 reproducer under `cases/`, and `run_resolver_target.sh` (xfail runner — NOT part of the gate) |
## The two-corpus law (the one thing the next 26 steps must never conflate)
1. **BASELINE-GREEN / mirror-equivalence corpus** — tests where the old selector is
already correct today (AE6a merged + the 6 harvested baseline-green cases + FFI
12xx14xx + the LSP smoke). Stays **green and single-author byte-identical at every
step S0→S6**, and is the S2 assert-only Debug mirror's **only** oracle.
2. **RESOLVER-TARGET corpus** — harvested goldens that encode **known-wrong old
behavior** (silent resolve / under-diagnose / wrong author / own-wins-fails) + the
E6BR-5 regression. Held **inactive/xfail** (listed, never silently dropped) from S0
through S3.8, then **flips to active + green at S3.9** against its TARGET output —
never against the old selectors (a wrong oracle for it on the E6b-unmerged base).
## Gate (this branch)
```sh
export PATH="$HOME/.zvm/bin:$PATH"
zig build && zig build test && bash tests/run_examples.sh # exit 0 over the baseline-green corpus
```
Since S0 changes no production code, single-author output is byte-identical by
construction. The resolver-target xfail diagnostic
(`bash tests/resolver-target/run_resolver_target.sh`) is separate and not part of the
gate.