Canonicalize anonymous dict tags in authority and effect identity #155

Closed
lost-rob0t wants to merge 3 commits from fix/154-anonymous-dict-canonicalization into fix/151-plunit-main-ownership
lost-rob0t commented 2026-08-21 22:18:08 +00:00 (Migrated from github.com)

Closes #154 after #152 lands.

Stacked on fix/151-plunit-main-ownership so this repair is evaluated by the restored aggregate PlUnit runner rather than the old false-green entrypoint.

Failure

The restored suite exposed a representation bug in deterministic identity: SWI anonymous dicts such as _{value:1} carry a variable tag. rlm_authority preserved that variable into the canonical hash input, so the same operation could receive different fingerprints on repeated calls. rlm_effect also treated a representation-only anonymous tag as a genuinely nonground request.

Change

  • authority canonicalization maps only anonymous dict tags to the stable rlm_anonymous_dict sentinel while preserving named tags and rejecting invalid tags;
  • effect normalization applies the same rule and rejects genuine variable values separately;
  • effect options no longer reject an otherwise-closed option dict merely because its outer tag is anonymous; each supported field still passes its owning closed validator;
  • observation normalization delegates groundness/acyclicity to the canonical effect normalizer rather than raw ground/1 on the dict representation;
  • regression coverage proves nested anonymous dicts normalize to a ground stable representation while real variable and cyclic payload tests remain intact.

Non-goals

This does not claim the entire newly exposed red suite is repaired. #152 remains the runner-integrity prerequisite; further independent failures stay red and must be fixed rather than hidden.

Keep draft until exact-head CI demonstrates the affected authority/effect regressions are repaired and the remaining failures are classified.

Closes #154 after #152 lands. Stacked on `fix/151-plunit-main-ownership` so this repair is evaluated by the restored aggregate PlUnit runner rather than the old false-green entrypoint. ## Failure The restored suite exposed a representation bug in deterministic identity: SWI anonymous dicts such as `_{value:1}` carry a variable tag. `rlm_authority` preserved that variable into the canonical hash input, so the same operation could receive different fingerprints on repeated calls. `rlm_effect` also treated a representation-only anonymous tag as a genuinely nonground request. ## Change - authority canonicalization maps only anonymous dict tags to the stable `rlm_anonymous_dict` sentinel while preserving named tags and rejecting invalid tags; - effect normalization applies the same rule and rejects genuine variable values separately; - effect options no longer reject an otherwise-closed option dict merely because its outer tag is anonymous; each supported field still passes its owning closed validator; - observation normalization delegates groundness/acyclicity to the canonical effect normalizer rather than raw `ground/1` on the dict representation; - regression coverage proves nested anonymous dicts normalize to a ground stable representation while real variable and cyclic payload tests remain intact. ## Non-goals This does not claim the entire newly exposed red suite is repaired. #152 remains the runner-integrity prerequisite; further independent failures stay red and must be fixed rather than hidden. Keep draft until exact-head CI demonstrates the affected authority/effect regressions are repaired and the remaining failures are classified.
lost-rob0t commented 2026-08-24 08:05:36 +00:00 (Migrated from github.com)

Superseded by the shared rlm_closed_data integration and later consumer fixes now on main via #177. Verified exact current main 7c3561bcc3 across the issue-owned surfaces: closed-data, authority, authority hardening, effect, Spec, prompt compiler, and evolution all passed (136/136 focused); the complete aggregate gate also passed 762/762. Replaying this narrower stale patch would overwrite newer lifecycle/compiler work.

Superseded by the shared rlm_closed_data integration and later consumer fixes now on main via #177. Verified exact current main 7c3561bcc34de55fba875dfd18b773211a3d3420 across the issue-owned surfaces: closed-data, authority, authority hardening, effect, Spec, prompt compiler, and evolution all passed (136/136 focused); the complete aggregate gate also passed 762/762. Replaying this narrower stale patch would overwrite newer lifecycle/compiler work.
nsaspy changed title from WIP: Canonicalize anonymous dict tags in authority and effect identity to Canonicalize anonymous dict tags in authority and effect identity 2026-08-27 20:02:11 +00:00
Some checks failed
CI / Deterministic unit and load checks (push) Has been cancelled
CI / REAL OpenRouter integration (push) Has been cancelled
Nix flake / Flake package and clean runtime load (push) Has been cancelled
Clean SWI pack install / Install and load copied pack (push) Has been cancelled
Runner integrity / runner-integrity (push) Has been cancelled
Tree-sitter FFI / Direct SWI-Prolog Tree-sitter FFI (push) Has been cancelled

Pull request closed

Sign in to join this conversation.
No description provided.