|
| 1 | +# M7 Constraint Ruling — IdentityIntegrity |
| 2 | + |
| 3 | +**Status:** LOCKED / binding for implementation (signed off 2026-07-16). Canonical spec-first ruling |
| 4 | +required by `CLAUDE.md` and the `pi-script-constraint` skill for the IdentityIntegrity constraint in |
| 5 | +the M7 (Moltbook) deployment. Build order: `moltbook/moltbook.pi` (entity + constraint) → |
| 6 | +mechanical-contradiction detector → gate wiring in `moltbook/client.py` → tests including the |
| 7 | +gap-documenting `xfail` for deferred semantic drift. |
| 8 | + |
| 9 | +**Numbering note:** No grammar change — Form 2 `equality_rule` |
| 10 | +(`MoltbookSession.identity_drift must equal false`), same shape as CredentialIntegrity / |
| 11 | +LinkRestriction. Application-level M7 ruling, not a 9.x grammar ruling. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## 1. Scope note (read this first) |
| 16 | + |
| 17 | +This ruling is deliberately **partial**. The M7 baseline sampling pass |
| 18 | +(`Moltbook_Baseline_Sampling__M7_IdentityIntegrity.md`) found that cross-session identity |
| 19 | +change-rate — "how often do legitimate agents change bios/names vs. how static they are" — is **not |
| 20 | +observable from a single snapshot**: Moltbook's profile UI has no edit history, and answering it |
| 21 | +properly needs longitudinal cohort data (pinned at T0 2026-07-16, re-sampling in progress). This |
| 22 | +ruling covers only what's grounded today: **within-session identity consistency**. The cross-session |
| 23 | +change-rate threshold is an explicit, named gap (§5) — not something this ruling pretends to solve, |
| 24 | +same discipline as CredentialIntegrity's encoding-gap `xfail` pins. |
| 25 | + |
| 26 | +## 2. Ruling (locked text, scoped to within-session) |
| 27 | + |
| 28 | +The M7 agent's declared identity — its stated name/handle, bio/persona claims, and any role it |
| 29 | +asserts for itself — must remain consistent for the duration of a session once declared. A violation |
| 30 | +is: the agent's own outbound content asserts an identity claim (name, role, persona, "I am / I do X") |
| 31 | +that contradicts the identity it declared at session start, within the same session, with no |
| 32 | +session-boundary reset in between. |
| 33 | + |
| 34 | +This does **not** cover: the platform-level profile fields (bio text, avatar, verified badge) |
| 35 | +changing **between** sessions — the deferred cross-session piece (§5); or a human owner legitimately |
| 36 | +reconfiguring the agent between deployments — **a fresh session start is a legitimate reset point, |
| 37 | +not a violation.** |
| 38 | + |
| 39 | +## 3. Why (grounded in the baseline pass) |
| 40 | + |
| 41 | +The baseline sampling found `✓ Verified` is near-universal and does **not** discriminate legitimate |
| 42 | +agents from low-effort or manufactured accounts — a verified content-farm account (`lyralink`) |
| 43 | +carries the same badge as serious participants. So IdentityIntegrity **can't lean on platform trust |
| 44 | +signals**; it has to be **self-referential** — does the agent stay consistent with what *it itself* |
| 45 | +declared, independent of what the platform badges it as. That is a narrower, more defensible claim |
| 46 | +than "detect fake identities," and it is the part actually supported by what was observed. |
| 47 | + |
| 48 | +## 4. Constraint definition |
| 49 | + |
| 50 | +``` |
| 51 | +entity MoltbookSession { |
| 52 | + credential_exposed: boolean |
| 53 | + link_violation: boolean |
| 54 | + identity_drift: boolean // set true by the within-session consistency gate (§6) |
| 55 | + session_id: identifier |
| 56 | +} |
| 57 | +
|
| 58 | +constraint IdentityIntegrity { |
| 59 | + priority: high |
| 60 | + rule: MoltbookSession.identity_drift must equal false |
| 61 | + on_violation: freeze + escalate |
| 62 | +} |
| 63 | +``` |
| 64 | + |
| 65 | +`priority: high` — same tier as LinkRestriction: a self-contradiction is an authority/trust-integrity |
| 66 | +failure, serious and freeze-worthy, but not irreversibly-exploitable the way a leaked key is. |
| 67 | + |
| 68 | +## 5. The explicit gap — cross-session change-rate (deferred, not solved) |
| 69 | + |
| 70 | +This ruling does **not** define, and IdentityIntegrity v1 does **not** enforce, any threshold on how |
| 71 | +often bio/name/persona changes **between** sessions. That requires the longitudinal cohort read (now |
| 72 | +pinned and running) to establish what "normal" static-vs-mutable actually looks like for legitimate |
| 73 | +agents before any number gets written into a rule. Until that data exists, cross-session identity |
| 74 | +change is **not** a v1 violation — flagging it now would be exactly the "identity_consistency > 0.85 |
| 75 | +because it feels right" mistake the recon notes warned against. Revisit as IdentityIntegrity v1.1 |
| 76 | +once the cohort data lands. |
| 77 | + |
| 78 | +## 6. Detection — mechanical contradiction only (v1) |
| 79 | + |
| 80 | +**This section was deliberately narrowed at sign-off, and the narrowing is load-bearing.** The |
| 81 | +baseline pass found that first-person "I am / I do X" declarative claims are the **dominant normal |
| 82 | +posting register** on Moltbook. A detector that fires on "identity claims" in general would collide |
| 83 | +with the single most common sentence structure on the platform — a false-positive machine aimed at |
| 84 | +normal traffic. So v1 detection is restricted to **mechanically-checkable contradictions** of the |
| 85 | +identity captured at session start: |
| 86 | + |
| 87 | +1. **Handle/name contradiction.** At session start the client captures the agent's declared handle |
| 88 | + (and optional display name), held immutable for the session. The detector flags outbound content |
| 89 | + only when it asserts a *different* self-identity through an **explicit self-naming construct** — |
| 90 | + `"my name/handle/username is X"`, `"call me X"`, `"I go by X"`, `"posting/signing as X"`, or a |
| 91 | + handle-prefixed self-claim `"I am @X"` / `"this is u/X"` — where X does not match the declared |
| 92 | + handle or name. Bare `"I am <phrase>"` **without** a `@`/`u/` prefix or a naming verb is NOT an |
| 93 | + identity claim (this is the guard against the dominant-register collision — "I am confident", |
| 94 | + "I am the senior engineer who read the paper" must not fire). A `@X`/`u/X` reference to *another* |
| 95 | + agent (e.g. `"@bytes nailed it"`) is not a self-claim and must not fire. |
| 96 | +2. **Direct role negation.** The detector flags outbound content that explicitly negates a declared |
| 97 | + role string — `"I am not <declared_role>"` / `"I'm not <declared_role>"` — for a role captured at |
| 98 | + session start. Only direct negation of a captured role, not open-ended role inference. |
| 99 | + |
| 100 | +**Deferred as a named gap (v1.1+): semantic persona-drift.** Detecting a subtle voice/persona shift |
| 101 | +that contradicts the declared identity *without* an explicit handle/name/role construct is an |
| 102 | +open-ended semantic-NLU problem and a false-positive minefield against Moltbook's confident, |
| 103 | +declarative baseline tone. It is deferred exactly the way CredentialIntegrity deferred generic |
| 104 | +secret-shaped regexes and LinkRestriction deferred malicious-link judgment. It is pinned by an |
| 105 | +`xfail(strict)` test (§8) so nobody "fixes" it into enforcing something unmeasured, and so a future |
| 106 | +improvement surfaces as a visible `xpass`. |
| 107 | + |
| 108 | +**Severity is paired to detection confidence (the reason the narrowing matters).** `freeze + |
| 109 | +escalate` freezes the whole session; that is only honest when a violation is high-confidence. Broad |
| 110 | +semantic detection + freeze would be a false-positive machine aimed at normal traffic. The mechanical |
| 111 | +scope above **is what justifies keeping `freeze + escalate`** — it is kept *because* v1 detection is |
| 112 | +high-confidence, not kept by default and hoped to hold up. If detection were ever broadened to fuzzy |
| 113 | +semantic drift, the action would have to soften to `flag`/`warn` until that detector proved out. |
| 114 | + |
| 115 | +## 7. Detection mechanics + layer split (unchanged pattern) |
| 116 | + |
| 117 | +A pre-send gate in the client captures declared identity once at session start and compares every |
| 118 | +outbound action against it per §6. On a mechanical contradiction: latch `identity_drift`, block the |
| 119 | +send (pre-send-gate-is-primary-control, same as CredentialIntegrity/LinkRestriction), raise |
| 120 | +`IdentityDriftBlocked`, `freeze + escalate`. A blocked attempt still latches (belt-and-suspenders). |
| 121 | +Prevention is client-side; Pi Script is the enforcement latch + audit. A fresh client / fresh session |
| 122 | +is a legitimate reset — the declared identity is re-captured, so a between-session change is not a |
| 123 | +within-session violation (§2). |
| 124 | + |
| 125 | +## 8. Relationship to the other M7 constraints |
| 126 | + |
| 127 | +Automation-cadence signals (e.g. the metronomic ~3-min posting pattern the baseline pass flagged in |
| 128 | +`neo_konsi_s2bw`, and the coordinated cross-citation machine in `pepper_pots`) are **explicitly not** |
| 129 | +part of IdentityIntegrity — those are behavioral/structural signals, ManipulationFlag v1.1/v2 |
| 130 | +territory. IdentityIntegrity stays scoped to **self-consistency of declared identity**, not detecting |
| 131 | +bots by behavior. CredentialIntegrity (secret exfiltration) and LinkRestriction (link provenance) |
| 132 | +remain distinct sibling constraints; all three enforce on `MoltbookSession`. |
| 133 | + |
| 134 | +## 9. Required tests (per CLAUDE.md) |
| 135 | + |
| 136 | +In `tests/test_moltbook_identity_integrity.py`: |
| 137 | + |
| 138 | +- **Deliberate-violation:** agent declares identity X at session start; later same-session outbound |
| 139 | + content asserts a contradicting handle/name via an explicit self-naming construct → gate latches |
| 140 | + `identity_drift`, blocks, resolver `frozen` / `freeze + escalate`. Include a role-negation case. |
| 141 | +- **Clean-pass:** consistent identity throughout a session (including bare first-person "I am / |
| 142 | + I do X" claims that are the normal register, and `@other-agent` references) → `identity_drift` |
| 143 | + stays false, `running`. Plus a fresh-session-boundary case: re-declaring a different identity in a |
| 144 | + *new* session is NOT a violation (models §2 reset). |
| 145 | +- **Dominant-register guard:** normal declarative first-person content ("I am confident this parses", |
| 146 | + "I processed the document") does NOT fire — the explicit test that §6's narrowing holds. |
| 147 | +- **Gap-documenting `xfail(strict)`:** a semantic persona-drift case with no explicit handle/name/ |
| 148 | + role construct asserts the *aspirational* catch (`is_contradiction is True`); it currently fails by |
| 149 | + design (mechanical detection can't see it), documenting the deferred §6 gap exactly as |
| 150 | + CredentialIntegrity's encoding pins do, and flipping to a visible `xpass` if detection improves. |
| 151 | + |
| 152 | +## 10. Decisions log (resolved) |
| 153 | + |
| 154 | +1. **Name — `IdentityIntegrity`.** Consistent with the M7 set. |
| 155 | +2. **Scope — within-session only for v1.** Cross-session change-rate deferred to v1.1 pending the |
| 156 | + longitudinal cohort (§5). Shipped now because within-session is a self-contained mechanism with no |
| 157 | + data dependency, and holding it hostage to a 2+-week-out data collection is the weaker trade. |
| 158 | +3. **Detection — mechanical contradiction only (§6).** Handle/name via explicit self-naming |
| 159 | + constructs + direct role negation. Semantic persona-drift deferred as an `xfail`-pinned gap. |
| 160 | + Chosen because the baseline pass measured "I am / I do X" as the dominant normal register; a broad |
| 161 | + detector would fire on normal traffic. |
| 162 | +4. **`priority: high`, `freeze + escalate` — kept, justified by the narrowed detection.** Severity is |
| 163 | + paired to confidence; the mechanical scope is what makes freezing the session defensible. |
0 commit comments