INNER CODE UNIT · Python

signature

wolfSSL/wolfssl-examples · .github/scripts/issue_store.py:74

def signature(log):
    """Stable hash of what broke. Normalising paths and line numbers means an
    upstream whitespace shift does not notify, but a changed symbol does."""
    lines = ERR_RE.findall(log or "")[:3]
    if not lines:
        return "unknown"
    text = "\n".join(lines).lower()
    for pat, repl in NORM:
        text = pat.sub(repl, text)
    return hashlib.sha256(text.encode()).hexdigest()[:12]


# --- body ------------------------------------------------------------------


def parse_fp(body):
    m = FP_RE.search(body or "")
    return m.group(1) if m else None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…