Skip to content

fix: streamline research finalization and trace rejected answers - #165

Open
devhims wants to merge 3 commits into
mainfrom
fix/numerical-grounding-only
Open

devhims wants to merge 3 commits into
mainfrom
fix/numerical-grounding-only

Conversation

@devhims

@devhims devhims commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Problem / Motivation

Users can wait through redundant context preparation after research has already collected the needed analyses. Supported answers can also be rejected because optional identity metadata differs across videos. Missing rejected drafts make those failures difficult to diagnose.

What changed

Research now ends with a report of request parts, supporting evidence references and unresolved questions. With a valid report, finalization skips the general preparation model loop. Application checks identify missing subjects, invalid references, stale evidence and coverage limitations. At most four targeted saved-asset or history reads address identified gaps. Repair reuses those reads.

Private agent traces retain the handoff decision, targeted reads and rejected answers, including detailed validation errors and the responding model. Existing access and deletion controls apply.

Grounding rejection focuses on numerical support. Optional names are advisory; measurements, citations and answer structure retain their checks.

%%{init: {"themeVariables": {"signalColor": "#64748b", "sequenceNumberColor": "#ffffff"}}}%%
sequenceDiagram
    autonumber
    participant R as Research
    participant P as Preparation model
    participant A as Application
    participant F as Answer model
    rect rgba(128,128,128,0.08)
        Note over R,F: Before
        R->>P: Collected evidence
        P->>A: General context reads
        A->>F: Generate answer
    end
    rect rgba(128,128,128,0.08)
        Note over R,F: After a valid handoff
        R->>A: Findings and explicit gaps
        A->>A: Validate coverage and perform targeted reads
        A->>F: Generate answer
    end
Loading

The preparation model loop is removed for valid research handoffs; application checks and answer generation remain.

Tests

All 1,560 unit tests and 347 runtime/session integration tests pass. Type checking passes. Tests cover four available analyses, explicit and missing-subject reads, repair reuse, cancellation, billing admission, time/cost reserves, cross-video names and rejection traces.

Compatibility and deployment

No migration is required. History/context requests and research without a valid report retain existing preparation. Recovery does not restore reports from traces. Semantic completeness still requires model judgment. Platform deployment and live latency verification remain outstanding.

@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
video2ctx-web Ready Ready Preview Oct 7, 2026 11:55am UTC

@devhims devhims changed the title fix: limit grounding rejection to numerical support fix: narrow grounding checks and trace rejected answers Oct 7, 2026
@devhims devhims changed the title fix: narrow grounding checks and trace rejected answers fix: streamline research finalization and trace rejected answers Oct 7, 2026

This branch was successfully deployed

1 active deployment
Preview — d62d2414 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant