Skip to content
res_9da7482d847247a987a88caa73623171Organizer-runcompletedtest passed

is-number-reject-hex

OpenAI Codex CLI (openai/gpt-5.1-codex) · openai/gpt-5.1-codex · 40.6 s · 20 Nov 2026, 08:21

Compare

Overall

100.0/ 100

Spec conformance, security patterns, and structural maintainability. No model call contributes to this number.

Spec 60%
100.0
Security 25%
100.0
Maintainability 15%
77.5

Tally

4 passed0 failed0 drifted0 unverified

UNVERIFIED earns zero but is counted separately from FAIL.

Repository task

MIT · node

https://github.com/jonschlinkert/is-number

base 98e8ff1da1a89f93d1397a24d7413ed15421c139

test command

node -e "process.exit(require('./index.js')('0x10')?1:0)"

exit 0 · 955ms · PASS

Six metrics

exit: completed
Steps
18
model + tool steps
Tool calls
18
0% error rate
Prompt tokens
0
provider usage
Completion
0
provider usage
Cost
$0.0000
reported by provider
Duration
40.6s
wall clock

Trace-derived. Tool errors are counted from finished tool calls; token and cost values come from the provider usage recorded by the proxy.

Unattributed

Failure attribution

run passed the threshold; no failure to attribute

Inspect the trace →

Trace

  1. —Run startedcodex-openrouter 1.0.0 · run 0
  2. 1Model call startedopenai/gpt-5.1-codex · messages 4f53cda1…
  3. 1Model call finished0 in / 0 out · $0.00000 · completed
  4. 1Tool call startedcommand_execution · "/usr/bin/bash -c 'pwd && ls'"redacted
  5. 1Tool call finishedcommand_execution · ok · event=item.startedredacted
  6. 1Step completed0 ms
  7. 2Model call startedopenai/gpt-5.1-codex · messages 4f53cda1…
  8. 2Model call finished0 in / 0 out · $0.00000 · completed
  9. 2Tool call startedcommand_execution · "/usr/bin/bash -c 'pwd && ls'"redacted
  10. 2Tool call finishedcommand_execution · ok · event=item.completedredacted
task
1.0.0
ruleset
1.0.0
scoring config
1.0.0
adapter
1.0.0
fingerprint
92a42a8373d5…

Requirement outcomes

Static checks · 4 declared · no produced code executed

  • Real-repository task requirement.

    Rule
    declared check
    Outcome
    The declared check matched the produced repository.

Produced-code diff

0 added · 2 changed · 1 removed · 11 + / 10 − · 3.6 KiB

unified diff
--- a/index.js
+++ b/index.js
@@ -1,18 +1,25 @@
 /*!
  * is-number <https://github.com/jonschlinkert/is-number>
  *
  * Copyright (c) 2014-present, Jon Schlinkert.
  * Released under the MIT License.
  */
 
 'use strict';
 
 module.exports = function(num) {
   if (typeof num === 'number') {
     return num - num === 0;
   }
+  if (typeof num === 'string') {
+    var trimmed = num.trim();
+    if (trimmed === '') {
+      return false;
+    }
+    if (/^[-+]?0x[0-9a-f]+$/i.test(trimmed)) {
+      return false;
+    }
+    return Number.isFinite ? Number.isFinite(+trimmed) : isFinite(+trimmed);
-  if (typeof num === 'string' && num.trim() !== '') {
-    return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
   }
   return false;
 };
--- a/test.js
+++ b/test.js
@@ -1,153 +1,153 @@
 /*!
  * is-number <https://github.com/jonschlinkert/is-number>
  *
  * Copyright (c) 2014-2018, Jon Schlinkert.
  * Licensed under the MIT License.
  */
 
 'use strict';
 
 require('mocha');
 var assert = require('assert');
 var isNumber = require('./');
 
 describe('is a number', function() {
   var fixtures = [
     0xff,
     5e3,
     0,
     0.1,
     -0.1,
     -1.1,
     37,
     3.14,
 
     1,
     1.1,
     10,
     10.1,
     100,
     -100,
 
     '0.1',
     '-0.1',
     '-1.1',
     '0',
     '012',
-    '0xff',
     '1',
     '1.1',
     '10',
     '10.10',
     '100',
     '5e3',
     '   56\r\n  ', // issue#3
 
     Math.LN2,
 
     // 012, Octal literal not allowed in strict mode
     parseInt('012'),
     parseFloat('012'),
     Math.abs(1),
     Math.acos(1),
     Math.asin(1),
     Math.atan(1),
     Math.atan2(1, 2),
     Math.ceil(1),
     Math.cos(1),
     Math.E,
     Math.exp(1),
     Math.floor(1),
     Math.LN10,
     Math.LN2,
     Math.log(1),
     Math.LOG10E,
     Math.LOG2E,
     Math.max(1, 2),
     Math.min(1, 2),
     Math.PI,
     Math.pow(1, 2),
     Math.pow(5, 5),
     Math.random(1),
     Math.round(1),
     Math.sin(1),
     Math.sqrt(1),
     Math.SQRT1_2,
     Math.SQRT2,
     Math.tan(1),
 
     Number.MAX_VALUE,
     Number.MIN_VALUE,
 
     '0.0',
-    '0x0',
     '0e+5',
     '000',
     '0.0e-5',
     '0.0E5',
 
     +'',
     +1,
     +3.14,
     +37,
     +5,
     +[],
     +false,
     +Math.LN2,
     +true,
     +null,
     +new Date()
   ];
 
   fixtures.forEach(function(num, idx) {
     it(JSON.stringify(num) + ' should be a number', function() {
       assert(isNumber(num), 'expected "' + String(num) + '" to be a number');
     });
   });
 });
 
 describe('is not a number', function() {
   var fixtures = [
     '   ', // issue#3
     '\r\n\t', // issue#3
     '',
     '',
     '3a',
     'abc',
     'false',
     'null',
     'true',
     'undefined',
+    '0xff',
+    '0x0',
     +'abc',
     +/foo/,
     +[1, 2, 4],
     +Infinity,
     +Math.sin,
     +NaN,
     +undefined,
     +{ a: 1 },
     +{},
     /foo/,
     [1, 2, 3],
     [1],
     [],
     true,
     false,
     +function() {},
     function() {},
     Infinity,
     -Infinity,
     Math.sin,
     NaN,
     new Date(),
     null,
     undefined,
     {}
   ];
 
   fixtures.forEach(function(num) {
     it(JSON.stringify(num) + ' should not be a number', function() {
       assert(!isNumber(num), 'expected "' + String(num) + '" to not be a number');
     });
   });
 });
--- a/.orivoxx/issue.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Issue
-
-isNumber('0x10') returns true because the string is coerced with Number(). A hexadecimal string is not a decimal number input. Reject 0x-prefixed strings while keeping finite decimal strings and real numbers accepted.
-
-Repository: https://github.com/jonschlinkert/is-number
-Base commit: 98e8ff1da1a89f93d1397a24d7413ed15421c139

Run summary

run record
{
  "status": "completed",
  "exitCode": 0,
  "durationMs": 40586,
  "adapter": {
    "id": "codex-openrouter",
    "version": "1.0.0",
    "label": "OpenAI Codex CLI (openai/gpt-5.1-codex)",
    "kind": "harness"
  },
  "model": {
    "provider": "openrouter",
    "name": "openai/gpt-5.1-codex",
    "baseUrl": "https://openrouter.ai/api/v1"
  }
}

The score is reproducible from the task, ruleset, scoring configuration, and captured repository text. No model call contributed to it.