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.
71 lines
6.4 KiB
Markdown
71 lines
6.4 KiB
Markdown
# Resolver-target corpus — enumerated manifest
|
||
|
||
**Status:** INACTIVE / xfail from S0 through S3.8. **Flips to active + green at S3.9.**
|
||
**Not part of the baseline gate** (`run_examples.sh` does not run these — no active
|
||
`examples/expected/` marker). The harness runner `run_resolver_target.sh` asserts
|
||
every case below currently FAILS to match its TARGET, so the set is never silently
|
||
dropped between S0 and S3.9.
|
||
|
||
These cases encode **known-wrong old behavior** on `wt-stdlib-base` (E6b unmerged):
|
||
the old name-selector silently resolves a global last-wins author (exit 0) where the
|
||
TARGET is a loud ambiguity (exit 1), OR fails to resolve an own-author where the
|
||
TARGET is success (exit 0), OR resolves the wrong author (right exit, wrong bytes).
|
||
On this base the old selector is **not a valid oracle** for them — so they are NOT
|
||
baseline-green and the S2 mirror must NEVER assert `resolver == old-selector` over
|
||
this corpus (see `../../docs/fork-c/S0.2-e6b-disposition-and-two-corpus-partition.md`).
|
||
|
||
The `08xx` TARGET goldens here are the **exact bytes** the E6b branch
|
||
(`flow/stdlib/E6b @ af737b0`) produced; copied verbatim, never the transitional src.
|
||
`e6br5-…` has a spec target only (`*.target.md`) — its exact bytes are produced by
|
||
the Fork C resolver at S3.9.
|
||
|
||
## Failure classes
|
||
|
||
- **SILENT-RESOLVE (ambiguous):** base exits 0 (silently picks last-wins) where
|
||
TARGET is exit 1 (loud ambiguity). The resolver must error.
|
||
- **UNDER-DIAGNOSE (ambiguous):** base exits 1 but emits FEWER ambiguity
|
||
diagnostics than the TARGET (catches one site, silently resolves the rest).
|
||
- **WRONG-AUTHOR (own-wins):** base exits 0 but resolves the wrong author →
|
||
garbage runtime bytes vs the TARGET stdout.
|
||
- **OWN-WINS-FAILS (own-wins):** base exits 1 (fails to resolve the own-author)
|
||
where TARGET is exit 0 (own-author wins and the program runs).
|
||
|
||
## Manifest (18 cases)
|
||
|
||
| # | case (source tree under `examples/<name>.sx`) | surface | class | base-now | target | note |
|
||
|---|---|---|---|---|---|---|
|
||
| 1 | `0811-modules-same-name-error-set-ambiguous` | bare error-set ref (size_of / annotation / type-as-value / match-arm / `!E` channel) | SILENT-RESOLVE | exit 0, silent | exit 1, **5** ambiguity diags | **old selector is wrong here on the E6b-unmerged base** — pre-E6b the `type_bridge.resolveInlineErrorSet` `findByName` short-circuit interned one global last-wins `IoErr` and exited 0 |
|
||
| 2 | `0812-modules-same-name-error-set-own-wins` | own error-set author wins | OWN-WINS-FAILS | exit 1 | exit 0, `…` | old path fails to resolve the own-author error-set |
|
||
| 3 | `0813-modules-same-name-error-set-lambda-own-wins` | own error-set in lambda return channel | OWN-WINS-FAILS | exit 1 | exit 0 | lambda `-> !E` own-author not resolved by old path |
|
||
| 4 | `0814-modules-same-name-error-set-lambda-ambiguous` | ambiguous error-set in lambda return channel | SILENT-RESOLVE | exit 0, silent | exit 1, 1 diag | old path silently resolves the `!E` channel |
|
||
| 5 | `0815-route-all-new-surfaces-ambiguous` | `*Box` / `union{Box}` / `enum{Box}` / inline-union ambiguous | UNDER-DIAGNOSE | exit 1, **<5** diags | exit 1, **5** diags | old path catches one site, silently resolves the rest |
|
||
| 6 | `0816-route-all-new-surfaces-own-wins` | own author across the new surfaces | OWN-WINS-FAILS | exit 1 | exit 0 | new surfaces' own-author not resolved by old path |
|
||
| 7 | `0817-modules-qualified-annotation-single-import-resolve` | qualified annotation, single import | OWN-WINS-FAILS | exit 1 | exit 0 | qualified annotation not resolved by old path |
|
||
| 8 | `0818-modules-qualified-annotation-own-wins` | qualified annotation, own wins | OWN-WINS-FAILS | exit 1 | exit 0 | — |
|
||
| 9 | `0819-modules-qualified-annotation-error-set-own-wins` | qualified error-set annotation, own wins | OWN-WINS-FAILS | exit 1 | exit 0 | — |
|
||
| 10 | `0820-protocols-same-name-method-own-wins` | own protocol-method author wins | OWN-WINS-FAILS | exit 1 | exit 0 | protocol dispatch own-author not resolved by old path |
|
||
| 11 | `0821-protocols-same-name-method-ambiguous` | ambiguous protocol-method | SILENT-RESOLVE | exit 0, silent | exit 1, 1 diag | old path silently resolves the protocol head |
|
||
| 12 | `0822-route-all-own-wins-surfaces` | own author across route-all surfaces | OWN-WINS-FAILS | exit 1 | exit 0 | — |
|
||
| 13 | `0824-protocols-same-name-method-wrapped-own-wins` | wrapped protocol-method, own wins | OWN-WINS-FAILS | exit 1 | exit 0 | — |
|
||
| 14 | `0825-protocols-same-name-method-wrapped-ambiguous` | wrapped protocol-method, ambiguous | SILENT-RESOLVE | exit 0, silent | exit 1, 1 diag | — |
|
||
| 15 | `0826-protocols-param-impl-source-wrapped-own-wins` | wrapped param-impl source, own wins | WRONG-AUTHOR | exit 0, `v=<garbage>` | exit 0, `v=7 dep=9` | base resolves the wrong author → garbage field value |
|
||
| 16 | `0827-protocols-param-impl-source-wrapped-ambiguous` | wrapped param-impl source, ambiguous | SILENT-RESOLVE | exit 0, silent | exit 1, 1 diag | — |
|
||
| 17 | `0829-packs-param-impl-mixed-pack-source-ambiguous` | mixed pack-closure param-impl, concrete `*Box` prefix ambiguous | SILENT-RESOLVE | exit 0, silent | exit 1, 1 diag | **old selector is wrong here on the E6b-unmerged base** — pre-E6BR-4 the `*Box` collision fell to the no-author `resolveTemplateSignatureType` wrapper (global last-wins) and registered silently |
|
||
| 18 | `e6br5-nested-pack-source-ambiguous` (tree under `tests/resolver-target/cases/`) | NESTED concrete `*Box` leaf inside `Closure(Closure(*Box,..)->.., ..)->..` | SILENT-RESOLVE | exit 0, silent | exit 1, ≥1 diag (spec, S3.9) | **re-filed E6BR-5** — the open nested-pattern hole that paused E6b (`walkConcreteSigArgs` lower.zig:14686 skipped nested args); subsumed by the whole-AST resolver, **NOT an E6b attempt-6** |
|
||
|
||
## Provenance
|
||
|
||
- Cases 1–17: source trees harvested from `flow/stdlib/E6b @ af737b0` into
|
||
`examples/<name>.sx` (+ sibling module dir), goldens copied verbatim from
|
||
`flow/stdlib/E6b:examples/expected/<name>.*` into `expected/<name>.*` here. The
|
||
transitional E6b src was NOT harvested.
|
||
- Case 18 (E6BR-5): authored reproducer (no E6b tree ever existed); lives entirely
|
||
under `cases/` with a spec target in `expected/…target.md`.
|
||
|
||
## Flip at S3.9
|
||
|
||
Each row maps to an active `examples/expected/<name>.{exit,stdout,stderr}` marker
|
||
when it flips (the `08xx` trees are already in `examples/`; only the goldens move
|
||
from `expected/` here to `examples/expected/`). After S3.9 this harness is empty and
|
||
every entry above is an active, green baseline test validated against its TARGET.
|