iter mq.1: class-ref canonical-form extension + workspace-internal class-name qualification

Three schema fields move bare → canonical (bare for same-module,
<module>.<Class> for cross-module): InstanceDef.class,
Constraint.class, SuperclassRef.class. Symmetric to ct.1's
Type::Con.name rule. ClassDef.name stays bare.

validate_canonical_type_names gains three field-walks via new
check_class_ref helper + two sibling diagnostics
BareCrossModuleClassRef / BadCrossModuleClassRef.
check_class_name_fields narrowed to ClassDef.name-only.

Workspace-internal class-name keys all qualified:
class_def_module, class_by_name, registry entries.0,
ClassMethodEntry.class_name, class_superclasses, mono's
class_index, Origin::Class.class_name. New qualify_class_ref
helper at workspace.rs scope plus sibling
qualify_class_ref_in_check in ailang-check.

Two new positive on-disk fixtures (mq1_xmod_constraint_class{,_dep})
exercise the qualified Constraint.class shape.

Recon claim that all existing fixtures' class-refs are intra-module
was empirically wrong — 10 fixtures required minimal canonical-form
migration. Duplicate-instance test architecturally restructured:
post-mq.1 orphan-freedom makes two-modules-on-same-(class,type)
structurally impossible; new test_22b1_dup_same_module fixture
lands both instances in the class's module.

Plan defects fixed inline: Origin::Class.class_name single
construction site (plan recon off-by-one); build_class_index in
mono.rs needed qualifying; build_module_globals needed Def::Instance
carve-out; check_fn declared-constraint matching needed inline
canonical-form lifting; NoInstance Float-aware message arm needed
prelude.Eq/prelude.Ord match; coherence type-leg needed qualified-
head split-and-lookup. Tasks 3-6 ran as one coherent fix.

7/7 tasks, 520 tests green. bench/compile_check.py + cross_lang.py
exit 0; bench/check.py exit 1 (4 improvements-beyond-tolerance,
audit-ratifiable, not a regression).

MethodNameCollision + dispatch path unchanged; iters mq.2 + mq.3
land them.
This commit is contained in:
2026-05-13 01:11:56 +02:00
parent 1a5f8289b7
commit 0eb33235eb
28 changed files with 1159 additions and 234 deletions
@@ -0,0 +1,21 @@
{
"iter_id": "mq.1",
"date": "2026-05-13",
"mode": "standard",
"outcome": "DONE",
"tasks_total": 7,
"tasks_completed": 7,
"reloops_per_task": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0
},
"review_loops_spec": 0,
"review_loops_quality": 1,
"blocked_reason": null,
"notes": "Tasks 3-6 ran as one coherent fix (the plan structured them sequentially but the registry rekey + ClassMethodEntry qualification + class_superclasses qualification are tightly coupled — Task 3 alone left several tests RED). Boss-note recon claim ('zero existing-fixture diff') was empirically wrong: 5 test_22b* fixtures plus 6 others had bare cross-module class refs and required migration to the canonical form. Quality re-loop count of 1 is for the hash.rs:293 pin: initial implementer-phase shape used a length-only assertion (lost regression-protection); quality phase flagged it as Minor and pinned the concrete hex value."
}