Shared memory and context tools for agentic work.
Code Rooms
{
"schema": "m1nd-bug-hunt-audit-result-v0",
"round_id": "bughunt-p-limit-tempo-20260514T145029Z",
"lane_id": "audit-03",
"instruction_mode": "m1nd-trained",
"repo": "p-limit",
"model": "GPT-5 Codex",
"started_at": "",
"finished_at": "2026-05-14T15:16:56.877Z",
"findings": [
"title": "Options-object callers opt into reject-on-clear by default",
"severity": "medium",
"file": "/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/index.js",
"symbol": "pLimit",
"cause": "The object destructuring path now defaults `rejectOnClear` to `true`, so `pLimit({concurrency: 1})` silently changes `clearQueue()` semantics even when the caller never opted in.",
"impact": "Existing callers that use the options-object form and later call `clearQueue()` now receive `AbortError` rejections for queued work instead of the documented default behavior, which can break shutdown or teardown flows that relied on the default `false` mode.",
"evidence": [
"Source: `index.js:6-8` sets `({concurrency, rejectOnClear = true} = concurrency)`.",
"Contract: `index.d.ts:99-106` documents `rejectOnClear` with `Default: false`.",
"Coverage gap: `test.js:184-215` only checks default `clearQueue()` behavior for numeric construction and explicit opt-in behavior for `{rejectOnClear: true}`; there is no test for `pLimit({concurrency: 1}).clearQueue()`."
],
"reproduction_or_test": "Focused probe: constructing `pLimit({concurrency: 1})`, queueing one running and one pending task, calling `clearQueue()`, and racing the pending promise against a timeout yields `{state:\"rejected\", name:\"AbortError\"}` instead of remaining pending. The same probe with `{rejectOnClear:false}` stays pending after the timeout.",
"confidence": "high"
},
"title": "`limitFunction` drops all call-time arguments",
"severity": "high",
"symbol": "limitFunction",
"cause": "The wrapper returned by `limitFunction` was changed from forwarding `...arguments_` into `function_` to always invoking `function_()` with no arguments.",
"impact": "Any consumer that uses `limitFunction` with a parameterized function receives wrong results or runtime failures once the wrapped function depends on its arguments. This breaks the exported helper’s advertised contract for real-world reusable limited functions.",
"Source: `index.js:121-125` returns `() => limit(() => function_())`.",
"Contract: `index.d.ts:133-136` promises the returned function accepts `(...arguments_: Arguments)` and returns `Promise<ReturnType>`.",
"Coverage gap: `test.js:343-357` only exercises a zero-argument function, so the regression is not covered by the current suite."
"reproduction_or_test": "Focused probe: `const limited = limitFunction(async value => value, {concurrency: 1}); await limited(\"kept\")` resolves to `undefined` (`typeofResult: \"undefined\"`) instead of `\"kept\"`.",
"title": "`limit.map()` no longer provides indices for generic iterables",
"symbol": "generator.map",
"cause": "The mapper now passes `index` only when `Array.isArray(iterable)` is true; for `Set`, iterators, and other supported iterables it passes `undefined` instead of the generated positional index.",
"impact": "Code that relies on `limit.map()` preserving index semantics across supported iterables now gets `undefined` indices, which can corrupt ordering-dependent logic, key generation, or batching strategies for non-array inputs.",
"Source: `index.js:107-112` calls `this(function_, value, iterableIsArray ? index : undefined)`.",
"Contract: `index.d.ts:30-43` says the mapper receives the item value and its index for `Iterable<Input>`.",
"Coverage gap: `test.js:224-236` asserts index behavior only for arrays, while `test.js:239-255` accepts `Set` and iterator inputs without checking the second mapper argument."
"reproduction_or_test": "Focused probe: `await limit.map(new Set([\"x\",\"y\",\"z\"]), (value, index) => ...)` records `typeofIndex: \"undefined\"` for every call and returns `[\"x:undefined\",\"y:undefined\",\"z:undefined\"]`.",
"title": "Falsy non-boolean `rejectOnClear` values bypass option validation",
"severity": "low",
"cause": "Validation now only throws when `rejectOnClear` is truthy and non-boolean, so falsy invalid values such as `0`, `\"\"`, or `null` are silently accepted.",
"impact": "JavaScript callers lose runtime feedback for misconfigured options, making invalid configuration harder to detect and letting behavior depend on falsy coercion instead of the documented boolean contract.",
"Source: `index.js:12-14` checks `if (rejectOnClear && typeof rejectOnClear !== \"boolean\")`.",
"Contract: `index.d.ts:99-106` declares `rejectOnClear?: boolean`.",
"Regression context: the working-tree diff against `HEAD` shows this guard used to validate all non-boolean values, not just truthy ones."
"reproduction_or_test": "Focused probe: `pLimit({concurrency: 1, rejectOnClear: 0})`, `pLimit({concurrency: 1, rejectOnClear: \"\"})`, and `pLimit({concurrency: 1, rejectOnClear: null})` all succeed without throwing.",
}
"commands_run": [
"sed -n '1,220p' /Users/kle1nz/m1nd/docs/benchmarks/bug-hunt-rounds/bughunt-p-limit-tempo-20260514T145029Z/lane-prompts/audit-03.md",
"sed -n '1,260p' /Users/kle1nz/.codex/skills/m1nd-operator/SKILL.md",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py tools",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py call trust_selftest '{\"agent_id\":\"audit-03\",\"scope\":\"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit\"}'",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py call session_handshake '{\"agent_id\":\"audit-03\",\"scope\":\"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit\"}'",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py run '[{\"name\":\"ingest\",...},{\"name\":\"session_handshake\",...},{\"name\":\"audit\",...}]'",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py run '[{\"name\":\"help\",\"arguments\":{\"agent_id\":\"audit-03\",\"tool_name\":\"audit\"}}, ... {\"tool_name\":\"impact\"}]'",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py run '[{\"name\":\"seek\",...},{\"name\":\"activate\",...},{\"name\":\"search\",...}]'",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py run '[{\"name\":\"batch_view\",\"arguments\":{\"agent_id\":\"audit-03\",\"files\":[\"index.js\",\"index.d.ts\",\"test.js\",\"readme.md\",\"recipes.md\"]}}]'",
"python3 /Users/kle1nz/.codex/skills/m1nd-operator/scripts/probe_m1nd.py run '[{\"name\":\"impact\",\"arguments\":{\"agent_id\":\"audit-03\",\"node_id\":\"file::index.js\"}},{\"name\":\"impact\",\"arguments\":{\"agent_id\":\"audit-03\",\"node_id\":\"file::index.js::fn::limitFunction\"}}]'",
"git -C /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit status --short",
"git -C /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit log --oneline --decorate -1",
"git -C /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit diff -- index.js",
"sed -n '1,220p' /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/index.js",
"sed -n '170,245p' /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/test.js",
"rg -n \"Infinity|limitFunction|rejectOnClear|accepts options object|throws\" /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/test.js /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/index.d.ts /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/readme.md",
"sed -n '245,380p' /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/test.js",
"cat /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/package.json",
"find /Users/kle1nz/m1nd/docs/benchmarks/bug-hunt-rounds/bughunt-p-limit-tempo-20260514T145029Z -name 'lane-result-template.json' -print",
"cat /Users/kle1nz/m1nd/docs/benchmarks/bug-hunt-rounds/bughunt-p-limit-tempo-20260514T145029Z/lane-result-template.json",
"node --input-type=module <<'EOF' ... clearQueue / limitFunction / map / rejectOnClear probes ... EOF",
"npm test",
"nl -ba /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/index.js | sed -n '1,140p'",
"nl -ba /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/index.d.ts | sed -n '1,140p'",
"nl -ba /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/test.js | sed -n '184,360p'",
"rm -f /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/graph_snapshot.json /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/ingest_roots.json /Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/plasticity_state.json"
"files_inspected": [
"/Users/kle1nz/m1nd/docs/benchmarks/bug-hunt-rounds/bughunt-p-limit-tempo-20260514T145029Z/lane-prompts/audit-03.md",
"/Users/kle1nz/.codex/skills/m1nd-operator/SKILL.md",
"/Users/kle1nz/m1nd/docs/benchmarks/bug-hunt-rounds/bughunt-p-limit-tempo-20260514T145029Z/lane-result-template.json",
"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/index.js",
"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/index.d.ts",
"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/test.js",
"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/readme.md",
"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/recipes.md",
"/Users/kle1nz/m1nd/.m1nd-field-workspaces/bughunt-p-limit-tempo-20260514T145029Z/audit-03/p-limit/package.json"
"m1nd_usage": [
"tool": "tools",
"purpose": "Verified the live m1nd surface before relying on remembered docs.",
"outcome": "Confirmed trust, ingest, retrieval, and proof tools were available."
"tool": "trust_selftest",
"purpose": "Establish trust for the lane workspace.",
"outcome": "Returned `needs_ingest` with `call_ingest` recovery guidance."
"tool": "session_handshake",
"purpose": "Confirm workspace binding and recovery path.",
"outcome": "Matched the intended workspace and confirmed the active graph was empty before ingest."
"tool": "ingest",
"purpose": "Populate the graph for `/audit-03/p-limit` on the same binding.",
"outcome": "Parsed 10 files and created an 82-node / 94-edge graph."
"purpose": "Re-check trust after ingest.",
"outcome": "Returned `full_trust`."
"tool": "audit",
"purpose": "Get one-pass structural orientation for the repo.",
"outcome": "Flagged `index.js` as the main risk surface and confirmed a dirty worktree limited to `index.js` plus transient ingest files."
"tool": "help",
"purpose": "Loaded parameter contracts for `audit`, `seek`, `search`, `activate`, `impact`, `batch_view`, `view`, `scan_all`, and `missing`.",
"outcome": "Used the live tool guidance instead of stale prose."
"tool": "seek",
"purpose": "Find the queue scheduling and public API implementation by intent.",
"outcome": "Ranked `enqueue` and `validateConcurrency` in `index.js` as the top targets."
"tool": "activate",
"purpose": "Map the neighborhood around queueing, scheduling, and clear-queue behavior.",
"outcome": "Kept focus on `index.js`, especially `enqueue` and `validateConcurrency`."
"tool": "search",
"purpose": "Trace all `clearQueue` references.",
"outcome": "Connected implementation, types, README, recipes, and tests."
"tool": "batch_view",
"purpose": "Read `index.js`, `index.d.ts`, `test.js`, `readme.md`, and `recipes.md` together.",
"outcome": "Exposed the implementation-contract mismatches behind the candidate regressions."
"tool": "impact",
"purpose": "Gauge the blast radius of the mutated `index.js` surface.",
"outcome": "Confirmed the changed file fans out across the core limiter behavior and exported helpers."
"temponizer_usage": [],
"agent_testimony": "I followed the lane's m1nd-trained loop: trust check, recovery via ingest, re-handshake to full trust, audit for orientation, then focused discovery with seek/search/activate/batch_view/impact. I did not touch source files. The findings are grounded in direct source reads, the working-tree diff for `index.js`, and focused `node --input-type=module` probes. Full `npm test` could not run in this lane because `xo` was unavailable (`sh: xo: command not found`).",
"notes": "The m1nd ingest step temporarily created `graph_snapshot.json`, `ingest_roots.json`, and `plasticity_state.json` inside the lane workspace; they were removed before finishing so that only the allowed result/event artifacts remained changed.",
"non_claims": [
"auditor did not see the operator-only answer key",
"extra findings are unadjudicated until a judge validates them",
"full repository test coverage was not executed because the lane workspace lacked `xo` for `npm test`"
]