Repository navigation
Conversation
|
🤖 Kiro Crew [operator: bolichen97#bb3ad1ca]: This PR has been inactive for 7+ days with failing CI. I reviewed the blockers but they require your input:
When you've addressed these, the pipeline will re-assess on its next cycle. |
bolichen97
left a comment
There was a problem hiding this comment.
Description / code mismatch
The Description, the spec, the module docstring, and the Manual verification section all describe the recording socket emitting redacted transcript events, but nothing on the socket's request path can produce one.
1. The recording socket never emits the redacted transcript events the Description says it emits
The Description says —
Interim/final transcript events emitted back to the browser are redacted first (
recording/ws.pyis a registered redaction sink insecurity_posture.py).
and, under Manual verification:
Confirmed interim level/transcript events were emitted back over the socket and passed through redaction.
The code does — _emit_transcript is the only place a partial/final transcript event is built and the only place the redactor is called, and api_ws_recording never calls it. No transcription is wired into this socket at all, so the redactor call is dead and no transcript event can reach the browser: src/kiro_crew/recording/ws.py:199. The PR's own frontend documentation agrees with the code rather than with the prose — the wire-protocol header in website/src/apps/meetings/hooks/useMeetingRecording.ts ("Wire protocol — conforms to kiro_crew/recording/ws.py:api_ws_recording") lists only ready and level coming back, while the backend module docstring claims the socket "emits ready, partial, final, level, and error events".
Risk — Four separate surfaces tell a reader that live transcription with credential/exfil redaction happens on this socket: the Description bullet, the spec's Recording section in docs/system-specs/modules/meetings.md, the recording/ws.py module docstring, and the Security Posture row. The panel therefore counts an egress boundary that no request can reach, and the drift guard cannot catch it — test/test_security_posture.py's TestRedactionSinkRegistry only checks that the named module contains a redactor call, so a dead one satisfies it. The sink registration is itself a consequence of the dead call rather than an independent problem: the guard forces any module calling a redactor into either _REDACTION_SINKS or NON_EGRESS_REDACTION_MODULES, so the entry had to be added once the unreachable call existed. What blocks is that the Manual verification bullet reports an observed outcome the code cannot produce, which leaves the rest of that section unreliable for a reviewer trying to decide what was actually exercised.
Required change — Either wire transcription into api_ws_recording so _emit_transcript is reached on the live path, or drop the claim: remove _emit_transcript and the now-unreachable persister path, remove the security_posture.py sink row with it, and correct the Description bullet, the spec's Recording section, the recording/ws.py module docstring, the test module docstring, and the Manual verification bullet to state that the socket carries audio in and ready/level/error out.
Audit note — this PR and #7196 are one branch stack, not duplicatesA duplicate-detection sweep flagged these two as near-identical because they share a large block of added lines. They are not duplicates: one branch contains the other's commits, so the shared lines are inherited, and the review diff overstates what this PR actually authored. This is the textbook stacked-branch artifact, provable by SHA rather than by reading code: What is genuinely each PR's ownIf #5738 merges, #7196 still carries all of its own work and loses nothing: 6 files #5738 never touches ( Suggested actionThis is the base of the stack — it can go first on its own. #7196 should rebase after it lands. From a repository-wide duplicate/overlap audit of every pull request open against |
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
|
@kaizawa97 We audited every open PR against Nothing on Four things are outstanding:
One smaller item: Audited at 4bb2f16. Posted from the 2026-09-08 open-PR relationship audit (read-only, one auditor per PR); reply here if any of this is wrong. |
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes: recording a second time in a meeting erases the first recording's audio.wav
Every recording in a meeting writes to the same file, and the writer opens it in truncating mode:
src/kiro_crew/recording/session.py:130-132:audio_path = self.storage_dir / "audio.wav", thenWavWriter(audio_path)andawait self._writer.open(). The name is fixed and nothing checks whether the file already exists.src/kiro_crew/recording/writer.py:68:self._wf = wave.open(str(self._path), "wb"). This truncates the file.src/kiro_crew/recording/ws.py:377: everystarton a new socket resolvesmeeting_idto the same meeting directory. The only guards are the per-socket "already started" check and the concurrency cap of one. Neither applies once the first socket has closed.
The UI offers Record again as soon as a recording ends. website/src/apps/meetings/MeetingView.tsx:190 shows it whenever status === 'active' && !recording.active. The paths that reach it:
- The socket drops (laptop sleep, network blip, 30 s heartbeat). The user sees "Recording stopped: the connection dropped." and clicks Record. If they click within about 30 s, the start can be refused with a 503 while the old session is still registered. The next click then succeeds and truncates the file.
- Stop recording, then Record.
- Close to review, go back to active, then Record. Or End, Restart, then Record.
useMeetingSession.ts:560callsrec.stop()in both cases. - With
stt.provider = "transcribe", the socket closes at 300 s and the toast says "The audio up to that point is saved." Clicking Record to continue deletes that audio.
The PR already knows about this for pause. useMeetingSession.ts:538 says "the next start would open audio.wav in the same directory again". But only a meeting pause is protected. The comment at useMeetingRecording.ts:222 says a new socket writes "a second file", but it actually reopens the same one. Checkers reproduced the problem end to end with the real api_ws_recording and MeetingsRecordingStore. They recorded 3.0 s, then recorded again on a second socket with the same meeting_id, and audio.wav ended up 0.5 s long.
This affects anyone who enables the Meetings app and records more than once in a meeting. There is no warning, and the lost audio can't be recovered.
Smallest fix: never open an existing recording with "wb". Either give each recording its own file (update AUDIO_FILENAME in recovery.py:34 and the spec's file table to match), or refuse start when audio.wav exists and hide Record in that case. Add a test that runs two sequential sockets with the same meeting_id and checks that the first recording is still intact.
From a full open-PR audit against origin/main c66f95b (2026-09-25); findings were checked by independent reviewers reading the code. Reply here if this is wrong.
Head branch was pushed to by a user without write access
4bb2f16 to
fc8f7c6
Compare
|
Re: a second Record erases Every recording now gets its own file: Regression: |
|
Re: The socket now carries audio in and emits only |
|
Re: the manifest highlight should be
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adds a recording package that owns an audio session: a state machine
per session, a WAV writer, and recovery scaffolding for a session whose
process died mid-recording. The dashboard exposes it at
/api/ws/recording, and the Meetings app resolves where a recording lands
through its own recording store.
The socket carries audio IN and emits only ready / level / error back.
It does not transcribe: the browser already streams the same PCM to
/api/ws/stt and the Meetings app persists that transcript, so the
never-reached transcript path (_emit_transcript, the live-transcript
persister and its security-posture sink row) is removed rather than
kept as a claim no request could satisfy.
Every recording of a meeting gets its own file -- audio.wav, then
audio-2.wav, ... -- and the writer creates it exclusively ("xb"). The
previous fixed name opened with "wb" truncated the earlier recording
the moment a user recorded a second time (stop then Record, a dropped
socket, the Transcribe duration cap). `ready` names the file so a client
can tell recordings apart.
The frontend captures both the microphone and the system output and
sums them inside the PCM worklet's two inputs ahead of main's polyphase
resampler, so the mix is anti-alias filtered once; a single-input node
(dashboard dictation) is unaffected. A meter shows input level so a
user can see the capture is live.
The session registry lock is a LoopBoundLock and the concurrency cap
has a single definition in session.py.
7ca088a to
ce2db28
Compare
Open-PR triage (2026-10-05): rebase needed, plus one blocking config bugI checked the full diff of this PR ( Relationship: DISTINCT from main. Not covered by anything merged. Rebase
Blocking bug (independently confirmed; same as the GPT review's F1, so no separate change request)
Overlap (merge-order discussion, not duplicates)
Still outstanding from the bots: Design/UX BLOCK because the description has no screenshots from the current head. |
|
Steward review (no merge). This PR is the canonical implementation attempt for #2814 but, as written, conflicts with two premises stated in that issue, and the three maintainer questions behind it are still unruled:
Also mechanical: the branch is currently CONFLICTING with These are design decisions the issue flags as a maintainer call (platforms, consent UX, recording-others policy, retention). Leaving as-is pending that ruling — not merging. |
|
Thanks for this PR. It now conflicts with main. Could you rebase onto the latest main and resolve the conflicts? We will review it again once it is rebased and CI is green. This branch has had no activity for over 30 days. If there is no further activity in the next 14 days, we may close it. You can always reopen it or open a new PR later. |
Proposes answers to the three maintainer questions left open in kirodotdev#2814 (platform scope, capability reporting, consent boundary), backed by measurements of getDisplayMedia system audio in Chrome and in the Electron shell, and a phased plan whose first phase mixes the computer audio with the microphone ahead of the existing worklet so the STT protocol and the server stay unchanged. Records the Electron-on-macOS gap (electron/electron#47490) as out of scope and names the two open PRs (kirodotdev#5738, kirodotdev#7196) that conflict with the issue's premises.
Problem / Motivation
Goal: Record the whole meeting — the local microphone and the far side — to a plain WAV file in the user's own data directory.
The Meetings app transcribes a meeting but keeps no audio. Once the meeting ends, the transcript is the only record — a misheard sentence, a number the STT mangled, or a dispute about what was actually said cannot be checked against anything. And transcription only hears the local microphone: the other participants of a call (the audio the conferencing app plays back) never reach the app at all.
Why it matters
For any real meeting the far side is most of the content. Without capture of both sides and a durable recording, the notes are only as good as one microphone plus the recognizer's first guess, with no way to recover from either.
Not a goal
/api/ws/stt.What changed (motivation → approach → change)
A meeting can now be recorded to
audio.wavbeside its notes, and a second recording in the same meeting gets its own file instead of erasing the first.src/kiro_crew/recording/adds/api/ws/recording: audio in; onlyready,levelanderrorout. It refuses anything but a direct local request by default (recording.require_local_gateway, a new core config key), and config and storage work run off the event loop.audio.wav, then the first freeaudio-<n>.wav— with exclusive create, so an existing recording is never opened for writing. One recording is capped at four hours of audio (about 461 MB); at the cap the file is finalized and the client is told why. A failure while finalizing the WAV is reported to the client and the audit trail.backend/recording_store.pyis registered fromregister_routes, so core finds the per-meeting directory without importing the app; an id core cannot place is refused.useMeetingTranscriptionowns the one audio pipeline and tees each PCM block to the recording. The far side comes fromaudio/systemAudio.ts; the worklet sums the two inputs before main's polyphase resampler, so the mix is anti-alias filtered once and mic-only output is unchanged. Stop drains the worklet first, so the last moment of audio is kept.ErrorNoticewith an ask-the-agent hand-off.Why a separate socket:
/api/ws/sttcaps a stream at 300 s, right for dictation and far too short for a meeting; the recording socket's only bound is its own size cap. Why local-only by default: raw room audio is the most sensitive artifact this app produces.Wiring: the socket is registered in
dashboard/routes/memory.pybeside/api/ws/stt. Therecordingsection lives inconfig/sections.pyand is loaded byconfig/loader.py;config-baseline.jsongains its two entries. The app manifest (appManifest.ts) adds the/api/ws/recordingpermission and one highlight (highlight_7). The recording strings are added to every catalog underwebsite/src/i18n/locales/(for examplelocales/en.json,locales/ja.json). The spec (docs/system-specs/modules/meetings.md) describes the socket contract, one file per recording, and the mixing.Backwards compatibility
Compatible: the socket, the config section and the files are new; nothing main accepts today is rejected or renamed.
Tests
test/test_recording.py— WAV writer (exclusive create, header finalized) and the session state machine;next_audio_pathnumbering; name probing runs off the event loop.test/test_recording_storage.py— theMeetingStoreseam, and two sequential sockets for one meeting keep the first file byte-identical.test/test_recording_ws.py— socket protocol, a forwarded request refused while local-only is on, config and store resolution off the event loop, no transcript on the wire, one concurrency cap, no STT-derived deadline, and the size cap (stops on a whole sample and keeps what fit).website/src/test/pcmWorklet.test.ts— two-input mixing through the real processor: sum not average, clipping, mic-only identical, short blocks, a tone mixed through the FIR.website/src/test/MeetingsRecording.test.ts,UseMeetingSessionCoverage.test.tsx,UseMeetingTranscriptionCoverage.test.tsx— the socket lifecycle, Record gated on live capture, system-audio release on every pre-ready failure, the persistent error notice.Manual verification
Earlier end-to-end run against a harness gateway: opened the socket, received
ready, streamed 2 s of 16 kHz mono PCM, stopped, and got a well-formedaudio.wav(32000 frames) under the meeting's own data directory. Not yet re-run on this head. A real conferencing call's far-side audio is not verified here; that path is Electron-dependent and covered by #7196.Screenshots / video
The frames below predate this head: Record and Stop recording have since moved from the toolbar into its overflow menu (main's two-buttons-per-row layout), and a recording failure now shows an inline error notice. A fresh capture from this head is still to come.
Related Issues
no linked issue: part of the Meetings feature stack; the Electron system-audio capture in #7196 is stacked on this PR.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)