Skip to content

feat(addie-admin): render shadow shape badges + source-distinct labels - #3647

Merged
bokelley merged 2 commits into
mainfrom
bokelley/admin-shape-panel
Apr 30, 2026
Merged

bokelley merged 2 commits into
mainfrom
bokelley/admin-shape-panel

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Closes the third follow-up from the prompt-engineer review of #3601. The admin-addie shadow eval panel was rendering knowledge-gap signal but not the shape grader output the corrected-capture pipeline now persists, and was not differentiating between the two corpora that land in the same thread context.

Changes (one file: `server/public/admin-addie.html`)

  • Shape badges: every `shadow_eval_shape.{shadow,human}.violations` label renders as a pill — `length_cap(243>200)`, `default_template`, `structured_heavy`, `comprehensive_dump`, `signin_opener`, `ritual:great question`. Word counts and ratio-to-expected sit in the column header.
  • Source-distinct headers: `shadow_eval_source: 'addie_corrected_capture'` → "Corrected Capture"; default → "Shadow Evaluation". A one-line subtitle clarifies which one applies on this thread.
  • Corpus caveat: "Corpus is selected for human intervention — counts here are not a global rate." Prevents miscomputing prevalence.
  • Response-label fix: side-by-side comparison shows "ADDIE'S ACTUAL RESPONSE" for corrected-capture (the stored value is her real reply) and "ADDIE WOULD HAVE SAID" for suppression (the stored value is a regenerated shadow).

Test plan

  • Type-check clean (pre-commit hook).
  • Visual check post-deploy: corrected-capture threads now show "Corrected Capture" header + shape badges; suppression threads show "Shadow Evaluation" + shape badges.
  • Spot-check a thread where the grader fired multiple violations (e.g., `length_cap` + `default_template`) renders both badges side by side.

Why now

`shadow-corrected-capture` job is running in production (every 30 min) since #3601 deployed. Without this rendering, the shape grader's output is invisible to anyone reviewing threads in the admin UI — the data is correct but unviewable.

🤖 Generated with Claude Code

bokelley and others added 2 commits April 30, 2026 06:03
Closes the third follow-up from the prompt-engineer review of #3601.
The admin-addie shadow eval panel was rendering knowledge-gap signal
but not the shape grader output the corrected-capture pipeline now
persists, and was not differentiating between the two corpora that
land in the same thread context (suppression-flow vs corrected-capture).

The panel now:

- Shows pill-style badges for every shape violation on both Addie's
  response and the longest human reply, drawn from
  context.shadow_eval_shape.{shadow,human}.violations. Reviewers see
  length_cap, default_template, structured_heavy, comprehensive_dump,
  signin_opener, and ritual:phrase hits without expanding the response
  comparison. Word counts and ratio-to-expected sit in the column header.
- Headers the panel "Corrected Capture" when shadow_eval_source is
  'addie_corrected_capture' (Addie posted, a human followed up with
  a correction) and "Shadow Evaluation" otherwise (Addie was suppressed
  because humans answered first).
- Adds a one-line caveat — "Corpus is selected for human intervention —
  counts here are not a global rate" — to prevent miscomputing prevalence
  from this corpus.
- Renames the side-by-side response label from "ADDIE WOULD HAVE SAID"
  to "ADDIE'S ACTUAL RESPONSE" when source is corrected-capture; the
  stored value is her actual reply, not a regenerated shadow.

API path /api/admin/addie/threads/:id already returns the full thread
context (`...thread` spread), so the new fields are exposed without
any server work.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Reviewer nit: `ratio_to_expected ?? 0` rendered a missing ratio as
'0.00' while sibling `word_count ?? '?'` rendered '?'. Both fields
come from the same persisted shape summary, so a missing one of them
should read the same way.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@bokelley
bokelley merged commit fef6cdc into main Apr 30, 2026
9 checks passed
@bokelley
bokelley deleted the bokelley/admin-shape-panel branch April 30, 2026 10:06
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