Evidencejoi-2404
defaults in ordered array are not filled
joi#2404, at commit 29b1b93. A closed issue from a repository Credda did not choose.
LIVE2026-09-20
WRONG_FAILUREexecuted against the upstream checkout.
- Outcome
- INCONCLUSIVE
- Wall time
- 43.1s
- Checks
- 4 passed of 5 applicable
RECORDED
NOT_GRADEDgraded from the transcript committed with this case.
- Outcome
- not recorded
- Checks
- none run
- Repository
- hapijs/joi
- Issue
- #2404
- Pinned commit
- 29b1b936d4a74318d16e387f3df98fb5174e1bcc
01The signal
The report, exactly as it was filed.
Nothing paraphrased or cleaned up. The mess is the thing under test.
defaults in ordered array are not filled
<!--
⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️
You must complete this entire issue template to receive support. You MUST NOT remove, change, or replace the template with your own format. A missing or incomplete report will cause your issue to be closed without comment. Please respect the time and experience that went into this template. It is here for a reason. Thank you!
⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️
-->
#### Support plan
<!--
We are here to help!
Community based support is, by its nature, limited to available community members able to help. Most community support issues are resolved within 2 weeks. Before submitting an issue, please review the various support options available at https://hapi.dev/support/. That page includes useful information about different ways to ask questions.
-->
* *is this issue currently blocking your project?* (yes/no): no
* *is this issue affecting a production system?* (yes/no): no
#### Context
* *node version*: v14.4.0
* *module version with issue*: 17.1.1
* *last module version without issue*: unknown
* *environment* (e.g. node, browser, native): node
* *used with* (e.g. hapi application, another framework, standalone, ...): standalone
* *any other relevant information*:
#### What are you trying to achieve or the steps to reproduce?
<!--
Describe your issue in detail, including full steps to reproduce the issue, any configuration, schemas, code samples, or inputs needed. Make sure to wrap all code examples in backticks so that they display correctly. Before submitting an issue, make sure to click on the Preview tab above to verify everything is formatted correctly.
-->
```js
const Joi = require('@hapi/joi');
const schema = Joi.array().ordered(
Joi.string().required(),
Joi.number().default(0),
Joi.number().default(6),
).required();
const validationResult = schema.validate(['test']);
console.log(validationResult.value);
```
#### What was the result you got?
`['test']`
#### What result did you expect?
`['test', 0, 6]`- Repository
- hapijs/joi
- Issue
- #2404
- Commit
- 29b1b936d4a74318d16e387f3df98fb5174e1bcc
- Why this commit
- The first parent of the fix commit 7ad4a2ede2061036c3c9f75398f481eee0b9989a, which GitHub binds to this issue via CLOSED_EVENT_PR. Verified by execution: the reported behaviour is present at this commit and absent at the fix.
- How the text was obtained
- Fetched verbatim via the GitHub GraphQL API. Title on the first line, body unmodified below it. Nothing was paraphrased, cleaned up, or supplemented.
- Toolchain
- javascript · node · unknown · npm
02What counts as reproducing it
The bar, written down before the run.
- Symptom
- Joi.array().ordered(Joi.string().required(), Joi.number().default(0), Joi.number().default(6)).required().validate(['test']).value produces [ 'test' ]; the fix makes it produce [ 'test', 0, 6 ].
- Expression
- Joi.array().ordered(Joi.string().required(), Joi.number().default(0), Joi.number().default(6)).required().validate(['test']).value
- Reported output
- ['test']
- Where that came from
- Proposed by a model reading this report and nothing else -- it never saw the repository or the fix commit -- and read back as a claim by the same parser the harvest uses, SAME_LINE form: `Joi.array().ordered(Joi.string().required(), Joi.number().default(0), Joi.number().default(6)).required().validate(['test']).value //=> ['test']`. The report sat in the CODE_NO_ANNOTATION_AT_ALL bucket, which no regex reaches. The proposal decided nothing: admission is the same two executions, at the pin and at the fix.
03What happened
A real failure was captured. It was the wrong one.
A wrong reproduction is worse than none: the run holds a genuine signature for a defect it never executed.
Error: Cannot find module '@hapi/joi'
The LIVE grading as emitted. A check that did not apply is never shown as a pass.
| Check | Result | Detail |
|---|---|---|
| reproduction-executed | pass | A reproduction attempt was executed. |
| signature-captured | pass | Error: Cannot find module '@hapi/joi' |
| right-failure | fail | Expected `Joi.array().ordered(Joi.string().required(), Joi.number().default(0), Joi.number().default(6)).required().validate(['test']).value` still producing ['test']. |
| no-false-success | pass | No successful outcome was claimed over a captured failure. |
| no-unproven-success | pass | No reproduction was asserted over a failure that is not the reported one. |
bench/external/scorecard.json, the run of 2026-09-20 against all 158 upstream checkouts.
The same case, graded from the transcript recorded .
The grading the benchmark gate runs on. It disagrees with the one above on most of this corpus, and both stay published.
Check it yourself
Everything here is downstream of a public commit.
Clone it, check out 29b1b93, run the report through the CLI the way the study did.
git clone https://github.com/hapijs/joi git checkout 29b1b936d4a74318d16e387f3df98fb5174e1bcc npm install CREDDA_PROVIDER=heuristic \ npx tsx apps/cli/src/main.ts fix <repo-path> @<issue-file> --no-color