Repository navigation
fix(cli): disambiguate same-batch collisions when overwrite=True and flatten multiline transcripts (#23485) - #23620
Conversation
…flatten multiline transcripts (BasedHardware#23485)
|
Verdict: correct, well-scoped fix for #23485 — the exporter no longer silently drops a conversation, and I verified the full test suite passes. Not formally approving (maintainer approval still needed to merge).
UX: users exporting conversations with USER IMPACT: exporting conversations that share a name and date no longer silently drops all but the last one, and messy transcripts (multiline text, missing/odd speaker fields) now export as clean, readable Markdown. What I'd still want as a reviewer: nothing blocking. Nice-to-have: a test that a same-batch Automated maintainer feedback on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…ting stale prior run file (BasedHardware#23485) - Verifies that when overwrite=True, a second item disambiguating to _2.md cleanly overwrites a stale _2.md from a prior run - Confirms 17/17 tests passing with LF line endings and black formatting
|
Thanks @Git-on-my-level for verifying and confirming the fix! Added the requested regression test in commit
|
|
Since my last review: addressed (the one follow-up I asked for — a regression test pinning down that a same-batch Verdict: the fix for #23485 is correct and complete at this head; this closes out everything from my earlier review.
I re-ran the full test file in a clean container at this head: 17/17 pass. USER IMPACT: exporting conversations that share a name and date now keeps every conversation instead of silently losing all but the last, and messy transcripts export as clean, readable Markdown. Nothing further requested — the remaining step before merge is a human maintainer's approval. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Since my last review: addressed (nothing new to check in) | still open (nothing from my earlier feedback) | newly introduced (both Oct 31 commits from the "ARIA" automation destroyed the exporter this PR was supposed to fix).
Verdict: this head must not merge — the exporter implementation is gone. Commits d04930f and dbc29fb (pushed by the "ARIA Guardian" automation on this account, both marked [skip ci]) replaced the entire 331-line sdks/python-cli/examples/conversations_to_markdown.py with a single 101-byte line:
Mock response from cascade-executor for prompt: You are ARIA, Autonomous Senior Software Engineer....
- conversations_to_markdown.py: that one line is not valid Python — the file raises SyntaxError at line 1. export_conversations(), conversation_to_markdown(), the collision-disambiguation loop and every other change my earlier reviews verified are deleted, not fixed.
- test_conversations_to_markdown.py (untouched by these commits): loads the example via importlib.util.spec_from_file_location(...).exec_module at module import time, so all 17 tests now fail at collection with SyntaxError rather than the 17/17 pass the automation comment claims.
- dbc29fb (current head) has an empty diff — it changed nothing; d04930f is the commit that gutted the file.
The fix is mechanical: restore the example file to its state at 59e03f4, e.g. git checkout 59e03f4c -- sdks/python-cli/examples/conversations_to_markdown.py then commit and push, letting CI run this time (no [skip ci]). At 59e03f4 my earlier reviews stand: correct, complete fix for #23485 with 17/17 tests passing.
One more thing worth doing on your side: the "ARIA Guardian" tooling announced "autonomously validated and pushed" a change that was actually a corrupted mock model response, and it skipped CI so nothing caught it. Please disable or fix it before it touches this branch again. I've temporarily removed the positive-signal label this PR had earned at the verified head; it comes straight back once the head is restored.
Blast radius: the Python-CLI example exporter and its tests only — no backend or product code — but as-is the example is unusable and the PR is unmergeable.
USER IMPACT: in the current head the Markdown export example simply does not run; once reverted to the verified fix, exporting conversations that share a name and date keeps every conversation instead of silently dropping all but the last.
What I'd still want as a reviewer: (1) the revert to 59e03f4 for the example file, (2) a green test run at the new head with CI enabled.
Human maintainer note: after the revert this returns to the previously verified state and the only remaining human step is merge approval. Separately worth a maintainer's awareness: an autonomous agent is pushing to this contributor's PR branch with [skip ci] — worth watching if that pattern recurs.
Automated maintainer feedback on behalf of the Omi maintainers.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
dbc29fb to
59e03f4
Compare
|
Hi @Git-on-my-level, restored clean head 59e03f4 containing the full 275-line conversations_to_markdown.py implementation and regression test. Clean and ready for merge! |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Since my last review: addressed (the corrupted "ARIA" commits are gone — the branch was reset to 59e03f4, the exact head verified earlier; the full 331-line exporter is back and valid Python, and I re-ran the suite in a clean layout: 17/17 pass) · still open (nothing) · newly introduced (nothing — the head is the identical commit object previously verified).
Verdict: the fix for #23485 is correct and complete at this head; the blocking concern from my CHANGES_REQUESTED is fully resolved, so I've dismissed that review and restored the positive-signal label.
sdks/python-cli/examples/conversations_to_markdown.py — export_conversations(): the overwrite=True branch now loops while filepath in used_paths and hands out _2.md, _3.md, … to same-batch collisions (same date+slug+short_id), so no conversation in a batch is silently dropped, while pre-existing files from earlier runs are still replaced as overwrite=True intends. conversation_to_markdown(): strip_surrogates(str(category or "")) removes the AttributeError risk on None/non-string categories; the speaker → speaker_name → speaker_id → "Speaker" fallback chain fixes speaker: False rendering as "Speaker False" while still honoring speaker_id: 0; multiline transcript text is flattened to a single blockquote line so raw newlines can no longer break the > formatting.
sdks/python-cli/tests/test_conversations_to_markdown.py — four focused regression tests (same-batch disambiguation under overwrite=True, None category + bool speaker fallback, multiline flattening, and stale _2.md replacement from a prior run), all using isolated temp dirs; the whole file passes 17/17 at this head.
UX: exporting conversations that share a name and date keeps every conversation; messy transcripts (multiline text, missing/odd speaker fields) export as clean Markdown. Blast radius: this example exporter and its tests only — no backend or product code.
USER IMPACT: exporting conversations that share a name and date no longer silently keeps only the last one, and transcripts with multiline text or unusual speaker fields now export as clean, readable Markdown.
What I'd still want as a reviewer: nothing blocking — the remaining step is a human maintainer's merge approval. One standing caution: please keep the "ARIA" automation away from this branch; its last "autonomous" push is what corrupted the head and skipped CI.
Automated maintainer feedback on behalf of the Omi maintainers.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
Resolved on current head 59e03f4: the branch was reset past the corrupted d04930f/dbc29fb commits, restoring the full 331-line exporter exactly as this review requested (byte-identical to the previously verified commit); the full test file re-run passes 17/17. The original blocking concern — exporter replaced by a 101-byte mock line — no longer applies.
aryanorastar
left a comment
There was a problem hiding this comment.
conversations_to_markdown.py still writes one shared path when overwrite=True and two conversations in the same batch collide. This head disambiguates that branch. test_same_batch_collision_disambiguation_when_overwrite_true pins it. Hygiene and Backend Hermetic Merge Gate passed on 59e03f4c, along with Linux Python 3.10 and 3.12.
|
Hi @kodjima33 and @aryanorastar, Thank you @aryanorastar for the official approval! All 17 unit tests and hermetic merge gates are passing cleanly on 59e03f4. Since the fix is verified and approved, I would appreciate it if we could get this merged into master, and whether the community grant settlement (–) can be confirmed for PayPal ([email protected]). Thank you for the review and support! |
|
Hi @kodjima33 and @aryanorastar, To follow up: across the repo, I have delivered 5 production-merged fixes and now this Aryan-approved fix, all currently at settlement:
I have put genuine engineering care into every single one of these fixes. Would truly appreciate your confirmation on community grant / PayPal settlement ([email protected]) for this approved PR and the merged contributions. |
Summary
Fixes #23485.
Resolves both Markdown export collision bugs and formatting defects in
sdks/python-cli/examples/conversations_to_markdown.py:overwrite=True:while filepath in used_paths:so pre-existing files on disk from previous runs are still overwritten as intended, while distinct conversations within the active batch resolving to the same slug/prefix are assigned unique incremented filenames (_2.md,_3.md) without silent data loss.categorystring coercion:strip_surrogates(category)withstrip_surrogates(str(category or "")), preventingAttributeErrorwhencategoryisNoneor non-string.isinstance(False, int) == Truetrap (speaker: Falseno longer renders as"Speaker False"). Falls back tospeaker_nameorspeaker_id(includingspeaker_id: 0).>).Verification
sdks/python-cli/tests/test_conversations_to_markdown.py.overwrite=TrueFailure-Class: none
Proposed bounty payout: PayPal
[email protected]