TSA-140: [BE] Keep structured output in sync with corrected text - #326
Merged
Yehor-Makarenko merged 42 commits intoSep 23, 2026
Merged
Yehor-Makarenko merged 42 commits into
Yehor-Makarenko merged 42 commits into
Conversation
…uctured-output-with-corrected-text
…' of github.com:BinaryStudioAcademy/bsa-2026-transcripta into feat/TSA-140-sync-structured-output-with-corrected-text
…uctured-output-with-corrected-text
arturobdev
requested changes
Sep 18, 2026
arturobdev
requested changes
Sep 19, 2026
arturobdev
added this pull request to stack #340
September 19, 2026 02:25
…' of github.com:BinaryStudioAcademy/bsa-2026-transcripta into feat/TSA-140-sync-structured-output-with-corrected-text
…uctured-output-with-corrected-text
…uctured-output-with-corrected-text
arturobdev
reviewed
Sep 21, 2026
…uctured-output-with-corrected-text
RomanNabukhotniidev
previously approved these changes
Sep 23, 2026
…uctured-output-with-corrected-text
arturobdev
reviewed
Sep 23, 2026
…uctured-output-with-corrected-text
Closed
4 tasks
…uctured-output-with-corrected-text
…uctured-output-with-corrected-text
RomanNabukhotniidev
previously approved these changes
Sep 23, 2026
yurii-tymoshevskyi
previously approved these changes
Sep 23, 2026
…uctured-output-with-corrected-text
…uctured-output-with-corrected-text
arturobdev
previously approved these changes
Sep 23, 2026
…uctured-output-with-corrected-text
…uctured-output-with-corrected-text
…uctured-output-with-corrected-text
Yehor-Makarenko
dismissed stale reviews from arturobdev, RomanNabukhotniidev, and yurii-tymoshevskyi
via
September 23, 2026 14:51
d7181e6
Yehor-Makarenko
requested review from
RomanNabukhotniidev,
arturobdev and
yurii-tymoshevskyi
September 23, 2026 14:55
yurii-tymoshevskyi
approved these changes
Sep 23, 2026
RomanNabukhotniidev
approved these changes
Sep 23, 2026
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.
Closes #140
Description
Fixes an issue where human corrections in the verification UI were not propagated to the structured representation of a page. Previously, fixing plain text left
edited_structuredasnull, allowing the original misread entities fromstructuredto leak into the lexicon and poison the context for subsequent pages.Key Changes
action: "correct",edited_structuredis now re-derived from the corrected text via a secondary text-only model call using the preset'soutput_schema.output_schemabypass re-derivation gracefully.edited ?? original): Updated queries and data readers across the codebase to prioritize edited fields viaCOALESCE/ fallback logic (edited_text ?? textandedited_structured ?? structured).textandstructuredoutputs to maintain auditability of the model's initial reading.Acceptance Criteria
Notes
edited_structuredpayload.