Repository navigation
Fix upgrade-path script safety and currency labels - #1914
Merged
Merged
Conversation
… every platform On win32 the fixture path came from the real APPDATA and the generator rmSync'd the user's real agent-traces.db. It now derives from the throwaway home and throws if the path resolves outside it. Checked by loading the generator with process.platform mocked to darwin, win32 and linux and APPDATA pointing elsewhere: all three wrote under the corpus home.
A provider outside the exact and changed lists only added a note, so parity could never fail for it. Differences now push a failure; identical stays a note. Checked with a two-dir fixture: differing zzz tokens print FAIL and parity reports 1 difference; identical dirs report parity ok.
The warm check was skipped when no 'parse workers=' line printed, but that line only prints when work is pending. No line is now a pass; a line with pending work still fails.
Cost was multiplied by the FX rate and then _fmt multiplied again. Before, EUR at 0.9 with 100 USD spent over a 50 USD limit: cost 90 -> _fmt 81.00 EUR / thresholdConverted 45 -> 40.50. After: 90.00 EUR / 45.00 EUR.
Both cost-per-edit labels printed a literal dollar sign with no FX rate; they now use the currency symbol and rate like the neighbouring values.
The no-data title showed a dollar sign under other currencies.
…no cache file changed, add vitest coverage Helpers moved to scripts/upgrade-path/lib.mjs so they can be imported. The guard no longer breaks on drive or UNC roots. The warm check now compares mtime and size of every cache file before and after the warm run; the parse-workers line is secondary.
…s, allow dot-prefixed child names Adds tests for each, plus a wiring test that runs gen-corpus under a mocked win32 platform and checks run.mjs uses the shared warm helpers.
…alog The localization coverage test flagged the new interpolated literal. Adds the %@/edit key to every locale.
A warm run rewrites envelope.json and republishes the codex month index under a new name with identical content (known #1032 churn), so those two cannot be part of a no-change snapshot. Their content is already covered by the existing shard check (piece, key file and index bodies unchanged); every piece and key file is still content-hashed here.
…readable cache entries Seeded corpus is deterministic, so copilot must land on inputTokens 627176 and cost 3.015976 with every other field exact; anything else fails naming #1830. treeStats skips an unreadable entry or dangling symlink with a note. Index/envelope exclusion stays: a real re-parse rewrites piece files, which are hashed.
…runs on Windows A bare drive-letter path is not a valid ESM specifier (ERR_UNSUPPORTED_ESM_URL_SCHEME), so the child died at startup on Windows. The test now uses pathToFileURL and reports status, stderr and the fixture path on failure.
The Windows upgrade-path job is the end-to-end check there; the child that builds the whole corpus exceeds the test timeout on that runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small review follow-ups.
Swift is untested locally; CI compiles it.
Windows proof for the Copilot fixture path (upgrade-path, windows-latest, both Node legs):