Skip to content

Review fixes - #1

Merged
cloudsbird merged 4 commits into
mainfrom
review-fixes
Oct 2, 2026
Merged

cloudsbird merged 4 commits into
mainfrom
review-fixes

Conversation

@cloudsbird

Copy link
Copy Markdown
Owner

No description provided.

cloudsbird and others added 4 commits October 2, 2026 14:48
- The ONNX detector split words on a lowercased copy and returned those byte
  offsets for the original text, the same bug fixed earlier in the dictionary:
  characters whose case mapping changes length shifted every later span. Words
  are now located in the original text and lowercased only for the tokenizer.
- Spans from any extra detector are widened to character boundaries before use,
  so a misaligned span redacts too much instead of panicking or too little.
- Inference failures were swallowed silently, turning ML recall off unnoticed.
  They are now logged by stage (never text) and counted in
  portcullis_detector_errors_total.
- /healthz read the term count under the gateway lock and queued behind scans;
  it now reads a lock-free gauge.
- Split a six-element tuple into NerInput (clippy type_complexity under onnx).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…st fingerprint

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
teach/unteach overwrote the file from the server's in-memory copy, silently
dropping a term added by the CLI in the meantime. They now re-read the file
(when it exists), apply the change, and save, serialized by a dedicated writer
lock. The read and save run on the blocking pool, so Argon2 under encryption
no longer stalls requests behind the gateway lock. An unreadable file fails
the request rather than being overwritten.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The outbound assertion ran only over the serialized body, where JSON escaping
hides a taught term containing a quote, backslash or control character. Every
decoded string value and object key is now checked as well, with the
placeholder check kept to the whole body. Shared by both providers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cloudsbird
cloudsbird merged commit b163f95 into main Oct 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant