No Reviewers
Labels
Clear labels
area/ai-pipeline
area/auth
area/billing
area/correlation
area/discord
area/frontend
area/governance
area/growth
area/infra-deploy
area/legal
area/map
area/mqtt
area/node-ota
area/osint
area/recording-audio
area/sdr-radio
area/transcription
board
board:agenda
minutes:draft
minutes:final
role:ceo
role:cfo
role:cio
role:ciso
role:cmo
role:coo
role:cto
Scene/entity extraction, summarizer, AI providers, embeddings
AuthN/Z, roles, tenancy/org scoping, API keys, credentials
Plans, entitlements, AI spend accounting and caps
Incident correlation, linking, lifecycle, severity, corr_debug
Discord bot, radio bots, voice streams, bot tokens, webhooks
Web UI: Next.js app and the edge-node local dashboard
Board process, minutes, unattended runner, agent tooling
Go-to-market, outreach, cold email, discovery conversations
CI/CD, VM, registry, Firestore rules/indexes deploy, Terraform/Caddy
ToS, retention, licences/DAAs, CAN-SPAM, E&O, name suppression
Live map: pins, paths, tiles, legend, geocoding
Node-C2 MQTT, checkins, commands, node sweeper, dynsec
Node install, enrollment, OTA updater, image skew
External feeds: cameras, 511, ADS-B, AIS, outages, and their licences
Call capture, boundaries, PulseAudio, ring buffer, trimming, attribution
OP25 decode, SDR hardware/tuning, conventional, second SDR, mesh radio
STT, transcript correction, place verification, name accuracy
Board process: minutes and board-filed items
Needs board scoping at the next sitting; CEO removes the label once scoped
One exec pre-read, closed by CEO
CEO ruling; open until enacted
Filed by the CEO
Filed by the CFO
Filed by the CIO
Filed by the CISO
Filed by the CMO
Filed by the COO
Filed by the CTO
kind
behavior-bug
Wrong product behavior; the instrument reads it correctly
kind
measurement-bug
Corrupts the recording/instrument (debug data, evals, health checks), not behavior
priority
p0
Drop everything: prod broken, live exposure, or owner-ruled P0
priority
p1
Next up: blocks a gate, a customer, or core incident quality
priority
p2
Normal: real defect or planned work, schedule in turn
priority
p3
Low: minor, cosmetic, or someday
status
blocked
Waiting on an external party, spend, or another issue
status
in-progress
Branch or PR open against it
status
needs-decision
Waiting on an owner or board ruling before work
status
needs-info
Root cause or repro unknown; needs a reading first
type
bug
Something built is wrong: code, data, or a measurement
type
chore
Maintenance, refactor, tests, pinning, cleanup: no user-visible change
type
decision
A ruling to make or record: board minutes, owner calls, legal reviews
type
docs
Docs, runbooks, CLAUDE.md, skills, SOPs
type
feature
New capability or an extension of an existing one
type
security
Security, privacy, credential or tenant-isolation exposure
type
tracking
Tracker, checklist, initiative or punch-list spanning several changes
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: logan/server-26#132
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #96 and #114.
Shared root cause
A single radio transmission can extract into 2+ scenes, and
upload.py'sfor scene in scenes:loop (two near-identical copies — main upload path and the reprocess path) correlates each scene independently against the SAME call doc. Two different bugs came from the same missing structure:corr_debugflat onto the call doc viaincident_correlator._apply_and_log->fstore.doc_set("calls", call_id, corr_debug). Scene 2's write silently overwrote scene 1'scorr_path/corr_consensus/corr_llm_action/etc, so the doc described a splice of decisions, not any one of them, andadmin.py's tally blended them into one data point per call instead of one per scene — invalidating any per-link rate computed from it (e.g. #35's LLM-tier-share figure).summarizer.pyreaddoc["transcript"](the whole call, raw) for every linked call, so an incident's summary mixed in text from scenes it wasn't part of, and ignoredtranscript_correctedentirely.#80/#95/#102 fixed the same root gap for embedding/severity/coords/LLM-prompt-transcript by threading the scene's own value through
ctxat correlation time. That approach doesn't help here because both #96 and #114 need to read the value back after correlation, per scene — nothing before this PR persisted scene-scoped data at all.The fix
Scene index threading. Both
for scene in scenes:loops inupload.pybecomefor scene_index, scene in enumerate(scenes):, passingscene_indexinto_correlate_with_consensus->incident_correlator.preview_correlation/correlate_call->_build_context->ctx["scene_index"](default 0 for every caller with no scene concept — the recorrelation sweep, the no-scenes-extracted orphan-check path).New additive schema.
incident_correlator._apply_and_lognow writes, in the same Firestore call:corr_*fields, unchanged — last-scene-wins, kept as the safe backward-compatible default for any reader that doesn't know aboutscenesyet.scenes.<scene_index> = {"transcript": ..., "incident_id": ..., "corr_debug": {...}}, written viadoc_set(..., merge=True).Confirmed (not assumed): Firestore's
DocumentReference.set(data, merge=True)recursively merges nested map fields by key — a write of{"scenes": {"1": {...}}}merges into an existing{"scenes": {"0": {...}}}to produce both keys side by side, rather than replacing the wholescenesmap. The realgoogle-cloud-firestoreSDK isn't installed in the sandboxed test environment (it's runtime-only, stubbed out intests/conftest.py), so this is verified against the documented SDK contract and pinned by a hand-written recursive-merge fake in the new tests, rather than exercised against live Firestore.scene_indexdefaults to 0, so a plain single-scene call still gets ascenesmap with one entry — equivalent to reading its flat fields today, not a behaviour change for that population.#96's fix.
admin.py's_call_summarygains ascenesfield (list of per-scene records using the samecorr_*field names as the flat fields, so the two shapes are interchangeable). The summary tally now iteratessceneswhen present, else falls back to the call's own flat fields for old-schema docs — a 2-scene call with two differentcorr_pathvalues now counts as two data points instead of one blend. Newscene_decision_countsits next to the unchangedlinked_call_countto make that distinction visible.#114's fix.
summarizer.py's new_scene_text_for_incidentreads a linked call'sscenesmap for the scene(s) whoseincident_idmatches the incident being summarized (joining more than one if several scenes happened to land in the same incident), and falls back totranscript_corrected or transcriptfor a call doc with noscenesfield. That fallback is the one-liner half of #114 and applies even to old-schema docs, so raw-transcript summaries stop regardless of schema.Does not touch #80/#95/#102's existing ctx-threading fixes (embedding/severity/coords/LLM-prompt-transcript) — correct as-is, out of scope here.
Tests
14 new tests:
tests/test_per_scene_call_doc.py— a 2-scene call lands distinctcorr_path/corr_consensusinscenes.0/scenes.1while the flat fields show last-scene-wins; the scene entry records theincident_idit resolved to; a single-scene call still gets an equivalent one-entryscenesmap; an emptycorr_debugwrites nothing at all (unchanged short-circuit). Uses a hand-written Firestore-merge-semantics fake, since the real SDK isn't available in this sandbox.tests/test_admin_debug_correlation.py(additions) — the tally counts a 2-scene call as 2 data points, a plain single-scene call as 1, and an old-schema call doc (noscenesfield) as 1 — no errors, no regressions to the existing flat-field exposure.tests/test_summarizer_scene_transcript.py—_scene_text_for_incidentpicks the right scene's text per incident, joins multiple matching scenes, and falls back correctly for old-schema docs; an end-to-end_summarize_incidenttest confirms a 2-scene call only contributes its incident-relevant scene's text to the model call, not the whole-call blend.Full sandboxed suite (
drb-c2-core,PYTHONPATH=.../site python3 -m pytest -q): 364 -> 378 passed, all green, no regressions.🤖 Generated with Claude Code
https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix