Skip to content

fix: Update private-kernel-lib tests for bounded vec change#21907

Merged
jfecher merged 1 commit into
nextfrom
jf/fix-tests
Apr 16, 2026
Merged

fix: Update private-kernel-lib tests for bounded vec change#21907
jfecher merged 1 commit into
nextfrom
jf/fix-tests

Conversation

@jfecher

@jfecher jfecher commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

noir-lang/noir#11679 in the Noir compiler removes zeroing of BoundedVec elements past the length of the bounded vec. It is a potential footgun: due to the behavior of BoundedVec::eq previously checking these elements past the length, it meant that when returned from an unconstrained function, users also needed to constrain past-the-length elements, but this was not done in practice.

4 tests in private-kernel-lib are breaking with this change, I've edited them to manually create a Vec where each element past the length is zeroed instead.

@jfecher jfecher requested a review from LeilaWang as a code owner March 23, 2026 17:05
github-merge-queue Bot pushed a commit that referenced this pull request Mar 23, 2026
…1909)

## Summary

- Pin `typescript@^5.3.3` in docs examples validation to match
`yarn-project`. The unpinned `yarn add -D typescript` started pulling
TypeScript 6.0, which changed JSON import type inference and made
existing `@ts-expect-error` directives unused (TS2578 errors), breaking
`example_swap` type-checking.
- Use git state (`git show HEAD:...`) instead of filesystem state (`-s`)
for yarn.lock emptiness check. When `example_swap` fails, GNU parallel's
`--halt now,fail=1` kills other jobs mid-`yarn add` before cleanup traps
run, leaving lockfiles dirty on disk. On retry, the check found dirty
filesystem state and reported the misleading `token_bridge/yarn.lock is
not empty` error.

## Context

Multiple unrelated PRs (#21865, #21907, #21812) are failing with:
```
ERROR: token_bridge/yarn.lock is not empty. These files must be committed empty.
```

Root cause chain:
1. `yarn add -D typescript` (unpinned) pulls TS 6.0, released today
2. TS 6.0 improved JSON import type inference, making `@ts-expect-error`
directives unused → TS2578 errors in `example_swap`
3. `example_swap` fails → `--halt now,fail=1` kills `token_bridge`
mid-`yarn add` → cleanup trap never runs
4. Retry finds dirty `token_bridge/yarn.lock` on filesystem → misleading
error

## Test plan

- [ ] CI passes on this PR (docs examples validation succeeds)
- [ ] Verify `example_swap` and `token_bridge` type-check cleanly with
pinned TS 5.x

🤖 Generated with [Claude Code](https://claude.com/claude-code)

@benesjan benesjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jfecher jfecher added this pull request to the merge queue Apr 16, 2026
Merged via the queue into next with commit d91986c Apr 16, 2026
19 checks passed
@jfecher jfecher deleted the jf/fix-tests branch April 16, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants