Skip to content
res_5d3d11b2d3e94a96865fafed81c7e440Organizer-runcompletedtest passed

is-whitespace-single-char

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

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-whitespace-character

base d28a6fc01ae1d41152b765e9a760a906acaa417c

test command

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

exit 0 · 836ms · PASS

Six metrics

exit: completed
Steps
16
model + tool steps
Tool calls
16
0% error rate
Prompt tokens
87,632
provider usage
Completion
4,893
provider usage
Cost
$0.0643
reported by provider
Duration
66.1s
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 finished7846 in / 97 out · $0.00232 · 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 finished7983 in / 90 out · $0.00228 · 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
3412742405eb…

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 · 23 + / 9 − · 2.0 KiB

unified diff
--- a/index.js
+++ b/index.js
@@ -1,14 +1,33 @@
 /**
  * Check if the given code point, or the code point at the first index, is a
  * whitespace character.
  *
  * @param {string|number} value
  *   Code point or string.
  * @returns {boolean}
  *   Whether `character` is a whitespace character
  */
 export function isWhitespaceCharacter(value) {
+  let character
+
+  if (typeof value === 'number') {
+    character = String.fromCodePoint(value)
+  } else {
+    let count = 0
+
+    for (const symbol of String(value)) {
+      character = symbol
+      count += 1
+
+      if (count > 1) {
+        return false
+      }
+    }
+
+    if (count === 0) {
+      return false
+    }
+  }
+
+  return /\s/.test(character)
-  return /\s/.test(
-    typeof value === 'number' ? String.fromCodePoint(value) : value.charAt(0)
-  )
 }
--- a/test.js
+++ b/test.js
@@ -1,19 +1,20 @@
 import assert from 'node:assert/strict'
 import test from 'node:test'
 import {isWhitespaceCharacter} from './index.js'
 
 test('isWhitespaceCharacter(character)', function () {
   assert.ok(isWhitespaceCharacter(' '))
   assert.ok(isWhitespaceCharacter('\n'))
   assert.ok(isWhitespaceCharacter('\r'))
   assert.ok(isWhitespaceCharacter('\uFEFF'))
   assert.ok(isWhitespaceCharacter('\u00A0'))
   assert.ok(isWhitespaceCharacter('\t'))
   assert.ok(isWhitespaceCharacter('\v'))
   assert.ok(isWhitespaceCharacter(0x20))
   assert.ok(isWhitespaceCharacter(0xa))
   assert.ok(isWhitespaceCharacter(0x16_80))
   assert.ok(!isWhitespaceCharacter('a'))
   assert.ok(!isWhitespaceCharacter(0x19))
   assert.ok(!isWhitespaceCharacter('💩'))
+  assert.ok(!isWhitespaceCharacter(' '))
 })
--- a/.orivoxx/issue.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Issue
-
-isWhitespaceCharacter('  ') returns true because only the first code point is checked. The predicate describes a single whitespace character. Return false for strings longer than one code point, preserving all existing whitespace characters.
-
-Repository: https://github.com/wooorm/is-whitespace-character
-Base commit: d28a6fc01ae1d41152b765e9a760a906acaa417c

Run summary

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