People staging — confirm, merge, or dismiss inferred speakers#3
Merged
Conversation
Instead of auto-adding inferred speakers to people.json, they land in people-pending.json for user review. The People page shows a "new speakers detected" section with three actions: - Confirm — creates a new person - Merge — adds as alias to an existing person (click to pick who) - Dismiss — adds to dismissed-speakers.txt exclusion list Pipeline: - stage-people.py scans analysis speaker_maps, filters generic labels, stages new names (skips existing people, pending, and dismissed) - pocket-run.sh runs stage-people.py after analysis phase - Server endpoints: GET/POST pending confirm/merge/dismiss - GENERIC_LABELS trimmed to ~15 universal terms - User-configurable .seam/generic-speakers.txt for domain-specific exclusions
2 tasks
yoaquim
added a commit
that referenced
this pull request
Apr 25, 2026
## Summary - **CLAUDE.md** — added mandatory TDD (red-green-refactor), React, Tailwind, and Git practices - **Pre-commit hook** — runs `npm run build` + `npm test` before every commit. Committed to `.githooks/` and enabled via `git config core.hooksPath` - **23 new tests** for people staging (the feature merged in PR #3 had no tests): - `server/__tests__/pending-people.test.ts` — confirm, merge (with alias dedup), dismiss, 404s, file cleanup - `scripts/tests/test_stage_people.py` — generic label filtering, canonical name merging, skip existing/dismissed/pending, alias matching - **Branch protection** on main: PRs required, no force pushes, auto-delete merged branches ## Test plan - [x] `npm test` — 79 tests pass (38 vitest + 41 pytest) - [x] Pre-commit hook runs and blocks on failure
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Instead of auto-adding inferred speakers to
people.json, they now land inpeople-pending.jsonfor user review. This prevents false positives (e.g., "Ethan" being added when "Ethan Johnson" already exists) and gives users control over their people list.How it works
stage-people.pyscans allanalysis.jsonfiles forspeaker_mapentriesGENERIC_LABELS: ~15 universal terms like "speaker", "unknown", "host") + user-defined exclusions in.seam/generic-speakers.txt+ already-dismissed names.seam/people-pending.jsonwith metadata (mention count, which recordings)people.jsonwithsource: "inferred".seam/dismissed-speakers.txtso it won't resurfaceFiles changed
scripts/stage-people.py— new script, scans analyses and stages speakersscripts/pocket-run.sh— runsstage-people.pyafter analysis phaseserver/index.ts— new endpoints:GET /api/people/pending,POST .../confirm,POST .../merge,POST .../dismisssrc/hooks/usePendingPeople.ts— React hook for pending people APIsrc/pages/PeoplePage.tsx— pending speakers UI sectionContext
This is a follow-up to the discussion on PR #2 about
GENERIC_TOKENS. That PR'sseed-people.pyauto-added inferred speakers directly — this PR replaces that approach with a human-in-the-loop staging flow.Test plan
npm test— 52 tests pass (27 vitest + 25 pytest)