Refactor transcript tooling into modular quality API#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| def get_transcript(self, transcription_id: str) -> Optional[TranscriptDetail]: | ||
| if not transcription_id: | ||
| return None | ||
| with get_session() as session: | ||
| record = session.run( | ||
| self._TRANSCRIPT_DETAIL_CYPHER, transcription_id=transcription_id | ||
| ).single() | ||
| if not record: |
There was a problem hiding this comment.
[P1] Handle missing transcripts without raising driver error
The new get_transcript method calls session.run(...).single() and then checks if not record. single() raises neo4j.exceptions.ResultNotSingleError when the query returns zero rows, so a request to /transcripts/<id> with an invalid ID will crash the endpoint instead of returning a 404. Catch the exception or use single(strict=False) so the method can return None and the view can issue the expected 404 response.
Useful? React with 👍 / 👎.
Summary
quality_apipackage with configuration, database, embedding, and service layers powering a refreshed transcript search experiencecompare_transcripts.pywith an application factory that renders a modern UI, exposes JSON endpoints, and surfaces speaker/location context and transcript drilldownsTesting
https://chatgpt.com/codex/tasks/task_e_68d69ab947308325a0fe4763f8e4149f