Repository navigation
Conversation
- compareWith: read both runs' status and pass stillProcessing, so a processing run's export is neither reused nor kept, and say when a run is still processing; refuse cursor, pageUrl or exportTaskId with it and a run compared with itself; walk the scan's runs only for "previous". - previousScanRun: a run past the page cap, or whose predecessor is, is no longer reported as the first run; a run not in the scan, or a failed read of its runs, says so. - An Automate build link tries up to 5 sessions for an SDK build rather than only the first. - exportTaskId is a token bound to its report (base64url of task id, report hash and start time); another report's or a made-up one is refused. A task pending over 10 minutes is started again. An export begun while the report was processing is continued only while it still is, and its CSV is never kept. - The poll uses raise_error: false, reports a failed poll's HTTP status, does not assume an object body, and never sleeps past the wait budget, now 40 s counted from the start request. - pageIssues no longer throws on a page address such as "http://". - pageUrl is written into follow-up hints as a JSON string. - cursor must be a non-negative integer. - The report fetcher's and scanner's GETs carry a 15 s timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Brings in #504. Conflicts resolved by keeping both sides: - compareWith is dispatched after the source is resolved (from #504); the scan path passes cursor, pageUrl and exportTaskId on to compareScanRuns, which refuses them there, so app-build comparisons still page with cursor. - The fetcher keeps #504's resolveBuild and app methods, now through the timed get, and this branch's session walk for Automate build links. - The report key covers the app source kinds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Follow-up to #502. Its review raised these points, but the PR was merged before they were fixed. This change fixes them in the code #502 added to
main.What changed
Comparing runs (
compareWith)stillProcessingto each export. A run that is still processing has its export neither reused nor kept. The answer also saysRun <id> is still <status>: its issues are still being added, so the comparison may change once it completes.compareWithwithcursor(above 0),pageUrlorexportTaskIdnow returnscompareWith cannot be combined with <name>. Comparing a run with itself is refused too. Both checks live insidecompareScanRuns, after the source is known to be a scan, so the App Accessibility build comparison in feat(accessibility): read App Accessibility builds, and set up App Automate runs for them #504 can still page withcursor. The scan's runs are walked only for"previous". For a given run id they are not, so there are no dashboard counts in that case.previousScanRun. A walk that stops at the 10-page cap no longer reports "first run". If the run isn't among the pages read, the error says so. If the run before it is older than the pages read, the error says that. Both errors ask for the earlier run'sscanRunIdascompareWith. A run that isn't in the scan at all, or a failed read of the scan's runs, now gives its own error. Only a genuine first run returns undefined.Report links and exports
AUTOMATE_SESSIONS_TRIED), and each session's test-code record is tried in order until one names an SDK build. The "not linked to a BrowserStack SDK build" message appears only when none of them does. The 404 and non-404 distinctions are unchanged.exportTaskIdis now an opaque token. It is base64url JSON of{ t: taskId, r: <short sha256 of the report key>, s: <start time> }. The canonical report key (scan:<scanId>:<scanRunId>,build:<id>,workflow:<id>) is also used for the cache key, so numeric and string ids now match. A token that doesn't decode is refused as "not an export this tool handed out". One for another report is refused as "another report's export".ExportPendingError.taskIdcarries the token.EXPORT_TASK_MAX_AGE_MS) is dropped and a new export is started. Not in the review: a task started while the report was still processing is continued only while the report is still processing, and its CSV is never cached. Without this, the compare path's "the exports continue where they are" would have stopped being true, and a partial snapshot could have been cached as the finished report.raise_error: false.EXPORT_WAIT_MSis now 40 s, counted from the start request. Its doc comment is updated.Pages and hints
pageIssues. A page address such ashttp://gets the usual no-match note instead of throwingERR_INVALID_URL.pageUrlin follow-up hints. It is written withJSON.stringify, both in the next-page hint and in the export-pending hint.Schema and timeouts
cursor. It is now.int().nonnegative().AccessibilityReportFetcherandAccessibilityScannersend their GETs through a privategetwrapper that adds a 15 s timeout.apiClient's global default is unchanged, so long-running tools elsewhere are not affected.Tool descriptions are unchanged.
Verified
npm run build(lint, prettier, vitest, tsc) exits 0: 93 test files, 1429 tests passed. New tests cover each item above. The existing tests that passed raw task ids now go through tokens, and the Automate build-link test now expects?limit=5."previous"gives the dashboard's counts. Comparing with an explicit run id skips them.compareWithwithcursor,pageUrlorexportTaskId, are each refused.pageUrl: "http://"gives the no-match note.Also: #502 raised the CSV page size from 5,000 to 10,000 characters per call (the
maxCharacterLengthdefault inreport-parser.ts), which its description didn't mention.🤖 Generated with Claude Code