Commit 3ef7d42
redact: preserve thinking-block signatures (fix omp replay 400)
shouldSkipJSONLField only skipped a field named exactly "signature"
(Claude Code). Oh My Pi stores the extended-thinking signature under
"thinkingSignature", which slipped through to the entropy scanner. Its
value is high-entropy base64, so redaction replaced segments with
"REDACTED", corrupting the signature.
When such a redacted transcript is replayed, the Anthropic API rejects it
with "messages.N.content.0: Invalid `signature` in `thinking` block" (400)
— it validates signatures on every history turn, not just the last.
Skip any field whose lowercased name ends in "signature" (covers
"signature" and "thinkingSignature"). "signatures" (plural) still redacts.
Add field-skip and end-to-end preservation tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 11fbdc6 commit 3ef7d42
2 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
830 | | - | |
| 830 | + | |
| 831 | + | |
831 | 832 | | |
832 | | - | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
833 | 841 | | |
834 | 842 | | |
835 | | - | |
836 | 843 | | |
837 | 844 | | |
838 | 845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
248 | | - | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| |||
292 | 294 | | |
293 | 295 | | |
294 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
295 | 313 | | |
296 | 314 | | |
297 | 315 | | |
| |||
0 commit comments