iter env-unify.audit: tidy stale Env docs, pin-test docstring; queue types/ctor_index shape
This commit is contained in:
@@ -12117,3 +12117,42 @@ Known debt: none introduced. Out-of-scope items from the spec
|
||||
(pipeline-topology changes, per-module overlay refactor,
|
||||
primitive-name-set consolidation, new env fields) remain queued
|
||||
for separate milestones.
|
||||
|
||||
## 2026-05-10 — Audit close: env-construction unify
|
||||
|
||||
Architect drift review of diff `08abfdf..e414144` found three
|
||||
low-medium items. Bench gates 0/0/0; rustdoc 16→15 warnings (one
|
||||
removed by the milestone, none added); E2E coverage map produced
|
||||
by tester confirmed existing 345-test suite + pin tripwire pin
|
||||
every named invariant.
|
||||
|
||||
Resolution:
|
||||
|
||||
- `[medium]` Stale doc comment on `Env::module_imports`
|
||||
(`crates/ailang-check/src/lib.rs:2508-2516`) said "populated only
|
||||
by `mono::build_workspace_env`" and "`check_in_workspace` does
|
||||
not populate this." Both clauses contradicted the post-unify
|
||||
shape. Fixed inline as part of audit close (one-line
|
||||
doc tidy). Same drift on `Env::module_globals` (line 2506)
|
||||
fixed for consistency.
|
||||
- `[low]` Pin test docstring
|
||||
(`crates/ailang-check/tests/env_construction_pin.rs:26-30`)
|
||||
claimed it reproduced "the pre-refactor `check_in_workspace`
|
||||
workspace-flat seeding," but pre-refactor `check_in_workspace`
|
||||
seeded `types`/`ctor_index` per-module, not workspace-flat. The
|
||||
test still pins `build_check_env` against an independent
|
||||
reproduction (its real value); the comment misnamed what was
|
||||
pinned. Fixed inline.
|
||||
- `[medium, queued]` `env.types.clear()` / `env.ctor_index.clear()`
|
||||
immediately after `build_check_env` populates them
|
||||
(`lib.rs:1187-1188`) is the visible scar of a deeper shape
|
||||
mismatch: `types`/`ctor_index` are *per-module overlay* for
|
||||
typecheck (`Pattern::Ctor`'s local-first / imports-fallback
|
||||
resolution at lib.rs:2314-2316) but *workspace-flat* for the
|
||||
mono pass. One field, two shapes. Not a fire (the wasteful
|
||||
copy is small and bench gates are clean), but worth queuing
|
||||
as a follow-up shape question for whichever iteration next
|
||||
feels env-field pressure. Marker: "types/ctor_index overlay
|
||||
shape" in the JOURNAL queue.
|
||||
|
||||
Milestone closed: drift items 1 and 3 tidied; item 2 queued.
|
||||
|
||||
Reference in New Issue
Block a user