test(corpus): guard task-target integrity (non-empty valid-regex url_pattern + no dupes)#258
Open
reacher-z wants to merge 1 commit into
Open
test(corpus): guard task-target integrity (non-empty valid-regex url_pattern + no dupes)#258reacher-z wants to merge 1 commit into
reacher-z wants to merge 1 commit into
Conversation
…_pattern + no dupes (re #244) validate_task_data checks eval_schema.url_pattern is a *string* but not that it is non-empty or a valid regex, so two silent-corruption classes slip through: - an empty url_pattern -> re.search('', url) matches EVERY request -> false- positive Stage-1 interceptions (task always 'passes' Stage-1) - a malformed regex -> the runtime interceptor crashes at eval time Add corpus-integrity tests over every suite: url_pattern is non-empty and compiles as a regex, and no two tasks share the same (url_pattern, method, instruction) (accidental copy-paste dupes). Both pass on the current corpus; they act as a CI drift/corruption guard going forward. (The v1/v2 count reconciliation itself — #244's 129-vs-130 — needs the source data and is left to the maintainers.)
Perry2004
requested changes
Jul 11, 2026
Perry2004
left a comment
Collaborator
There was a problem hiding this comment.
A validate-task GHA is already implemented for similar purposes. If additional restrictions need to be implemented, please add to that GHA instead.
Since this is not related with code logic and thus should be in the CI rather than the general test file.
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.
Adds corpus-integrity CI guards (re #244).
validate_task_datacheckseval_schema.url_patternis a string but not that it's non-empty or a valid regex — so two silent-corruption classes slip through:url_pattern→re.search('', url)matches every request → false-positive Stage-1 interceptions (task always 'passes' Stage-1)New tests over every suite (v1/v2/v1-lite/claw-eval):
url_patternis non-empty + compiles as a regex, and no two tasks share the same(url_pattern, method, instruction)(accidental copy-paste). Both pass on the current corpus and act as a drift/corruption guard.(The 129-vs-130 count reconciliation in #244 needs the source data — left to maintainers.)