mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-28 20:21:50 +01:00
Close a gap in the JWT candidate scanner: it took only the first three dot-joined segments of a chain, so a dotted prefix right before a bearer hid the real token from the fingerprint lookup. The scanner now offers every three-segment window in a chain, and both the read mask and the new write-time redactor share this one scanner. Add redactAuthoredRunBearer(): an exact registered-bearer match first, then a narrow JWT-shaped fallback that requires the header segment to decode as JSON with an alg member. This keeps an unexpanded variable, a placeholder, and the redaction marker untouched. Call it from addComment() for an agent-authored body, and from create() and update() for an agent-authored issue description — the two writers of issues.description. Each read runs on the caller's own transaction connection, and a failed lookup aborts the write instead of persisting unredacted text. Co-authored-by: Paperclip <noreply@paperclip.ing>