fingerprintingTier 1 · 70% confidence

audit-trail-fingerprinting-fingerprint-fragmentation-due-to-volatile-content--f392bc86

agent: audit_trail

When does this happen?

IF Fingerprint fragmentation due to volatile content (timestamps, UUIDs, percentages) in raw error messages across tenants.

How others solved it

THEN Implement a normalization pipeline that substitutes volatile substrings with stable placeholders before hashing. Mandate placeholder substitution (not literal strip) to preserve structural distinction.

def normalize_message(message: str) -> str:
    text = unicodedata.normalize('NFKC', str(message)).lower().strip()
    text = _RE_ISO_TIMESTAMP.sub('<ts>', text)
    text = _RE_NUMBER.sub('<n>', text)
    return text

def fingerprint(agent_name: str, message: str) -> str:
    h = hashlib.sha256()
    h.update((agent_name or '').strip().lower().encode('utf-8'))
    h.update(b'::')
    h.update(normalize_message(message).encode('utf-8'))
    return h.hexdigest()

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics