Rulings readout and the prior-art 500 fix #195

Merged
bvandeusen merged 2 commits from dev into main 2026-10-03 08:57:36 -04:00
Owner
  • #4768 "Write-path prior-art route 500s when a nameless search hit carries its excerpt under snippet": _prior_art_line now reads snippet.name only from a dict. Search hits carry their excerpt there as a string, which crashed /api/plugin/prior-art on some edits.
  • #4769 "Rulings are counted where someone will read them": system_usage_events is now read back.
    • retrieval_telemetry gains a system_usage block (by source, by System, with no pull-through ratio).
    • Each System carries usage on the REST list and detail and on MCP get_system.
    • The Systems UI shows a "rulings shown N×" chip.
    • The rulings sources are declared as registry points.

CI green on dev (run 7946, after a re-run past a pypi connect timeout).

🤖 Generated with Claude Code

- **#4768 "Write-path prior-art route 500s when a nameless search hit carries its excerpt under `snippet`"**: `_prior_art_line` now reads `snippet.name` only from a dict. Search hits carry their excerpt there as a string, which crashed `/api/plugin/prior-art` on some edits. - **#4769 "Rulings are counted where someone will read them"**: `system_usage_events` is now read back. - `retrieval_telemetry` gains a `system_usage` block (by source, by System, with no pull-through ratio). - Each System carries `usage` on the REST list and detail and on MCP `get_system`. - The Systems UI shows a "rulings shown N×" chip. - The rulings sources are declared as registry points. CI green on dev (run 7946, after a re-run past a pypi connect timeout). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 2 commits 2026-10-03 08:57:33 -04:00
fix(write-path): a search hit's excerpt under snippet no longer 500s the prior-art route (#4768)
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m5s
CI & Build / Python tests (push) Successful in 1m50s
CI & Build / Build & push image (push) Successful in 39s
1b973ebd13
#4768 "Write-path prior-art route 500s when a nameless search hit carries
its excerpt under `snippet`": _prior_art_line read item["snippet"] as a
snippet record's field dict, but a search hit carries its matched passage
there as a string. Read the name only from a dict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(rulings): system_usage_events is read back — per-System counts and a telemetry block (#4769)
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / integration (push) Successful in 50s
CI & Build / TypeScript typecheck (push) Successful in 52s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Python tests (push) Successful in 1m44s
CI & Build / Build & push image (push) Successful in 36s
0a1bb68808
#4769 "Rulings are counted where someone will read them": milestone 444
step 4 wrote system_usage_events and nothing read it.

- retrieval_telemetry gains a `system_usage` block: surfacings and opens by
  source, distinct counts, and `by_system` naming the areas most shown.
  There is deliberately no pull-through ratio, because rulings travel in full
  in the line and opens are the exception.
- usage_for_systems (one GROUP BY) adds `usage` to the REST Systems list and
  detail, and to MCP get_system. MCP list_systems is unchanged.
- The Systems UI shows a "rulings shown N×" chip.
- rulings_pre_tool, rulings_write_path and mcp_get_system are now declared
  registry points; the registry guard covers their recorders.
- The Systems store merges a PATCH reply instead of replacing the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit b4c637a7df into main 2026-10-03 08:57:36 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#195