Evidencejoi-2176

joi.types() is missing `func` alias

joi#2176, at commit 2871b13. A closed issue from a repository Credda did not choose.

LIVE2026-09-20

NO_FAILURE_OBSERVED

executed against the upstream checkout.

Outcome
INCONCLUSIVE
Wall time
35.5s
Checks
3 passed of 5 applicable

RECORDED

NOT_GRADED

graded from the transcript committed with this case.

Outcome
not recorded
Checks
none run
Repository
hapijs/joi
Issue
#2176
Pinned commit
2871b130421e849ba6f072e7234fd8c954fbed50

01The signal

The report, exactly as it was filed.

Nothing paraphrased or cleaned up. The mess is the thing under test.

joi#2176 · as filedcommit 2871b13

joi.types() is missing `func` alias

<!--
  ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️
  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!

You do not need to pay to receive support. Free 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 plans available at https://hapi.dev/support/. That page includes useful information about faster and free channels to ask questions, as well as priority support options to meet you needs.
-->

* *which support plan is this issue covered by?* (e.g. Community, Core, Plus, or Enterprise): Community
* *is this issue currently blocking your project?* (yes/no): no
* *is this issue affecting a production system?* (yes/no): no

#### Context

* *node version*: 10.15.3
* *module version with issue*: 16.1.7
* *last module version without issue*: 15.0.2
* *environment* (e.g. node, browser, native): node 
* *used with* (e.g. hapi application, another framework, standalone, ...): standalone
* *any other relevant information*: none

#### What are you trying to achieve or the steps to reproduce?
I use `joi.types()` to extract some types for schema creation.

<!--
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 {func} = joi.types();
```

#### What was the result you got?
`undefined`

#### What result did you expect?
`function` type object

When renaming `func` to `function` you intended to keep `func` as an alias #2012.

At the moment `joi.types()` returns an object with only `function` prop in it. An alias here would also be helpful as now I have to do some acrobatics like this:
```js
const {'function`: func} = joi.types();
```
Repository
hapijs/joi
Issue
#2176
Commit
2871b130421e849ba6f072e7234fd8c954fbed50
Why this commit
The first parent of the fix commit c73b4559dbbde4b7545affed220ee4dfc26c1954, which GitHub binds to this issue via CLOSED_EVENT_COMMIT. 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.

expected.reportedFailurecommitted with the case
Symptom
joi.types().func produces undefined; the fix makes it produce { '$_root': { ValidationError: [class (anonymous) extends Error], [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace], _types: Set(12) { 'alternatives', 'any', 'array', 'binary', 'boolean', 'date', 'function', 'link', 'number', 'object', 'string', 'symbol' }, allow: [Function (anonymous)], alt: [Function (anonymous)], alternatives: [Function (anonymous)], any: [Function (anonymous)], array: [Function (anonymous)], assert: [Function: assert], attempt: [Function: attempt], binary: [Function (anonymous)], bool: [Function (anonymous)], boolean: [Function (anonymous)], build: [Function: build], cache: { provision: [Function: provision] }, checkPreferences: [Function: checkPreferences], compile: [Function: compile], custom: [Function (anonymous)], date: [Function (anonymous)], defaults: [Function: defaults], disallow: [Function (anonymous)], equal: [Function (anonymous)], exist: [Function (anonymous)], expression: [Function: expression], extend: [Function: extend], forbidden: [Function (anonymous)], func: [Function (anonymous)], function: [Function (anonymous)], in: [Function: in], invalid: [Function (anonymous)], isExpression: [Function: isTemplate], isRef: [Function (anonymous)], isSchema: [Function (anonymous)], link: [Function (anonymous)], not: [Function (anonymous)], number: [Function (anonymous)], object: [Function (anonymous)], only: [Function (anonymous)], optional: [Function (anonymous)], options: [Function (anonymous)], override: Symbol(override), preferences: [Function (anonymous)], prefs: [Function (anonymous)], ref: [Function: ref], required: [Function (anonymous)], string: [Function (anonymous)], strip: [Function (anonymous)], symbol: [Function (anonymous)], trace: [Function: trace], types: [Function: types], untrace: [Function (anonymous)], valid: [Function (anonymous)], version: '16.1.7', when: [Function (anonymous)], x: [Function: expression] }, '$_super': { default: [Function: bound default] }, '$_temp': { ruleset: null, whens: {} }, '$_terms': { alterations: null, dependencies: null, examples: null, externals: null, keys: null, metas: [], notes: [], patterns: null, renames: null, shared: null, tags: [], whens: null }, _cache: null, _flags: {}, _ids: { _byId: Map(0) {}, _byKey: Map(0) {}, _schemaChain: false }, _invalids: null, _preferences: null, _refs: { refs: [] }, _rules: [], _singleRules: Map(0) {}, _valids: null, type: 'function' }.
Expression
joi.types().func
Reported output
undefined
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.types().func //=> undefined`. 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

No failure was captured.

Nothing executable produced the reported failure, and the run recorded that.

bench external · checks · LIVE5 checks · 2026-09-20

The LIVE grading as emitted. A check that did not apply is never shown as a pass.

Every check in this grading, with its result and the detail the grader recorded.
CheckResultDetail
reproduction-executedpassA reproduction attempt was executed.
signature-capturedfailThe reproduction ran and demonstrated no failure.
right-failurefailExpected `joi.types().func` still producing undefined.
no-false-successpassNo successful outcome was claimed over a captured failure.
no-unproven-successpassNo 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 2871b13, run the report through the CLI the way the study did.

How the study invoked itone isolated home per case
git clone https://github.com/hapijs/joi
git checkout 2871b130421e849ba6f072e7234fd8c954fbed50
npm install

CREDDA_PROVIDER=heuristic \
  npx tsx apps/cli/src/main.ts fix <repo-path> @<issue-file> --no-color