Commit 44e855c
fix(toc): cap scraping submissions at MAX_TOP_PAGES=200 (LLMO-5863) (#2731)
## Summary
- `submitForScraping` in the TOC audit had no hard ceiling on the number
of URLs sent to the scraper
- The merged URL list (`auditTargetUrls → includedURLs → agenticUrls →
topPagesUrls`) was submitted as-is; sites with large `includedURLs` or
agentic URL lists could exceed the intended 200-URL budget
- Added `topPages.slice(0, MAX_TOP_PAGES)` before building the scrape
payload, mirroring the existing pattern in the summarization audit
## Changes
- `src/toc/handler.js` — slice `topPages` to `MAX_TOP_PAGES` (200) in
`submitForScraping`
- `test/audits/toc.test.js` — new test: caps at 200 when 250 pages are
supplied; 175 tests passing, 100% coverage on `src/toc`
## Test plan
- [x] All existing TOC tests pass (175 passing)
- [x] New test confirms only 200 URLs are returned when 250 are supplied
- [x] `src/toc` coverage remains 100% lines/branches/statements
- [x] `eslint src/toc/handler.js` — clean
Jira: [LLMO-5863](https://jira.corp.adobe.com/browse/LLMO-5863)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2fea0c1 commit 44e855c
2 files changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
| 356 | + | |
356 | 357 | | |
357 | | - | |
| 358 | + | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3735 | 3735 | | |
3736 | 3736 | | |
3737 | 3737 | | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
3738 | 3754 | | |
3739 | 3755 | | |
3740 | 3756 | | |
0 commit comments