NVIDIA / NVIDIA/NemoClaw

build-typecheck broken on main: duplicate `readinessComparisonMatches` in serving/resolver.ts (TS2393)

Open Beginner friendly
#8,438 4 comments 0 reactions 0 assignees View on GitHub
area: inference ci-failure
Dominant language
TypeScript
Stars
22.5k
Forks
3.1k
Avg merge
1d 1h
Merged PRs (30d)
715

Description

## Summary

`build-typecheck` fails on `main` because `src/lib/inference/serving/resolver.ts` defines the function `readinessComparisonMatches` **twice**, which `tsc` rejects:

```
src/lib/inference/serving/resolver.ts(203,10): error TS2393: Duplicate function implementation.
src/lib/inference/serving/resolver.ts(247,10): error TS2393: Duplicate function implementation.
```

This is a compile error, so it blocks `build-typecheck` and everything that depends on the build — `cli-test-shards (1..7)`, `installer-integration`, `static-checks`, and the E2E gates all go red as a cascade. It reproduces on a clean checkout of `main` (HEAD `ce9d1740f`) with `npm run typecheck:cli`, and on any PR whose merge base includes it (e.g. it currently reds out unrelated PRs).

## The two definitions differ

They are **not** identical duplicates — they diverge in the `version-at-least` branch, so this looks like a bad merge where the old and new implementations both survived:

- First definition (~line 203):
```ts
case "version-at-least":
return versionAtLeast(actual, comparison.value);
```
- Second definition (~line 247):
```ts
case "version-at-least": {
if (typeof actual !== "string") return false;
const order = compareNumericDottedVersions(actual, comparison.value);
return order !== undefined && order >= 0;
}
```

Because the two versions have different behavior, the correct fix is to keep whichever `version-at-least` implementation is intended (the `compareNumericDottedVersions` one appears to be the newer intent) and delete the other — that call belongs to the serving-profile owners, so flagging rather than patching.

## Likely origin

Recent commits touching this file, most-recent first: #8391 (`fix(inference): honor host-local serving recipe contracts`), #8402 (`fix(inference): admit remediable Spark storage`), #8399 (`feat(inference): add fixed local serving profiles`). The duplicate most likely landed in that series.

## Impact

Repo-wide CI red on `main` and on PRs based on it — no PR built on this base can go green until the duplicate is removed.

Contributor guide

Open the contributing guide

Research direction

Open src/lib/inference/serving/resolver.ts and inspect the two readinessComparisonMatches definitions around lines 203 and 247, especially their version-at-least branches. Confirm which implementation matches the serving-profile intent, remove the duplicate, then run npm run typecheck:cli. Done means the TS2393 error is gone and the typecheck passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.