is-email-predicate
OpenAI Codex CLI (openai/gpt-5.1-codex) · openai/gpt-5.1-codex · 492.7 s · 20 Nov 2026, 19:38
Overall
0.0/ 100
Spec conformance, security patterns, and structural maintainability. No model call contributes to this number.
- Spec 60%
- 0.0
- Security 25%
- 100.0
- Maintainability 15%
- 88.0
Tally
UNVERIFIED earns zero but is counted separately from FAIL.
Repository task
MIT · nodehttps://github.com/sindresorhus/is
base e9c026c611c1160eaad50da00be4e676b626018f
test command
node --experimental-transform-types --test .orivoxx/acceptance.test.mjsexit 1 · 1827ms · FAIL
Six metrics
exit: failed- Steps
- 112
- model + tool steps
- Tool calls
- 112
- 0% error rate
- Prompt tokens
- 1,577,042
- provider usage
- Completion
- 46,729
- provider usage
- Cost
- $0.7198
- reported by provider
- Duration
- 492.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.
model × decision
medium confidence- step 1 · test command failed after the agent's patch: node --experimental-transform-types --test .orivoxx/acceptance.test.mjs
No sufficient intervention was found. This cell is rule-matched but not proven.
Trace
- —Run startedcodex-openrouter 1.0.0 · run 0
- 1Model call startedopenai/gpt-5.1-codex · messages 4f53cda1…
- 1Model call finished8094 in / 197 out · $0.00320 · completed
- 1Tool call startedcommand_execution · "/usr/bin/bash -c 'cd /workspace && ls'"redacted
- 1Tool call finishedcommand_execution · ok · event=item.startedredacted
- 1Step completed0 ms
- 2Model call startedopenai/gpt-5.1-codex · messages 4f53cda1…
- 2Model call finished8237 in / 105 out · $0.00246 · completed
- 2Tool call startedcommand_execution · "/usr/bin/bash -c 'cd /workspace && ls'"redacted
- 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
- 3eba5ee4c99f…
Requirement outcomes
Static checks · 4 declared · no produced code executed
Real-repository task requirement.
- Rule
- declared check
- Outcome
- The declared check did not match the produced repository.
Produced-code diff
0 added · 2 changed · 1 removed · 10 + / 6 − · 16.2 KiB
The diff exceeded the stored byte, file, or per-file line budget. It is truncated; the scorecard above is complete.
--- a/source/index.ts
+++ b/source/index.ts
@@ -1,400 +1,400 @@
import type {
ArrayLike,
Class,
+ EmailString,
EvenInteger,
Falsy,
FiniteNumber,
Integer,
NaN as NaNType,
NegativeInfinity,
NegativeInteger,
NegativeNumber,
NodeStream,
NonEmptyString,
NonNegativeInteger,
NonNegativeNumber,
ObservableLike,
OddInteger,
Predicate,
Primitive,
PositiveInfinity,
PositiveInteger,
PositiveNumber,
SafeInteger,
TypedArray,
UrlString,
ValidLength,
WeakRef,
Whitespace,
} from './types.ts';
import {keysOf} from './utilities.ts';
// From type-fest.
type ExtractFromGlobalConstructors<Name extends string> =
Name extends string
? typeof globalThis extends Record<Name, new (...arguments_: any[]) => infer T> ? T : never
: never;
type NodeBuffer = ExtractFromGlobalConstructors<'Buffer'>;
type NumericGuardResult<Input, Branded extends number> =
(
unknown extends Input
? Branded
: Input extends number
? Branded & Input
: number
) & Input;
const typedArrayTypeNames = [
'Int8Array',
'Uint8Array',
'Uint8ClampedArray',
'Int16Array',
'Uint16Array',
'Int32Array',
'Uint32Array',
'Float32Array',
'Float64Array',
'BigInt64Array',
'BigUint64Array',
] as const;
type TypedArrayTypeName = typeof typedArrayTypeNames[number];
function isTypedArrayName(name: unknown): name is TypedArrayTypeName {
return typedArrayTypeNames.includes(name as TypedArrayTypeName);
}
const objectTypeNames = [
'Function',
'Generator',
'AsyncGenerator',
'GeneratorFunction',
'AsyncGeneratorFunction',
'AsyncFunction',
'Observable',
'Array',
'Buffer',
'Blob',
'Object',
'RegExp',
'Date',
'Error',
'Map',
'Set',
'WeakMap',
'WeakSet',
'WeakRef',
'ArrayBuffer',
'SharedArrayBuffer',
'DataView',
'Promise',
'URL',
'FormData',
'URLSearchParams',
'HTMLElement',
'NaN',
...typedArrayTypeNames,
] as const;
type ObjectTypeName = typeof objectTypeNames[number];
function isObjectTypeName(name: unknown): name is ObjectTypeName {
return objectTypeNames.includes(name as ObjectTypeName);
}
const primitiveTypeNames = [
'null',
'undefined',
'string',
'number',
'bigint',
'boolean',
'symbol',
] as const;
type PrimitiveTypeName = typeof primitiveTypeNames[number];
function isPrimitiveTypeName(name: unknown): name is PrimitiveTypeName {
return primitiveTypeNames.includes(name as PrimitiveTypeName);
}
export type TypeName = ObjectTypeName | PrimitiveTypeName;
const assertionTypeDescriptions = [
'bound Function',
'positive number',
'negative number',
'Class',
'string with a number',
+ 'string with an email',
'null or undefined',
'Iterable',
'AsyncIterable',
'native Promise',
'EnumCase',
'string with a URL',
'truthy',
'falsy',
'primitive',
'integer',
'plain object',
'TypedArray',
'array-like',
'tuple-like',
'Node.js Stream',
'infinite number',
'empty array',
'non-empty array',
'empty string',
'empty string or whitespace',
'non-empty string',
'non-empty string and not whitespace',
'empty object',
'non-empty object',
'empty set',
'non-empty set',
'empty map',
'non-empty map',
'PropertyKey',
'even integer',
'finite number',
'negative integer',
'non-negative integer',
'non-negative number',
'odd integer',
'positive integer',
'safe integer',
'T',
'in range',
'predicate returns truthy for any value',
'predicate returns truthy for all values',
'valid Date',
'valid length',
'whitespace string',
...objectTypeNames,
...primitiveTypeNames,
] as const;
export type AssertionTypeDescription = typeof assertionTypeDescriptions[number];
const getObjectType = (value: unknown): ObjectTypeName | undefined => {
const objectTypeName = Object.prototype.toString.call(value).slice(8, -1);
if (/HTML\w+Element/v.test(objectTypeName) && isHtmlElement(value)) {
return 'HTMLElement';
}
if (isObjectTypeName(objectTypeName)) {
return objectTypeName;
}
return undefined;
};
function detect(value: unknown): TypeName {
if (value === null) {
return 'null';
}
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (typeof value) {
case 'undefined': {
return 'undefined';
}
case 'string': {
return 'string';
}
case 'number': {
return Number.isNaN(value) ? 'NaN' : 'number';
}
case 'boolean': {
return 'boolean';
}
case 'function': {
return 'Function';
}
case 'bigint': {
return 'bigint';
}
case 'symbol': {
return 'symbol';
}
default:
}
if (isObservable(value)) {
return 'Observable';
}
if (isArray(value)) {
return 'Array';
}
if (isBuffer(value)) {
return 'Buffer';
}
const tagType = getObjectType(value);
if (tagType !== undefined && tagType !== 'Object') {
return tagType;
}
if (hasPromiseApi(value)) {
return 'Promise';
}
if (isBoxedPrimitiveObject(value)) {
throw new TypeError('Please don\'t use object wrappers for primitive types');
}
return 'Object';
}
function hasPromiseApi<T = unknown>(value: unknown): value is Promise<T> {
return isFunction((value as Promise<T>)?.then) && isFunction((value as Promise<T>)?.catch);
}
function hasBoxedPrimitiveBrand(value: unknown, valueOf: () => unknown): boolean {
try {
// `Object.prototype.toString` can be spoofed via `Symbol.toStringTag`, but the
// boxed primitive `valueOf` methods still enforce the real internal brand.
Reflect.apply(valueOf, value, []);
return true;
} catch {
return false;
}
}
function isBoxedPrimitiveObject(value: unknown): boolean {
return hasBoxedPrimitiveBrand(value, String.prototype.valueOf)
|| hasBoxedPrimitiveBrand(value, Boolean.prototype.valueOf)
|| hasBoxedPrimitiveBrand(value, Number.prototype.valueOf);
}
const is = Object.assign(
detect,
{
all: isAll,
any: isAny,
array: isArray,
arrayBuffer: isArrayBuffer,
arrayLike: isArrayLike,
arrayOf: isArrayOf,
asyncFunction: isAsyncFunction,
asyncGenerator: isAsyncGenerator,
asyncGeneratorFunction: isAsyncGeneratorFunction,
asyncIterable: isAsyncIterable,
bigint: isBigint,
bigInt64Array: isBigInt64Array,
bigUint64Array: isBigUint64Array,
blob: isBlob,
boolean: isBoolean,
boundFunction: isBoundFunction,
buffer: isBuffer,
class: isClass,
dataView: isDataView,
date: isDate,
detect,
directInstanceOf: isDirectInstanceOf,
emptyArray: isEmptyArray,
emptyMap: isEmptyMap,
emptyObject: isEmptyObject,
emptySet: isEmptySet,
emptyString: isEmptyString,
emptyStringOrWhitespace: isEmptyStringOrWhitespace,
+ email: isEmail,
enumCase: isEnumCase,
error: isError,
evenInteger: isEvenInteger,
falsy: isFalsy,
finiteNumber: isFiniteNumber,
float32Array: isFloat32Array,
float64Array: isFloat64Array,
formData: isFormData,
function: isFunction,
generator: isGenerator,
generatorFunction: isGeneratorFunction,
htmlElement: isHtmlElement,
infinite: isInfinite,
inRange: isInRange,
int16Array: isInt16Array,
int32Array: isInt32Array,
int8Array: isInt8Array,
integer: isInteger,
iterable: isIterable,
map: isMap,
nan: isNan,
nativePromise: isNativePromise,
negativeInteger: isNegativeInteger,
negativeNumber: isNegativeNumber,
nodeStream: isNodeStream,
nonEmptyArray: isNonEmptyArray,
nonEmptyMap: isNonEmptyMap,
nonEmptyObject: isNonEmptyObject,
nonEmptySet: isNonEmptySet,
nonEmptyString: isNonEmptyString,
nonEmptyStringAndNotWhitespace: isNonEmptyStringAndNotWhitespace,
nonNegativeInteger: isNonNegativeInteger,
nonNegativeNumber: isNonNegativeNumber,
null: isNull,
nullOrUndefined: isNullOrUndefined,
number: isNumber,
numericString: isNumericString,
object: isObject,
observable: isObservable,
oddInteger: isOddInteger,
oneOf: isOneOf,
plainObject: isPlainObject,
positiveInteger: isPositiveInteger,
positiveNumber: isPositiveNumber,
primitive: isPrimitive,
promise: isPromise,
propertyKey: isPropertyKey,
regExp: isRegExp,
safeInteger: isSafeInteger,
set: isSet,
sharedArrayBuffer: isSharedArrayBuffer,
string: isString,
symbol: isSymbol,
truthy: isTruthy,
tupleLike: isTupleLike,
typedArray: isTypedArray,
uint16Array: isUint16Array,
uint32Array: isUint32Array,
uint8Array: isUint8Array,
uint8ClampedArray: isUint8ClampedArray,
undefined: isUndefined,
urlInstance: isUrlInstance,
urlSearchParams: isUrlSearchParams,
urlString: isUrlString,
optional: isOptional,
validDate: isValidDate,
validLength: isValidLength,
weakMap: isWeakMap,
weakRef: isWeakRef,
weakSet: isWeakSet,
whitespaceString: isWhitespaceString,
},
);
function isAbsoluteModule2(remainder: 0 | 1) {
return (value: unknown): value is number => isInteger(value) && Math.abs(value % 2) === remainder;
}
type TypeGuard<T> = (value: unknown) => value is T;
function validatePredicateArray(predicateArray: readonly Predicate[], allowEmpty: boolean) {
if (predicateArray.length === 0) {
if (allowEmpty) {
// Next major release: throw for empty predicate arrays to avoid vacuous results.
// throw new TypeError('Invalid predicate array');
- } else {
- throw new TypeError('Invalid predicate array');
- }
--- a/source/types.ts
+++ b/source/types.ts
@@ -1,199 +1,206 @@
// Extracted from https://github.com/sindresorhus/type-fest/blob/78019f42ea888b0cdceb41a4a78163868de57555/index.d.ts
/**
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
*/
export type Primitive =
// eslint-disable-next-line @typescript-eslint/no-restricted-types
| null
| undefined
| string
| number
| boolean
| symbol
| bigint;
/**
Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
*/
type Constructor<T, Arguments extends unknown[] = any[]> = new(...arguments_: Arguments) => T;
/**
Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
*/
export type Class<T, Arguments extends unknown[] = any[]> = Constructor<T, Arguments> & {prototype: T};
/**
Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
*/
export type TypedArray =
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Float32Array
| Float64Array
| BigInt64Array
| BigUint64Array;
declare global {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- This must be an `interface` so it can be merged.
interface SymbolConstructor {
readonly observable: symbol;
}
}
/**
Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
*/
export type ObservableLike = {
subscribe(observer: (value: unknown) => void): void;
[Symbol.observable](): ObservableLike;
};
// eslint-disable-next-line @typescript-eslint/no-restricted-types
export type Falsy = false | 0 | 0n | '' | null | undefined;
// eslint-disable-next-line @typescript-eslint/no-restricted-types
export type WeakRef<T extends object> = {
readonly [Symbol.toStringTag]: 'WeakRef';
deref(): T | undefined;
};
export type ArrayLike<T> = {
readonly [index: number]: T;
readonly length: number;
};
export type NodeStream = {
pipe<T extends NodeJS.WritableStream>(destination: T, options?: {end?: boolean}): T;
} & NodeJS.EventEmitter;
export type Predicate = (value: unknown) => boolean;
export type NonEmptyString = string & {0: string};
export type Whitespace = ' ';
type Brand<Key extends string> = Readonly<Record<Key, true>>;
+
+/**
+A string that represents an email address.
+
+This is a branded type to prevent incorrect TypeScript type narrowing.
+*/
+export type EmailString = string & {readonly __brand: 'EmailString'};
/**
A string that represents a valid URL.
This is a branded type to prevent incorrect TypeScript type narrowing.
*/
export type UrlString = string & {readonly __brand: 'UrlString'};
// Keep numeric guards branded and simple. This intentionally favors correct false-branch narrowing for `number` inputs over perfect success-branch narrowing for numeric literal unions.
/**
The IEEE 754 "Not-a-Number" value, typed as a subtype of `number`.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type NaN = number & Brand<'__nanBrand'>;
/**
A finite number (excludes `NaN`, `Infinity`, and `-Infinity`).
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type FiniteNumber = number & Brand<'__finiteNumberBrand'>;
/**
A number greater than or equal to zero.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type NonNegativeNumber = number & Brand<'__nonNegativeNumberBrand'>;
/**
An integer value (no fractional part).
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type Integer = FiniteNumber & Brand<'__integerBrand'>;
/**
A number greater than zero.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type PositiveNumber = NonNegativeNumber & Brand<'__positiveNumberBrand'>;
/**
A number less than zero.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type NegativeNumber = number & Brand<'__negativeNumberBrand'>;
/**
An integer less than zero.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type NegativeInteger = Integer & NegativeNumber & Brand<'__negativeIntegerBrand'>;
/**
An integer greater than or equal to zero.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type NonNegativeInteger = Integer & NonNegativeNumber & Brand<'__nonNegativeIntegerBrand'>;
/**
An integer greater than zero.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type PositiveInteger = NonNegativeInteger & PositiveNumber & Brand<'__positiveIntegerBrand'>;
// Note: type-fest uses the `1e999` overflow trick to represent these types (since TypeScript has
// no built-in Infinity type), but we use branded types here for consistency and to avoid
// relying on numeric overflow behavior.
/**
A positive infinite number (`Infinity`).
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type PositiveInfinity = PositiveNumber & Brand<'__positiveInfinityBrand'>;
/**
A negative infinite number (`-Infinity`).
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type NegativeInfinity = NegativeNumber & Brand<'__negativeInfinityBrand'>;
/**
A safe integer (within the range of `Number.MIN_SAFE_INTEGER` to `Number.MAX_SAFE_INTEGER`).
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type SafeInteger = Integer & Brand<'__safeIntegerBrand'>;
/**
An even integer.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type EvenInteger = Integer & Brand<'__evenIntegerBrand'>;
/**
An odd integer.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type OddInteger = Integer & Brand<'__oddIntegerBrand'>;
/**
A non-negative safe integer, suitable as an array or string length.
Branded to prevent false-branch narrowing to `never` when the input is `number`.
*/
export type ValidLength = SafeInteger & NonNegativeInteger & Brand<'__validLengthBrand'>;
--- a/.orivoxx/issue.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Issue
-
-Add an `is.email(value)` predicate to the default `is` object. Accept ordinary addresses with exactly one `@`, a non-empty local part, a domain containing at least one dot, a TLD of two or more letters, and no whitespace. Reject malformed values. Add and export a branded `EmailString` type in `source/types.ts`, use it in `source/index.ts`, and expose it from the package's public type exports.
-
-Repository: https://github.com/sindresorhus/is
-Base commit: e9c026c611c1160eaad50da00be4e676b626018f
Run summary
{
"status": "failed",
"exitCode": 1,
"durationMs": 492667,
"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.