Skip to content

fix(identity-invariants): never echo left-of-operator text in unsupported-fact rejection#24

Draft
BunsDev wants to merge 1 commit into
mainfrom
fix/threads-ype-elide-invariant-echo
Draft

fix(identity-invariants): never echo left-of-operator text in unsupported-fact rejection#24
BunsDev wants to merge 1 commit into
mainfrom
fix/threads-ype-elide-invariant-echo

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 24, 2026

Copy link
Copy Markdown
Member

Closes threads-ype (N-2 from the fresh-context review of OpenCoven/coven#464).

Problem

parse_identity_declaration formatted unsupported identity fact {:?} echoing the left-of-operator text verbatim. A reversed declaration like 'Val Alexander' == familiar.person would echo principal-adjacent text into migration reports and stdout.

Fix

The rejection now names only the expected grammar (the five supported familiar.* facts) and never echoes input:

unsupported identity fact left of operator; expected one of: familiar.name, familiar.person, familiar.pronouns, familiar.purpose, familiar.coven

Downstream compatibility

The unsupported identity fact prefix is preserved. Both known downstream assertions match on that prefix only:

  • tests/support/phase5_retired_ward_corpus.rs (expected_error_contains)
  • coven PR #464 ward_migrate.rs rejection-lane test

Per-declaration locability is retained via the invariant[N]: index prefix added by IdentityInvariantSet::compile.

Validation

  • New regression test: reversed declaration rejected without echoing the principal value
  • Full crate suite: 212 passed, 0 failed
  • cargo fmt --check and cargo clippy -p coven-threads-core --all-targets clean

…rted-fact rejection

threads-ype (N-2 from coven PR #464 fresh-context review):
parse_identity_declaration echoed the left-of-operator text verbatim in
the 'unsupported identity fact' rejection. A reversed declaration like
'Val Alexander' == familiar.person would carry principal-adjacent text
into migration reports and stdout.

The rejection now names only the expected grammar (the five supported
familiar.* facts) and never echoes input. The 'unsupported identity
fact' prefix is preserved — downstream assertions in the retired-Ward
corpus and coven ward_migrate tests match on that prefix only.

Adds a regression test proving a reversed declaration is rejected
without echoing the principal value.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant