Repository navigation
Conversation
|
@tanav29 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
🤖 auto-maintain reviewAutomated, advisory triage for
Review panel: 🟡 medium highest severity just-bash maintainer code review: 🟢 low
General code review: 🟡 medium
Adversarial security: 🟢 low
Adversarial security (second opinion): 🟡 medium
Standard Bash and host portability: 🟡 medium
Posted by auto-maintain. This automated code review is advisory; a human maintainer makes the call. |
privatenumber
left a comment
There was a problem hiding this comment.
Looks good:
-
✅ Non-integer operands are rejected in arithmetic
All five added arithmetic tests pass at head and fail at base. Comparison with GNU expr confirms the expected errors. expr.test.ts:5 · expr.ts:141 · :161
-
✅
2.5 = 2is a string comparisonThe new test passes at head and returns
0with exit status 1, matching GNU expr. expr.test.ts:20 · expr.ts:108 -
✅ Signed integers like
-1are acceptedHead returns 1 for the asserted expression with
+2and-1. GNU expr rejects the leading-plus operand, which is raised as a finding. expr.test.ts:25 · expr.ts:54
1 more
-
✅ Focused expr regression tests all pass
The repository's test runner reports seven tests at head, all passing. expr.test.ts:4
privatenumber
left a comment
There was a problem hiding this comment.
Looks good:
-
✅ Arithmetic requires complete integer operands
Both arithmetic parser branches validate operands with
integerValuebefore calculating. The added decimal and partially numeric cases match GNU expr in comparison runs. expr.ts:53 · :163 · :185 -
✅ Non-integer operands are compared as strings
When either operand fails
integerValue, equality compares the original strings and ordering usescompareStrings. The focused comparison examples match GNU expr. expr.ts:129 · :134 -
✅ Focused expr regression tests pass
The head version of
expr.test.tspasses all 17 parameterized test cases inrun_checks. expr.test.ts:4Not verified: the historical seven-test run.
1 more
-
✅ String ordering compares Unicode code points
compareStringsiterates code points and compares their numeric values, which preserves UTF-8 byte ordering for valid Unicode scalar values. expr.ts:68 · :70Not verified: locale behavior and invalid Unicode inputs.
b0ad9ed to
7d84a2f
Compare
|
@privatenumber I have gone through your suggestions and update the code as you suggested. |
7d84a2f to
4c26b4e
Compare
Fixes #741.
Require complete integer operands for arithmetic and compare non-integer operands as strings. This prevents decimal and other partially numeric values from being silently truncated.
Validation: focused expr regression tests (7 passed).