This guide upgrades @qvac/sdk and verifies the result with real inference. It uses the 0.17.1 → 0.22.0 upgrade as the example; the current course branch course/redact-qvac already includes it. Read the QVAC release notes for every version you skip before you start.

1. Pin the new version

Commit package.json and package-lock.json together. On 0.22.0 node_modules shrinks from about 6.3 GB to about 2.8 GB.

2. Fix the compile errors

On 0.22.0, three files failed because the SDK’s Buffer type isn’t Node’s Buffer. The fix is to wrap the runtime the same way the reasoner already was, instead of passing the SDK module directly:

3. Run the fast checks

These don’t load a model. Passing them proves nothing about inference.

4. Run the evaluation several times

Run it at least three times and compare the per-case F1. One problem only showed up this way on 0.22.0: rotated pages regressed (F1 0.29). 0.22’s OCR reads sideways words in place, so the old “retry upright if it reads more characters” rule kept word fragments. recoveredScore() in qvac-service/qvac-analyzer.ts now multiplies characters by mean block length, so whole lines win. See OCR boxes and rotation. Also update EVALUATION_IDENTIFIERS.sdk in qvac-service/evaluation.ts and its assertion in evaluation.test.ts, so receipts name the version they ran on.

5. Run the live checks

  1. npm run qvac:ocr-smoke: prints 12 blocks for the test chat.
  2. Live browser test.
  3. On macOS, npm run qvac:offline: osNetworkDenied: true and a ready run.
Ship the upgrade only when all three pass and the evaluation passes repeatedly.