Skip to content

[codex] Fix TinyFish monitor and search region ingestion#6

Open
Tien-Cheng wants to merge 10 commits into
mainfrom
feat/implement-search-region
Open

[codex] Fix TinyFish monitor and search region ingestion#6
Tien-Cheng wants to merge 10 commits into
mainfrom
feat/implement-search-region

Conversation

@Tien-Cheng

Copy link
Copy Markdown
Owner

What changed

This PR implements the searchRegion ingestion path end to end and fixes the TinyFish monitor so live agent activity shows up on the investigation page while TinyFish is running.

It also extracts the marketplace search parsing flow into a shared helper so the backend action and the existing search tool use the same TinyFish normalization, error handling, and extractor fallback path.

Why it changed

The investigation workflow was launching TinyFish runs, but the core B-2 action still needed to create findings, score risk, and update monitor state through the Convex pipeline.

On the frontend, the monitor query was treating TinyFish screenshot URLs like Convex storage IDs, which could break the query and leave the UI stuck in its empty state even while the TinyFish agent was actively running.

User and developer impact

Users now get live TinyFish monitor cards and activity log updates during marketplace sweeps, plus findings written from searchRegion with price deviation, risk score, risk level, and risk signals populated for downstream clustering and case generation.

Developers now have a shared marketplace search helper, a dedicated mini-model risk assessor, and idempotent monitor initialization for workflow retries.

Root cause

The monitor data path was failing at query time because external TinyFish screenshot URLs were passed into ctx.storage.getUrl(...), which expects a Convex storage ID.

Separately, searchRegion was still a stub, so the workflow could launch searches without producing the findings and monitor updates that the rest of the pipeline expects.

Validation

  • pnpm exec eslint convex/functions/investigations.ts convex/functions/monitor.ts convex/tools/searchMarketplace.ts convex/lib/marketplaceSearch.ts convex/agents/riskAssessor.ts convex/workflows/investigate.ts shared/schemas.ts
  • pnpm exec eslint convex/functions/monitor.ts 'app/investigation/[id]/components/TinyFishMonitor.tsx' 'app/investigation/[id]/components/ActivityLog.tsx'
  • pnpm exec tsc --noEmit

Notes

This PR is opened as draft because the remaining validation is runtime verification against a live TinyFish session from the investigation UI.

@Tien-Cheng Tien-Cheng requested a review from lhurr March 28, 2026 05:10
@Tien-Cheng Tien-Cheng self-assigned this Mar 28, 2026
@Tien-Cheng Tien-Cheng added the enhancement New feature or request label Mar 28, 2026
@lhurr lhurr marked this pull request as ready for review March 28, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants