fix: allow overriding the verify row-shape top-level key cap - #230
Open
ayushsingh82 wants to merge 1 commit into
Open
fix: allow overriding the verify row-shape top-level key cap#230ayushsingh82 wants to merge 1 commit into
ayushsingh82 wants to merge 1 commit into
Conversation
validateRowShape() hardcoded a 12-key top-level cap for `webcmd browser verify` with no way to override it, so any adapter with a wider row shape by design (e.g. the shipped 52-column university course-export adapters) could never pass verify regardless of correctness. Add a --max-top-level-keys <n> flag on `browser verify`, threaded into validateRowShape's existing maxTopLevelKeys option; default behavior is unchanged. Update the failure message and the adapter-author skill's fixture checklist to point wide-row adapters at the new flag instead of skipping the fixture. Fixes agentrhq#218
Contributor
🟢 No documentation gap found — medium confidenceThe automated review found no documentation gap in the supplied changes. This review is advisory and does not block merging. |
Author
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.
Summary
validateRowShape()(src/browser/verify-fixture.ts) already accepted an optionalmaxTopLevelKeys, butwebcmd browser verifynever exposed a way to set it — it always calledvalidateRowShape(rows)with the hardcoded 12-key default. Any adapter whose rows are wide by design (the shipped 52-column university course-export adapters, for example) could never pass verify regardless of correctness.--max-top-level-keys <n>flag tobrowser verify, validated as a positive integer, threaded through tovalidateRowShape(rows, { maxTopLevelKeys }). Default behavior (12) is unchanged when the flag is omitted.--max-top-level-keysinstead of skipping the required verify fixture.Fixes #218
Test plan
validateRowShaperespects a raisedmaxTopLevelKeysand still rejects keys beyond it (src/browser/verify-fixture.test.ts)browser verifyrejects a 20-key row by default, passes with--max-top-level-keys 20, and rejects a non-positive value with a usage error (src/cli.test.ts)npm run typecheckcleannpm test— 385 test files / 4625 passed, 1 skipped (unchanged skip, +3 new passing tests)Note for maintainers
While verifying test coverage for this fix I noticed
vitest.config.ts'sunitproject excludessrc/browser/**/*.test.tsentirely (added in the #216 plugin-migration merge), and no other configured project or CI job covers that glob either — so all 44 test files undersrc/browser/(includingverify-fixture.test.ts,cdp.test.ts,analyze.test.ts, etc.) currently don't run in CI. That's unrelated to this fix, so I'm not touchingvitest.config.tshere, but wanted to flag it — happy to file a separate issue if useful.