Repository navigation
M7: IdentityIntegrity (within-session) — mechanical identity-drift gate - #33
Merged
Merged
Conversation
Spec-first ruling docs/m7_identity_integrity_ruling.md (LOCKED), then the implementation. Scoped to WITHIN-session identity consistency (v1); cross-session change-rate is an explicit deferred gap pending the longitudinal cohort read. - moltbook/moltbook.pi — identity_drift field + IdentityIntegrity (must equal false; freeze + escalate; priority high). Joined enforce (all three M7 constraints); arbiter never_acceptable gains identity_declaration_self_modification. - moltbook/detector.py — scan_identity, MECHANICAL ONLY (ruling §6): handle/name contradiction via explicit self-naming constructs, and direct role negation. Deliberately never fires on bare "I am / I do X" (the dominant normal register the baseline pass measured) or on @other-agent references. Semantic persona-drift is a deferred, xfail-pinned gap. - moltbook/client.py — captures declared identity once at session start (immutable for the session; a fresh client == fresh session == legitimate reset, ruling §2), adds the identity gate as Gate 3, latches identity_drift, raises IdentityDriftBlocked. freeze + escalate is justified BY the narrow high-confidence detection scope, not kept by default. - tests — violation/clean pair, detector cases, the dominant-register GUARD (bare first-person claims must not fire), fresh-session reset, end-to-end block->freeze, and an xfail(strict) pinning the deferred semantic-drift gap. Updated CredentialIntegrity/LinkRestriction enforce assertions for the third constraint. Full suite: 330 passed, 4 xfailed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GodSpeed313
added a commit
that referenced
this pull request
Jul 17, 2026
…ate (#34) Implements docs/m7_identity_integrity_ruling_addendum_1.md (LOCKED 2026-07-17), the verified response to an external technical review of #33: - A1: declared_handle is required — MoltbookClient fails closed (ValueError) instead of running the identity gate against a {""} baseline. - A2: multi-word display names supported — bounded 4-token self-naming capture + bidirectional leading-token-prefix comparison. Fixes the truthful "My name is Continuum Guardian" self-DoS false positive. - A3: role-negation regex anchored both ends ("art" no longer matches "I am not an artist"). - A4: quoted/reported speech documented as a named gap, pinned xfail(strict); quote-exclusion zones deliberately not implemented (evasion channel). - A5: pre-send gate is now scan-all-then-block per v0.1 Q1 ("no violation is silently dropped"): all detectors run, every finding latches, link log always written, then one raise, most severe first. The resolver now sees the full co-active set for a multi-violation message. - A6: consistency-vs-authenticity scope distinction documented in the addendum. Post-lock implementation note: A2 has a pinned residual gap — truncating a multi-word name and continuing unpunctuated pollutes the capture and false-positives (xfail-pinned; capitalization-gated continuation is the candidate v1.1 fix). Tests 330 + 4 xfail -> 344 passed + 6 xfail. README/CLAUDE.md stale "278 tests" corrected; M7 status row added to the README build table. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the M7 IdentityIntegrity constraint, spec-first, per
docs/m7_identity_integrity_ruling.md(LOCKED). Third M7 constraint, after CredentialIntegrity (#31) and LinkRestriction (#32).Scope: within-session only (v1), by design
An agent's declared identity (handle/name, persona, asserted role) must stay consistent for the duration of a session once declared. Cross-session change-rate ("how often do legitimate agents change bios/names") is an explicit deferred gap (§5) — it isn't observable from a single snapshot and needs the longitudinal cohort read now in progress. Shipping within-session now because it's a self-contained mechanism with no data dependency.
Grounded in the baseline pass
The baseline sampling found
✓ Verifiedis near-universal and non-discriminating, so IdentityIntegrity can't lean on platform trust signals — it's self-referential (does the agent stay consistent with what it declared).The load-bearing refinement: detection is mechanical only (§6)
The baseline pass also measured that first-person "I am / I do X" is the dominant normal register on Moltbook. A detector that fired on "identity claims" would collide with the most common sentence structure on the platform. So v1 detection is mechanical only:
"my name/handle is X","call me X","I am @X","this is u/X") naming something other than the declared identity."I am / I do X"or on@other-agentreferences.freeze + escalateis kept because detection is high-confidence and narrow — severity paired to confidence, not kept by default. Semantic persona-drift is deferred as anxfail(strict)-pinned gap.What's here
moltbook/moltbook.pi—identity_driftfield +IdentityIntegrity(priority: high,freeze + escalate); all three M7 constraints now enforced.moltbook/detector.py—scan_identity(mechanical).moltbook/client.py— captures declared identity once at session start (immutable; fresh client == fresh session == legitimate reset, §2), gate as Gate 3,IdentityDriftBlocked.Tests
16 (15 pass + 1 xfail). Highlight:
test_bare_first_person_claims_do_not_fireencodes the refinement — the detector stays silent on exactly the dominant register the baseline measured. Plus the violation/clean pair, role-negation, fresh-session reset, end-to-end block→freeze, and thexfail(strict)pinning the deferred semantic-drift gap. Updated the CredentialIntegrity/LinkRestriction enforce assertions for the third constraint.Full suite: 330 passed, 4 xfailed.
Not in scope (by ruling)
Cross-session identity change-rate (v1.1, pending cohort data), semantic persona-drift (deferred gap), and automation-cadence / coordinated-cluster signals (ManipulationFlag v1.1/v2).
🤖 Generated with Claude Code