Escalate chained classification when the derived output carries no verdict - #7667
Draft
EthanHealy01 wants to merge 1 commit into
Draft
Escalate chained classification when the derived output carries no verdict#7667EthanHealy01 wants to merge 1 commit into
EthanHealy01 wants to merge 1 commit into
Conversation
…rdict A tool-derived file never gets a local heuristic pass, so a chained classification that waits for its verdict waits forever - and the chain continuation is one-shot, so the file silently keeps its inherited labels and is never AI-classified. Hit by new_file-mode deliveries (fresh stubs, no confidence) and by versions made before the upload's verdict landed. - shouldDispatchToAi: an absent verdict on a derived file escalates instead of waiting; an inherited verdict decides as before. - CONSUME_FILES: inherit classificationConfidence together with the labels, so the escalation decision survives the version boundary for outputs that don't come through createChildStub. - Chain-effect comment no longer claims a deferral that cannot happen. - Tests: chain cases with the output stub present in the workspace (the existing test's empty workspace always fell through the outputStub guard), derived-stub cases for shouldDispatchToAi, and reducer confidence inheritance incl. no-bleed onto an output's own verdict.
EthanHealy01
temporarily deployed
to
pr-preview
August 24, 2026 15:27 — with
GitHub Actions
Inactive
Contributor
🚀 V2 Auto-Deployment Complete!🔗 Direct Test URL (non-SSL) http://54.175.155.236:7667 🧩 Admin portal included - try it at http://54.175.155.236:7667/portal. This deployment will be automatically cleaned up when the PR is closed. 🔄 Auto-deployed for approved V2 contributors. |
EthanHealy01
marked this pull request as draft
August 24, 2026 16:04
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.
Follow-up to #7580 (reviewed just after it merged, so this lands separately).
The gap
shouldDispatchToAitreats a missingclassificationConfidenceas "local pass still coming, wait". That's right for uploads, but a tool-derived file never gets a local pass (useClientSideClassificationskipsderivedFromTool), and the chain continuation marks the run inchainedbefore the output loop - one shot, never revisited. So a chained classification whose output stub has no verdict is skipped permanently, and quietly: the inherited labels make the file look classified.Two ways to get there:
new_fileoutput mode ahead of classification. Delivery adds fresh stubs (labels read from the PDF, never a confidence), so the chained classification always skips. Before Run classification locally first and only escalate an unsure verdict to the AI #7580 it always dispatched.new_versionoutputs inherit the parent's verdict viacreateChildStub, so the default path is fine - but only if the local heuristic finished before the run imported. If not, the child has no confidence and the one-shot skip is permanent.The fix
shouldDispatchToAi: no verdict on a derived file escalates instead of waiting - there is no report to wait for. An inherited verdict still decides exactly as before (high stands, anything less escalates). Uploads unchanged.CONSUME_FILESinheritsclassificationConfidencetogether with the labels, so the verdict survives the version boundary for outputs that don't come throughcreateChildStub(matches the assumption the batch test'sreplaceInWorkspacemock already makes). An output carrying its own labels keeps its own confidence - no bleed from the input.Tests
outputStub &&guard always fell through, so the found-stub path was untested. Cases: no verdict (escalates - red before this fix), inherited low (escalates), inherited high (stands, no engine call).shouldDispatchToAi: derived stub with no verdict escalates; derived verdicts decide like an upload's own.task frontend:checkgreen: 253 files / 2192 tests, lint, typecheck, format.