Fix flaky quoted-path-parsing property test#169
Conversation
The local arbitrary_identifier() generator could randomly produce Stata\nreserved qualifier keywords (if, in) or prefix/file commands (by, do,\netc.). When fast-check sampled such a keyword as a varlist argument to\ndisplay/list/gen, the parser correctly treated it as a qualifier rather\nthan a variable, causing intermittent CI failures in property tests like\n'should capture all arguments before comma'.\n\nDelegate to arbitrary_non_reserved_identifier() from the shared\ngenerators per the AGENTS.md guidance, which filters out\nRESERVED_QUALIFIER_KEYWORDS, PREFIX_COMMANDS, and FILE_COMMANDS.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The property test
Quoted Path Parsing Property Tests > Property 2: Comma Boundary Respected > should capture all arguments before commafails intermittently in CI.The local
arbitrary_identifier()generator in this file could randomly produce Stata reserved qualifier keywords (`if`, `in`) or prefix/file commands (`by`, `do`, etc.). When fast-check sampled such a keyword as a varlist argument to `display`/`list`/`gen`, the parser correctly treated it as a qualifier rather than a variable, so `varlist` came back as `undefined` and the assertion that `my_cmd_node.varlist?.length === my_args.length` failed.Reproduction:
```
display if, opt → varlist: undefined, options: ["opt"]
display in, opt → varlist: undefined, options: ["opt"]
```
This is exactly the failure mode `AGENTS.md` warns about:
Fix
Delegate the file-local `arbitrary_identifier()` to the shared `arbitrary_non_reserved_identifier()` from `tests/property/generators/primitives.ts`, which filters out `RESERVED_QUALIFIER_KEYWORDS`, `PREFIX_COMMANDS`, and `FILE_COMMANDS`.
Validation
Conversation