Skip to content
res_6006423b6dc649a690ae4b4314720ec5Organizer-runcompletedtest passed

is-hexadecimal-single-char

OpenAI Codex CLI (openai/gpt-5.1-codex) · openai/gpt-5.1-codex · 52.7 s · 20 Nov 2026, 07:49

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%
81.7

Tally

4 passed0 failed0 drifted0 unverified

UNVERIFIED earns zero but is counted separately from FAIL.

Repository task

MIT · node

https://github.com/wooorm/is-hexadecimal

base b178db912b2873e9562aa74726f53c91923fbf58

test command

node -e "import('./index.js').then(({isHexadecimal})=>process.exit(isHexadecimal('FF')?1:0))"

exit 0 · 1016ms · PASS

Six metrics

exit: completed
Steps
22
model + tool steps
Tool calls
16
69% error rate
Prompt tokens
0
provider usage
Completion
0
provider usage
Cost
$0.0000
reported by provider
Duration
52.7s
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 · unknown
  4. 2Model call startedopenai/gpt-5.1-codex · messages 4f53cda1…
  5. 2Model call finished0 in / 0 out · $0.00000 · unknown
  6. 3Model call startedopenai/gpt-5.1-codex · messages 4f53cda1…
  7. 3Model call finished0 in / 0 out · $0.00000 · unknown
  8. 4Model call startedopenai/gpt-5.1-codex · messages 4f53cda1…
  9. 4Model call finished0 in / 0 out · $0.00000 · unknown
  10. 4Tool call startedcommand_execution · "/usr/bin/bash -c 'cd /workspace && ls'"redacted
task
1.0.0
ruleset
1.0.0
scoring config
1.0.0
adapter
1.0.0
fingerprint
06915e5b3841…

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 · 13 + / 11 − · 2.1 KiB

unified diff
--- a/index.js
+++ b/index.js
@@ -1,19 +1,25 @@
 /**
  * Check if the given code point, or the code point at the first index, is
  * hexadecimal.
  *
  * @param {string|number} value
  *   Code point or string.
  * @returns {boolean}
  *   Whether `value` is hexadecimal.
  */
 export function isHexadecimal(value) {
+  if (typeof value === 'string') {
+    if (value.length !== 1) {
+      return false
+    }
+
+    value = value.codePointAt(0)
+  }
-  const code = typeof value === 'string' ? value.codePointAt(0) : value
 
   return (
+    value !== undefined &&
+    ((value >= 97 /* a */ && value <= 102) /* f */ ||
+      (value >= 65 /* A */ && value <= 70) /* F */ ||
+      (value >= 48 /* 0 */ && value <= 57)) /* 9 */
-    code !== undefined &&
-    ((code >= 97 /* a */ && code <= 102) /* f */ ||
-      (code >= 65 /* A */ && code <= 70) /* F */ ||
-      (code >= 48 /* 0 */ && code <= 57)) /* 9 */
   )
 }
--- a/test.js
+++ b/test.js
@@ -1,25 +1,27 @@
 import assert from 'node:assert/strict'
 import test from 'node:test'
 import {isHexadecimal} from './index.js'
 
 test('isHexadecimal(character)', function () {
   const _0 = 0x30
   const _9 = 0x39
   const A = 0x41
   const F = 0x46
   const a = 0x61
   const f = 0x66
 
   assert.ok(isHexadecimal('a'))
   assert.ok(isHexadecimal('F'))
   assert.ok(isHexadecimal('0'))
   assert.ok(isHexadecimal(a))
+  assert.ok(!isHexadecimal('FF'))
+  assert.ok(!isHexadecimal('\0a'))
   assert.ok(!isHexadecimal('G'))
   assert.ok(!isHexadecimal(a - 1))
   assert.ok(!isHexadecimal(f + 1))
   assert.ok(!isHexadecimal(A - 1))
   assert.ok(!isHexadecimal(F + 1))
   assert.ok(!isHexadecimal(_0 - 1))
   assert.ok(!isHexadecimal(_9 + 1))
   assert.ok(!isHexadecimal('💩'))
 })
--- a/.orivoxx/issue.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Issue
-
-isHexadecimal('FF') currently returns true because only the first code point is inspected. The function checks a single character or code point. Return false for strings longer than one code point while preserving the existing accepted character set.
-
-Repository: https://github.com/wooorm/is-hexadecimal
-Base commit: b178db912b2873e9562aa74726f53c91923fbf58

Run summary

run record
{
  "status": "completed",
  "exitCode": 0,
  "durationMs": 52694,
  "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.