Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d563acf1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const controller = new AbortController(); | ||
| const hasSymbols = symbolsValue && symbolsValue.trim().length > 0; | ||
| const timeout = hasSymbols ? 3 * 60 * 1000 : 15 * 60 * 1000; | ||
| const timeoutId = setTimeout(() => controller.abort(), timeout); |
There was a problem hiding this comment.
Align full-analysis timeout with 5‑minute route limit
When no symbols are provided, the handler sets a 15‑minute timeout (timeout = ... 15 * 60 * 1000), but the route declares maxDuration = 300 (5 minutes). In that scenario (full analysis without symbols), the serverless runtime will terminate the request before your 15‑minute abort/retry loop can finish, so the client will never receive a successful response even if the cloud function eventually completes. This regression is specific to long‑running full scans after removing polling; consider lowering the timeout to ≤300s, re‑introducing polling, or increasing maxDuration if the platform supports it.
Useful? React with 👍 / 👎.
Motivation
matchesshape with strategy tags and deduplication so the frontend can present merged results.strategyidentifier) and preserve optional AI scoring while exposing amaxDurationconstant.Description
StrategyKeyunion type and makenormalizeStrategyexplicitly returnStrategyKey, and use it inconvertCloudFunctionResult.parseCloudFunctionResponse, retry/backoff, request timeouts/abort, and returns normalized{ matches, stats, summary }.results.strategy1|2|3, add optional fields likestrategy,j_value, andj_laston match objects, and computestats/summary.app/stock/page.tsxto remove polling, addsymbolsInputandsummarystate, make some match fields optional in types, and render improved loading/empty/error and AI analysis output.Testing
strategyidentifier, which was corrected by introducing theStrategyKeytype (compile failure observed before the fix).Codex Task