Repository navigation
Commit 38a4cc1
authored
fix: catch styled remote-control steps and align vitest coverage provider (#302)
## Related Issue
Follow-up to #301 (release PR for @pymodel/pythinker-code@1.13.0). No
linked issue — maintainer-authored hygiene fixes surfaced during the
release loop.
## Problem
Two defects left behind by the release commit ce945e1:
1. The remote-control output test asserted the absence of a third setup
step with `/^\s*3\.\s/m` against **raw** CLI output.
`formatRemoteControlOutput` wraps step numbers in `chalk.bold.hex`
(`label()`), so any real third step renders as `
<ESC>[1m<ESC>[38;5;Nm3.<ESC>...` and the line-start anchor never matches
— the assertion cannot catch the regression it exists for (and its
previous form, a plain `not.toContain('3.')`, false-failed on the
`1.13.0` version banner).
2. The vitest 4.1.9 -> 4.1.11 security bump left `@vitest/coverage-v8`
pinned at 4.1.9. The installed coverage provider requires the same exact
vitest version and vitest warns that mixed provider/test-runner versions
are unsupported. Plain test runs do not exercise this path.
## What changed
- `apps/pythinker-code/test/cli/web/remote-control.test.ts`: moved the
third-step assertion below the existing ANSI/OSC stripping and
retargeted it to `plain`, so a styled `3.` step is caught after escapes
are removed. Verified by temporarily injecting a styled third step
through the same `label()` path — the test fails as required; reverted
afterwards.
- `package.json` + `pnpm-lock.yaml`: aligned `@vitest/coverage-v8` to
4.1.11; focused `--coverage` run loads the v8 provider with no
mixed-version warning.
- `flake.nix`: refreshed the `pnpmDeps` fixed-output hash for the
lockfile change.
- Restaged `dist-web/.web-bundle-manifest.json` (root `package.json` is
a web build input).
No changeset: nothing here changes published manifests or user-visible
behavior. No doc update needed.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [x] I have linked a related issue (external PRs: the issue must have a
maintainer's `/approve`). N/A — internal follow-up PR.
- [x] I have added tests that prove my feature works. Existing suite
covers the assertion; rejection of a styled third step proven by
temporary injection.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset. Needs
none.
- [x] Ran `gen-docs` skill, or this PR needs no doc update. Needs none.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Tests**
- Improved validation of remote-control output, including complete URLs,
formatting cleanup, and expected setup-step visibility.
- **Chores**
- Updated web build metadata and project maintenance configuration to
keep generated assets and development workflows current.
- Refreshed development tooling configuration to support consistent
coverage reporting and reproducible builds.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 7ec4ad7 commit 38a4cc1
5 files changed
Lines changed: 58 additions & 67 deletions
File tree
- apps/pythinker-code
- dist-web
- test/cli/web
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments