is-decimal-800937e9
Python agent loop (openai/gpt-5.1) · openai/gpt-5.1 · 4.8 s · 20 Nov 2026, 20:06
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
UNVERIFIED earns zero but is counted separately from FAIL.
Repository task
MIT · nodehttps://github.com/wooorm/is-decimal
base edc9aaf05e07857a03654115cf5ae8bf9eb74b95
test command
node -e "import('./index.js').then(({isDecimal})=>process.exit(isDecimal('12')?1:0))"exit 0 · 888ms · PASS
Six metrics
exit: completed- Steps
- 2
- model + tool steps
- Tool calls
- 1
- 0% error rate
- Prompt tokens
- 2,099
- provider usage
- Completion
- 379
- provider usage
- Cost
- $0.0043
- reported by provider
- Duration
- 4.8s
- 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.
Failure attribution
run passed the threshold; no failure to attribute
Inspect the trace →Trace
- —Run startedpython-openrouter 1.0.0 · run 0
- 1Model call startedopenai/gpt-5.1 · messages 716469d1…
- 1Model call finished2099 in / 379 out · $0.00425 · stop
- 2Tool call startedapply_patch · files=index.js,test.jsredacted
- 2Tool call finishedapply_patch · ok · ok files=2redacted
- 2Step completed1 ms
- —Run finishedcompleted · 2 steps · 1 tools · 2478 tokens · $0.0043
- task
- 1.0.0
- ruleset
- 1.0.0
- scoring config
- 1.0.0
- adapter
- 1.0.0
- fingerprint
- a6b8edcedd37…
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 · 8 + / 8 − · 1.6 KiB
--- a/index.js
+++ b/index.js
@@ -1,14 +1,18 @@
/**
* Check if the given code point, or the code point at the first index, is
* decimal.
*
* @param {string|number} value
* Code point or string.
* @returns {boolean}
* Whether `value` is decimal.
*/
export function isDecimal(value) {
+ if (typeof value === 'string') {
+ if (value.length !== 1) return false
+ const code = value.codePointAt(0)
+ return code !== undefined && code >= 48 && code <= 57 /* 0-9 */
+ }
- const code = typeof value === 'string' ? value.codePointAt(0) : value
+ return value >= 48 && value <= 57 /* 0-9 */
- return code !== undefined && code >= 48 && code <= 57 /* 0-9 */
}
--- a/test.js
+++ b/test.js
@@ -1,18 +1,20 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import {isDecimal} from './index.js'
test('isDecimal(character)', function () {
const _0 = 0x30
const _9 = 0x39
const F = 0x46
assert.ok(isDecimal('0'))
assert.ok(isDecimal('9'))
assert.ok(isDecimal(_0))
assert.ok(!isDecimal('a'))
assert.ok(!isDecimal(_0 - 1))
assert.ok(!isDecimal(_9 + 1))
assert.ok(!isDecimal(F))
assert.ok(!isDecimal('💩'))
+ assert.ok(!isDecimal('12'))
+ assert.ok(!isDecimal('١٢'))
})
--- a/.orivoxx/issue.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Issue
-
-isDecimal('12') currently returns true because the implementation reads only the first code point. The API documents a single character or code point. Make multi-character strings return false without changing behavior for numbers or one-character strings.
-
-Repository: https://github.com/wooorm/is-decimal
-Base commit: edc9aaf05e07857a03654115cf5ae8bf9eb74b95
Run summary
{
"status": "completed",
"exitCode": 0,
"durationMs": 4758,
"adapter": {
"id": "python-openrouter",
"version": "1.0.0",
"label": "Python agent loop (openai/gpt-5.1)",
"kind": "harness"
},
"model": {
"provider": "openrouter",
"name": "openai/gpt-5.1",
"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.