Collapse the duplicated fan-in alias-validity check and the triplicated per-node alias count #45
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cycle 0021 (fan-in distinguishability,
3f4d756) introduced the structuralpre-pass
check_fan_in_distinguishabilityahead of the param-arity gate incompile_with_params. The architect drift review at cycle close flagged twocorrectness-neutral debt items it created.
Duplicated
BadInteriorIndexraise-sitecheck_composite_fan_inreplicates the alias-index validity check at its head(
crates/aura-engine/src/blueprint.rs:336-345) so a bogus alias surfaces asBadInteriorIndexbefore the fan-in fault. Because the pre-pass recurses intoevery composite before lowering,
inline_composite's own alias-validity loop(
blueprint.rs:503-509) is now reached only after the pre-pass has alreadyraised the same fault — it is effectively dead for that error.
Two raise-sites for one invariant is a latent divergence hazard: a future change
to alias-index semantics must touch both or they drift.
Triplicated per-node alias count
A node's base-signature length (type initial + one per alias) is re-derived in
three places with no shared anchor:
signature_ofbase,crates/aura-engine/src/blueprint.rs:279leaf_has_unaliased_param,crates/aura-engine/src/blueprint.rs:383signature_base_len,crates/aura-cli/src/graph.rs:255An alias-semantics change must touch all three in lockstep.
Direction
Collapse the alias-validity check to a single owner (the pre-pass covers every
composite lowering reaches) and fold the per-node alias-count into one shared
helper. Behaviour-preserving: the existing fan-in / alias / param_space tests
are the guard. No ledger change (the C9 refinement already landed).