Repository navigation
test(cli): pin that the link cache keeps only settled dead-links answers #764 - #832
Merged
Merged
Conversation
Closed
3 tasks
|
Reviewed the diff. It adds one test file,
|
…ers #764 A rate-limited bulk answer (rateLimited 503, 429, 430) or one the service could not verify (wafBlocked, null status) is never written to the local link cache, and the next run asks the service again. Fixed in the engine by #755 and #800; this pins it through the real SQLite cache. Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
fix/764-link-cache-unsettled-answers
branch
from
October 15, 2026 17:46
8d4afd3 to
90bf506
Compare
|
Reviewed the diff; this PR only adds a test file. I found no problems, so there are no tagged findings.
Looks good to merge. |
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.
Closes #764.
What changes
Test only. Both behaviours the issue asks for are already on main:
checkExternalLinks, which writes onlycacheableVerdictanswers.wafBlocked, null status) have not been cached since pub#800 (fix(engine): local link checks list walls and timeouts as unverified, not broken #800 #804, 4b005fd).cacheableVerdictnow also refuseswafBlocked, on the bulk path and the local one.The first criterion asks for a test that pins the rate-limited case, and none drove the bulk path with throttled answers. The only coverage was a
cacheableVerdictunit assertion. This adds one that goes through the CLI's real SQLiteLinkCacheStorageand the engine'scheckExternalLinks:rateLimited: true), a 429, a 430, an unverifiablewafBlockedwith null status, a 404 and a 200. Only the 404 and the 200 are written.rateLimitedflag for the rules.filterRateLimitedLinksreturns the three throttled links, andfilterBrokenLinksreturns only the 404.I checked that the test fails when
cacheableVerdictlets throttled and unverifiable answers through (both tests go red), then restored it.Third criterion ("a WAF-blocked 403 from the CLI's own local checker is cached as it is today"): superseded. pub#800 deliberately stopped caching local walls and timeouts, so a later signed-in run asks the cloud link checker instead of reading a week-old wall.
packages/audit-engine/tests/local-link-walls-800.test.tspins that ("walls and timeouts are not cached, so a signed-in run asks the cloud next time"). I left a note on the issue suggesting the criterion be updated to match.Tests
apps/cli/tests/crawler/link-cache-unsettled-764.test.ts(new, 2 tests, in theclisuite).test-suites.ts --checkand the detect-secrets hook pass.Docs and skill