jev-dev-harness 0.2.17 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +155 -145
  2. package/LICENSE +21 -21
  3. package/README.md +704 -687
  4. package/bin/jev-dev.js +2 -2
  5. package/bin/jev-mcp.js +7 -7
  6. package/dashboard/index.html +1122 -1122
  7. package/dist/cli/doctor.js +46 -46
  8. package/dist/context-ranker/stage-c-jev.d.ts.map +1 -1
  9. package/dist/context-ranker/stage-c-jev.js +2 -1
  10. package/dist/context-ranker/stage-c-jev.js.map +1 -1
  11. package/dist/hooks/index.js +73 -73
  12. package/dist/shared/agent-usage.d.ts.map +1 -1
  13. package/dist/shared/agent-usage.js +2 -1
  14. package/dist/shared/agent-usage.js.map +1 -1
  15. package/dist/shared/efficiency.d.ts +2 -0
  16. package/dist/shared/efficiency.d.ts.map +1 -1
  17. package/dist/shared/efficiency.js +8 -1
  18. package/dist/shared/efficiency.js.map +1 -1
  19. package/dist/shared/telemetry.d.ts.map +1 -1
  20. package/dist/shared/telemetry.js +3 -2
  21. package/dist/shared/telemetry.js.map +1 -1
  22. package/dist/shared/usage-comparison.d.ts.map +1 -1
  23. package/dist/shared/usage-comparison.js +7 -5
  24. package/dist/shared/usage-comparison.js.map +1 -1
  25. package/dist/shared/version.js +1 -1
  26. package/docs/RELEASING.md +256 -250
  27. package/docs/jev/DELEGATED-REVIEW.md +86 -86
  28. package/docs/jev/JEV-0.2.16-DEFAULTS.md +60 -60
  29. package/docs/jev/JEV-1.14-EVALUATION.md +99 -99
  30. package/docs/jev/MEASURED-USAGE.md +155 -155
  31. package/docs/jev/MULTI-HARNESS-USAGE.md +163 -163
  32. package/docs/jev/OPENROUTER-NATIVE.md +93 -93
  33. package/docs/jev/README.md +85 -85
  34. package/docs/jev/evaluation-jev-1.14-2026-10-15.json +1731 -1731
  35. package/package.json +139 -139
package/docs/RELEASING.md CHANGED
@@ -1,250 +1,256 @@
1
- # Publishing a stable release
2
-
3
- ## Current release: 0.2.17
4
-
5
- Harness 0.2.17 requires Node.js 22+ and retains TypeSafe SDK 0.7.0.
6
- MCP SDK is updated to the patched 1.32.2 line; development uses Vitest 4.1.12
7
- and Vite 6.4.6 to retain the Node 22 baseline. Use supported Node 22 LTS or Node 24+
8
- for development; the test toolchain excludes the end-of-life Node 23 release. New unpinned
9
- configurations default to Jev 1.14 using provider-specific IDs; explicit pins remain.
10
- The new `delegate review` bridge uses only the existing offline lexical guard and
11
- never invokes a model or grants execution permission. See
12
- `docs/jev/JEV-0.2.16-DEFAULTS.md` and `docs/jev/DELEGATED-REVIEW.md`.
13
- Merge, tags, GitHub releases and npm publication require their applicable approvals.
14
- Run the validation procedure below on the clean tagged release commit.
15
-
16
- Historical note: 0.2.15 retained the native 1.13.0 pin following the earlier limited
17
- 1.14 evaluation. `docs/jev/JEV-1.14-EVALUATION.md` and its recorded results remain
18
- unchanged historical evidence, not a claim that this later owner-selected default
19
- was demonstrated superior. Engine RC3 still supports only harness 0.2.14/0.2.15.
20
-
21
- General usage comparisons use schemaVersion 2 with nullable counters/deltas;
22
- Codex-only comparisons retain schemaVersion 1. See
23
- `docs/jev/MULTI-HARNESS-USAGE.md` for migration and coverage limits.
24
-
25
- ## Version and publication
26
-
27
- The harness version is independent of the Jev model version. This release is
28
- `jev-dev-harness@0.2.17`, with Git tag `v0.2.17` and npm dist-tag `latest`.
29
- `latest` is an npm distribution pointer, not a Git tag.
30
-
31
- ## Prepare and validate
32
-
33
- For this owner-authorized 0.2.17 release, use the reviewed release branch `release/0.2.17-dependency-hardening` with Node.js 22 or newer. Keep `main` unchanged; do not merge or open a PR as part of this release path. This avoids unintentionally triggering online semantic workflows. Do not change CI to bypass checks.
34
-
35
- ```sh
36
- git status --short
37
- npm ci
38
- npm run release:dry-run
39
- npm pack --dry-run
40
- ```
41
-
42
- The publish dry run executes version checks, type checking, build and tests via
43
- `prepublishOnly`. `prepack` rebuilds `dist` for packing. Inspect the package file
44
- list and ensure it contains the compiled entry points, binaries and no secrets.
45
- The dry run does not upload a package or move the npm `latest` pointer.
46
-
47
- ## Publish 0.2.17
48
-
49
- Use your npm maintainer account; complete login/2FA locally. Do not commit tokens.
50
- Check that 0.2.17 has not already been published before uploading:
51
-
52
- ```sh
53
- npm whoami
54
- npm view jev-dev-harness versions --json
55
- git checkout release/0.2.17-dependency-hardening
56
- git status --short
57
- git describe --exact-match --tags HEAD
58
- npm run release:publish
59
- npm view jev-dev-harness@0.2.17 version
60
- npm dist-tag ls jev-dev-harness
61
- ```
62
-
63
- Run these commands separately and stop on any error. Publish only the clean,
64
- validated commit tagged above. `release:publish` runs `npm publish --tag latest`;
65
- `publishConfig` also pins the public npm registry and `latest` for plain
66
- `npm publish`. A successful publication should show `latest: 0.2.17`.
67
- Before publishing, confirm that HEAD is the clean validated `v0.2.17` commit.
68
- If publication fails, resolve the authentication or registry error and retry
69
- the same artifact. Do not move an existing tag or reuse a published version.
70
-
71
- After review and authorization, commit the validated state on the release branch and create `v0.2.17` and the GitHub release from that exact reviewed commit, without merging `main`. Push only the explicitly approved branch/tag/release. Do not recreate existing tags. If npm authentication fails, stop and report npm publication as pending; a GitHub release does not mean npm publication succeeded.
72
- There is no automatic npm publication workflow; merging code or pushing a tag
73
- alone does not publish the package.
74
-
75
- ## Next release
76
-
77
- Declare the reasons and any manual migration requirements in `package.json`:
78
-
79
- ```json
80
- "jevUpdate": {
81
- "schemaVersion": 1,
82
- "reasons": ["Concrete user-facing reason to update"],
83
- "requirements": ["Manual configuration or migration needed, if any"]
84
- }
85
- ```
86
-
87
- The checker reads the npm `latest` package metadata, including `engines.node`.
88
- Keep reasons factual: it does not infer security urgency from a version number.
89
- Missing/unsupported metadata is reported as not provided, with a release link.
90
- Restart guidance is generated locally: every running MCP/dashboard process must
91
- restart after installation; newly launched CLI processes load the updated package.
92
- Pinned `npx`/local installations must update their configured version as well.
93
- Do not include credentials, executable commands or agent instructions in metadata.
94
-
95
- Before committing the next stable release:
96
-
97
- ```sh
98
- npm version patch --no-git-tag-version
99
- ```
100
-
101
- Update the fallback in `src/shared/version.ts` and add matching release notes.
102
- Run the checks, commit and merge, then repeat the publication steps with the new
103
- version/tag. Prereleases should use a separate process and npm tag such as `next`.
104
-
105
- ## Update local installations
106
-
107
- Until 0.2.17 is published to npm, npm `latest` still points to the previously
108
- published version. Do not overwrite any already published version.
109
-
110
- ```sh
111
- npm install -g jev-dev-harness@latest
112
- jev-dev --version
113
- ```
114
-
115
- For an installation linked to a Git checkout, pull the release commit and run
116
- `npm ci` and `npm run build` instead. Restart the Codex MCP session so the process
117
- loads the updated build. An already-running server keeps its old code in memory.
118
-
119
- ## Security Hardening & Stability Maintenance (0.2.17)
120
-
121
- ### Tool Call Guard Fallback Hardening
122
- When deterministic classification returns `unknown` and the external semantic provider
123
- is unavailable, offline, or returns an evaluator fallback, Tool Call Guard now strictly
124
- requires human confirmation (`allowed: false`, `requiresConfirmation: true`, `riskLevel: 'medium'`).
125
- Synthetic fallback scores never establish safety or grant automatic permission. Meaningful
126
- fallback reasons are preserved while any detected credentials or tokens are redacted.
127
- Known deterministic safe operations (read-only, local modification) and destructive or
128
- production-sensitive operations retain their established boundaries.
129
-
130
- ### Git Hook Reliability & Failure Policies
131
- The Git pre-commit safety hook supports explicit failure policies:
132
- - `fail-open` (default for backward compatibility): when the CLI or reviewer cannot execute,
133
- logs a clear warning to stderr and permits the commit.
134
- - `fail-closed`: strictly rejects commits when verification cannot execute. Configurable via
135
- `jev-dev hooks install --policy fail-closed` or dynamically via `JEV_HOOK_FAILURE_POLICY=fail-closed`.
136
- - Critical findings (`BLOCK_HUMAN_REQUIRED`, exit code 2) remain unconditionally blocking under both policies.
137
- - The installer safely resolves Git hooks in Git worktrees and repositories with `core.hooksPath`,
138
- and refuses to overwrite existing user-managed hooks without `--force`.
139
-
140
- ### Windows Test Isolation & Fixture Stability
141
- Temporary Git repositories and cache test fixtures are isolated under operating system
142
- temporary directories (`os.tmpdir()`) rather than fixed paths inside `tests/fixtures`.
143
- This eliminates Windows `EBUSY` file-locking contention with workspace file indexers.
144
- Broad catch blocks in gitignore tests were corrected so assertions are never swallowed.
145
-
146
- ## CLI and Git revision maintenance (0.2.14)
147
-
148
- JSON output now preserves the existing text-mode failure criteria: patch review returns
149
- 2 only for BLOCK_HUMAN_REQUIRED; guard returns 1 when denied and confirmation is required;
150
- semantic lint returns 1 for failed checks unless advisory mode is requested. Escalated
151
- patch review and advisory lint retain exit 0. Execution/argument errors remain exit 1.
152
- JSON bodies remain unchanged on stdout; diagnostics remain on stderr. Automation that
153
- previously assumed JSON always exits successfully must handle the corrected statuses.
154
-
155
- Shared diff extraction invokes Git directly without a shell. commitRange remains an
156
- optional string containing one opaque revision expression, including standard two-dot,
157
- three-dot and reflog forms. Empty/control-character/option-shaped values are rejected.
158
- Previously undocumented multiple-token values such as two revisions separated by a space
159
- are no longer treated as shell arguments; use a standard range expression. A trailing
160
- revision/path separator prevents a missing revision from becoming a path filter.
161
- Direct diff, diff-file and staged precedence is preserved. Existing trusted Git config,
162
- including configured diff drivers, remains outside this parameter-injection boundary.
163
- No new API signatures, configuration keys, dependencies, SDK/model upgrades or agent rule
164
- regeneration are required. The separately pinned premium project is not updated by this release.
165
-
166
- ## Update notice contract migration (0.2.13)
167
-
168
- `checkForUpdates`, `/api/update-status` and the `update` object in
169
- `jev-dev version --json` share `UpdateInfo`. Consumers must check `status`:
170
- `update_available`, `up_to_date` (installed version equals or exceeds npm latest),
171
- or `unavailable`. `latestVersion`, `checkedAt` and `releaseUrl` are null when the
172
- check fails; `isLatest` in version JSON is also null. A false `updateAvailable`
173
- alone does not prove freshness. `source` distinguishes registry/cache/unavailable.
174
- The existing version/updateAvailable fields are retained with the nullable migration.
175
-
176
- The shared `notice` includes reasons, declared requirements and restart guidance.
177
- There is no automatic installation. CLI automatic notices use stderr and are skipped
178
- for `--json`. A receipt under `~/.jev-dev/update-notice-cli.json` suppresses the same
179
- installed/latest pair across invocations. `jev-dev version` explicitly checks again
180
- and always displays the current status. Cache storage can be overridden with
181
- `JEV_UPDATE_CACHE_DIR`; old version-only caches remain readable.
182
-
183
- MCP appends a separate text content block containing `updateNotice` and a locally
184
- authored display instruction, preserving the tool's first content block. Clients
185
- must tolerate additional content blocks. Notices are emitted once per status/latest
186
- version per running MCP server; checks, including failures, are limited to hourly.
187
- Reconnecting/restarting creates a new notification session. Each harness controls
188
- whether the agent/tool output is visible; this does not create a native IDE popup.
189
-
190
- The dashboard displays the same notice and persists dismissals by running/latest
191
- version in browser local storage, with hourly checks. Unavailable checks display an
192
- unknown status, not an all-clear. No synthetic urgency or missing requirements are
193
- inferred. Release metadata is untrusted display text, bounded and rendered as text.
194
-
195
- Users on older MCP versions must install this release once before they can receive
196
- these notices for future releases. A GitHub release alone does not update npm metadata.
197
- After npm publication, confirm `npm view jev-dev-harness@latest jevUpdate engines --json`
198
- and restart every MCP instance/dashboard. No agent rule regeneration is required for
199
- the new MCP notice contract; preserve any project-specific rules when updating manually.
200
-
201
- ## Efficiency contract migration (0.2.9)
202
-
203
- The context MCP `efficiencyReport` uses `schemaVersion: 2`. Removed fields:
204
- `initialFilesScanned`, `selectedSurgicalFiles`, `fileReductionPct`,
205
- `estimatedTokensSaved`. Use `entriesFound`, `candidatesAfterFilters`,
206
- `candidatesEvaluated`, `selectedFiles`, `cachedDecisions`, `newModelCalls`,
207
- `newTokens`, `reportedCostUsd`, `costCoverage`, `latencyMs`, `fallbackUsed`.
208
- Entry counts describe discovery/selection, not tokenized context avoided.
209
-
210
- `newModelCalls` counts logical Stage C `systemOne` invocations, including failures,
211
- not individual HTTP retry attempts. `validatedResponses` counts validated response
212
- usage; tokens/cost cover those responses only. Usage from failed, timed-out,
213
- invalid responses and unreported retries is unavailable. `costedRequests` gives
214
- the coverage of the reported sum; partial cost is not a complete bill. Absent
215
- cost is null in the efficiency report ("não informado"), including full cache.
216
- An explicit provider cost of zero remains zero. `evaluatedByJev` and
217
- `evaluatedByLlm` retain their decision counts, including cache; they are not new
218
- API calls. `evaluatedCandidates` counts Stage C candidates (including heuristic
219
- fallback); heuristic candidates do not imply model inference.
220
-
221
- `tokenSavings` and `moneySavings` are null, `savingsStatus` is `not_measured`.
222
- Tool-rank `metrics.tokensSaved` is now null. Telemetry event `tokensSaved` is
223
- optional and deprecated; new emitters omit it. Historical JSONL records are
224
- retained/read unchanged but their estimates are ignored by aggregation/UI.
225
- Summary `totalTokensSaved` and `estimatedDollarsSaved` remain as deprecated null
226
- fields. Consumers must stop numeric arithmetic on them. Summary `usage` covers
227
- only context-rank events with the new call counters, within the most recent
228
- 1,000 events; `eventsWithUsage`/`eventsWithoutUsage` expose historical coverage.
229
- The dashboard simulation is explicitly hypothetical, separate from telemetry.
230
-
231
- Updating the package does not update rule files already copied into projects.
232
- Review and replace only the Jev efficiency section in CODEX.md, CLAUDE.md,
233
- GEMINI.md, .cursorrules, .clinerules, .windsurfrules and
234
- .github/copilot-instructions.md (plus custom AGENTS.md/Codex instructions).
235
- The new template is returned by `getAgentRuleContent()`. `jev-dev doctor
236
- --init-rules` overwrites the standard rule files: use it only when they contain
237
- no project-specific instructions or after backing up and merging those rules.
238
-
239
- In Codex, confirm the MCP command points to the updated installation/build.
240
- For a pinned npx command, update its package version to 0.2.9 after publication.
241
- Fully quit and reopen Codex to start a new MCP process; verify its version and
242
- `jev_rank_context` output has `schemaVersion: 2`. Avoid reusing an old report as
243
- evidence. These instructions do not change any other project automatically.
244
-
245
- ## Measured usage (0.2.12)
246
-
247
- The new `efficiency` CLI and `jev_compare_usage` MCP tool require the build
248
- containing 0.2.12. See [the workflow](jev/MEASURED-USAGE.md) for paired runs,
249
- scoped ledgers, declared coverage and validation/billing receipts. Do not claim
250
- measured savings from ranking alone or republish 0.2.9 with the new source.
1
+ # Publishing a stable release
2
+
3
+ ## Current release: 0.2.18
4
+
5
+ Harness 0.2.18 requires Node.js 22+ and retains TypeSafe SDK 0.7.0.
6
+ MCP SDK is on the patched 1.32.2 line; development uses Vitest 4.1.12
7
+ and Vite 6.4.6 to retain the Node 22 baseline. Use supported Node 22 LTS or Node 24+
8
+ for development; the test toolchain excludes the end-of-life Node 23 release. New unpinned
9
+ configurations default to Jev 1.14 using provider-specific IDs; explicit pins remain.
10
+ Reported USD sums/deltas normalize IEEE-754 decimal drift via `roundUsd`, and
11
+ multi-rollout usage comparisons validate every rollout against the baseline reference.
12
+ The `delegate review` bridge uses only the existing offline lexical guard and
13
+ never invokes a model or grants execution permission. See
14
+ `docs/jev/JEV-0.2.16-DEFAULTS.md` and `docs/jev/DELEGATED-REVIEW.md`.
15
+ Merge, tags, GitHub releases and npm publication require their applicable approvals.
16
+ Run the validation procedure below on the clean tagged release commit.
17
+
18
+ Historical note: 0.2.15 retained the native 1.13.0 pin following the earlier limited
19
+ 1.14 evaluation. `docs/jev/JEV-1.14-EVALUATION.md` and its recorded results remain
20
+ unchanged historical evidence, not a claim that this later owner-selected default
21
+ was demonstrated superior. Engine RC3 still supports only harness 0.2.14/0.2.15.
22
+
23
+ General usage comparisons use schemaVersion 2 with nullable counters/deltas;
24
+ Codex-only comparisons retain schemaVersion 1. See
25
+ `docs/jev/MULTI-HARNESS-USAGE.md` for migration and coverage limits.
26
+
27
+ ## Version and publication
28
+
29
+ The harness version is independent of the Jev model version. This release is
30
+ `jev-dev-harness@0.2.18`, with Git tag `v0.2.18` and npm dist-tag `latest`.
31
+ `latest` is an npm distribution pointer, not a Git tag.
32
+
33
+ ## Prepare and validate
34
+
35
+ From a clean checkout of `main` with Node.js 22 or newer:
36
+
37
+ ```sh
38
+ git pull --ff-only origin main
39
+ npm ci
40
+ npm run release:dry-run
41
+ npm pack --dry-run
42
+ ```
43
+
44
+ The publish dry run executes version checks, type checking, build and tests via
45
+ `prepublishOnly`. `prepack` rebuilds `dist` for packing. Inspect the package file
46
+ list and ensure it contains the compiled entry points, binaries and no secrets.
47
+ The dry run does not upload a package or move the npm `latest` pointer.
48
+
49
+ ## Publish 0.2.18
50
+
51
+ Use your npm maintainer account; complete login/2FA locally. Do not commit tokens.
52
+ Check that 0.2.18 has not already been published before uploading:
53
+
54
+ ```sh
55
+ npm whoami
56
+ npm view jev-dev-harness versions --json
57
+ git checkout main
58
+ git pull --ff-only origin main
59
+ git describe --exact-match --tags HEAD
60
+ npm run release:publish
61
+ npm view jev-dev-harness@0.2.18 version
62
+ npm dist-tag ls jev-dev-harness
63
+ ```
64
+
65
+ Run these commands separately and stop on any error. Publish only the clean,
66
+ validated commit tagged above. `release:publish` runs `npm publish --tag latest`;
67
+ `publishConfig` also pins the public npm registry and `latest` for plain
68
+ `npm publish`. A successful publication should show `latest: 0.2.18`.
69
+ Before publishing, confirm that HEAD is the clean validated `v0.2.18` commit.
70
+ If publication fails, resolve the authentication or registry error and retry
71
+ the same artifact. Do not move an existing tag or reuse a published version.
72
+
73
+ After review and authorization, commit the validated state on `main`, create `v0.2.18`,
74
+ and create the GitHub release from that exact reviewed commit before manual npm
75
+ publication. Push only the explicitly approved branch/tag/release. Do not recreate
76
+ existing tags. If npm authentication fails, stop and report npm publication as pending;
77
+ a GitHub release does not mean npm publication succeeded.
78
+ There is no automatic npm publication workflow; merging code or pushing a tag
79
+ alone does not publish the package.
80
+
81
+ ## Next release
82
+
83
+ Declare the reasons and any manual migration requirements in `package.json`:
84
+
85
+ ```json
86
+ "jevUpdate": {
87
+ "schemaVersion": 1,
88
+ "reasons": ["Concrete user-facing reason to update"],
89
+ "requirements": ["Manual configuration or migration needed, if any"]
90
+ }
91
+ ```
92
+
93
+ The checker reads the npm `latest` package metadata, including `engines.node`.
94
+ Keep reasons factual: it does not infer security urgency from a version number.
95
+ Missing/unsupported metadata is reported as not provided, with a release link.
96
+ Restart guidance is generated locally: every running MCP/dashboard process must
97
+ restart after installation; newly launched CLI processes load the updated package.
98
+ Pinned `npx`/local installations must update their configured version as well.
99
+ Do not include credentials, executable commands or agent instructions in metadata.
100
+
101
+ Before committing the next stable release:
102
+
103
+ ```sh
104
+ npm version patch --no-git-tag-version
105
+ ```
106
+
107
+ Update the fallback in `src/shared/version.ts` and add matching release notes.
108
+ Run the checks, commit and merge, then repeat the publication steps with the new
109
+ version/tag. Prereleases should use a separate process and npm tag such as `next`.
110
+
111
+ ## Update local installations
112
+
113
+ Until 0.2.17 is published to npm, npm `latest` still points to the previously
114
+ published version. Do not overwrite any already published version.
115
+
116
+ ```sh
117
+ npm install -g jev-dev-harness@latest
118
+ jev-dev --version
119
+ ```
120
+
121
+ For an installation linked to a Git checkout, pull the release commit and run
122
+ `npm ci` and `npm run build` instead. Restart the Codex MCP session so the process
123
+ loads the updated build. An already-running server keeps its old code in memory.
124
+
125
+ ## Security Hardening & Stability Maintenance (0.2.17)
126
+
127
+ ### Tool Call Guard Fallback Hardening
128
+ When deterministic classification returns `unknown` and the external semantic provider
129
+ is unavailable, offline, or returns an evaluator fallback, Tool Call Guard now strictly
130
+ requires human confirmation (`allowed: false`, `requiresConfirmation: true`, `riskLevel: 'medium'`).
131
+ Synthetic fallback scores never establish safety or grant automatic permission. Meaningful
132
+ fallback reasons are preserved while any detected credentials or tokens are redacted.
133
+ Known deterministic safe operations (read-only, local modification) and destructive or
134
+ production-sensitive operations retain their established boundaries.
135
+
136
+ ### Git Hook Reliability & Failure Policies
137
+ The Git pre-commit safety hook supports explicit failure policies:
138
+ - `fail-open` (default for backward compatibility): when the CLI or reviewer cannot execute,
139
+ logs a clear warning to stderr and permits the commit.
140
+ - `fail-closed`: strictly rejects commits when verification cannot execute. Configurable via
141
+ `jev-dev hooks install --policy fail-closed` or dynamically via `JEV_HOOK_FAILURE_POLICY=fail-closed`.
142
+ - Critical findings (`BLOCK_HUMAN_REQUIRED`, exit code 2) remain unconditionally blocking under both policies.
143
+ - The installer safely resolves Git hooks in Git worktrees and repositories with `core.hooksPath`,
144
+ and refuses to overwrite existing user-managed hooks without `--force`.
145
+
146
+ ### Windows Test Isolation & Fixture Stability
147
+ Temporary Git repositories and cache test fixtures are isolated under operating system
148
+ temporary directories (`os.tmpdir()`) rather than fixed paths inside `tests/fixtures`.
149
+ This eliminates Windows `EBUSY` file-locking contention with workspace file indexers.
150
+ Broad catch blocks in gitignore tests were corrected so assertions are never swallowed.
151
+
152
+ ## CLI and Git revision maintenance (0.2.14)
153
+
154
+ JSON output now preserves the existing text-mode failure criteria: patch review returns
155
+ 2 only for BLOCK_HUMAN_REQUIRED; guard returns 1 when denied and confirmation is required;
156
+ semantic lint returns 1 for failed checks unless advisory mode is requested. Escalated
157
+ patch review and advisory lint retain exit 0. Execution/argument errors remain exit 1.
158
+ JSON bodies remain unchanged on stdout; diagnostics remain on stderr. Automation that
159
+ previously assumed JSON always exits successfully must handle the corrected statuses.
160
+
161
+ Shared diff extraction invokes Git directly without a shell. commitRange remains an
162
+ optional string containing one opaque revision expression, including standard two-dot,
163
+ three-dot and reflog forms. Empty/control-character/option-shaped values are rejected.
164
+ Previously undocumented multiple-token values such as two revisions separated by a space
165
+ are no longer treated as shell arguments; use a standard range expression. A trailing
166
+ revision/path separator prevents a missing revision from becoming a path filter.
167
+ Direct diff, diff-file and staged precedence is preserved. Existing trusted Git config,
168
+ including configured diff drivers, remains outside this parameter-injection boundary.
169
+ No new API signatures, configuration keys, dependencies, SDK/model upgrades or agent rule
170
+ regeneration are required. The separately pinned premium project is not updated by this release.
171
+
172
+ ## Update notice contract migration (0.2.13)
173
+
174
+ `checkForUpdates`, `/api/update-status` and the `update` object in
175
+ `jev-dev version --json` share `UpdateInfo`. Consumers must check `status`:
176
+ `update_available`, `up_to_date` (installed version equals or exceeds npm latest),
177
+ or `unavailable`. `latestVersion`, `checkedAt` and `releaseUrl` are null when the
178
+ check fails; `isLatest` in version JSON is also null. A false `updateAvailable`
179
+ alone does not prove freshness. `source` distinguishes registry/cache/unavailable.
180
+ The existing version/updateAvailable fields are retained with the nullable migration.
181
+
182
+ The shared `notice` includes reasons, declared requirements and restart guidance.
183
+ There is no automatic installation. CLI automatic notices use stderr and are skipped
184
+ for `--json`. A receipt under `~/.jev-dev/update-notice-cli.json` suppresses the same
185
+ installed/latest pair across invocations. `jev-dev version` explicitly checks again
186
+ and always displays the current status. Cache storage can be overridden with
187
+ `JEV_UPDATE_CACHE_DIR`; old version-only caches remain readable.
188
+
189
+ MCP appends a separate text content block containing `updateNotice` and a locally
190
+ authored display instruction, preserving the tool's first content block. Clients
191
+ must tolerate additional content blocks. Notices are emitted once per status/latest
192
+ version per running MCP server; checks, including failures, are limited to hourly.
193
+ Reconnecting/restarting creates a new notification session. Each harness controls
194
+ whether the agent/tool output is visible; this does not create a native IDE popup.
195
+
196
+ The dashboard displays the same notice and persists dismissals by running/latest
197
+ version in browser local storage, with hourly checks. Unavailable checks display an
198
+ unknown status, not an all-clear. No synthetic urgency or missing requirements are
199
+ inferred. Release metadata is untrusted display text, bounded and rendered as text.
200
+
201
+ Users on older MCP versions must install this release once before they can receive
202
+ these notices for future releases. A GitHub release alone does not update npm metadata.
203
+ After npm publication, confirm `npm view jev-dev-harness@latest jevUpdate engines --json`
204
+ and restart every MCP instance/dashboard. No agent rule regeneration is required for
205
+ the new MCP notice contract; preserve any project-specific rules when updating manually.
206
+
207
+ ## Efficiency contract migration (0.2.9)
208
+
209
+ The context MCP `efficiencyReport` uses `schemaVersion: 2`. Removed fields:
210
+ `initialFilesScanned`, `selectedSurgicalFiles`, `fileReductionPct`,
211
+ `estimatedTokensSaved`. Use `entriesFound`, `candidatesAfterFilters`,
212
+ `candidatesEvaluated`, `selectedFiles`, `cachedDecisions`, `newModelCalls`,
213
+ `newTokens`, `reportedCostUsd`, `costCoverage`, `latencyMs`, `fallbackUsed`.
214
+ Entry counts describe discovery/selection, not tokenized context avoided.
215
+
216
+ `newModelCalls` counts logical Stage C `systemOne` invocations, including failures,
217
+ not individual HTTP retry attempts. `validatedResponses` counts validated response
218
+ usage; tokens/cost cover those responses only. Usage from failed, timed-out,
219
+ invalid responses and unreported retries is unavailable. `costedRequests` gives
220
+ the coverage of the reported sum; partial cost is not a complete bill. Absent
221
+ cost is null in the efficiency report ("não informado"), including full cache.
222
+ An explicit provider cost of zero remains zero. `evaluatedByJev` and
223
+ `evaluatedByLlm` retain their decision counts, including cache; they are not new
224
+ API calls. `evaluatedCandidates` counts Stage C candidates (including heuristic
225
+ fallback); heuristic candidates do not imply model inference.
226
+
227
+ `tokenSavings` and `moneySavings` are null, `savingsStatus` is `not_measured`.
228
+ Tool-rank `metrics.tokensSaved` is now null. Telemetry event `tokensSaved` is
229
+ optional and deprecated; new emitters omit it. Historical JSONL records are
230
+ retained/read unchanged but their estimates are ignored by aggregation/UI.
231
+ Summary `totalTokensSaved` and `estimatedDollarsSaved` remain as deprecated null
232
+ fields. Consumers must stop numeric arithmetic on them. Summary `usage` covers
233
+ only context-rank events with the new call counters, within the most recent
234
+ 1,000 events; `eventsWithUsage`/`eventsWithoutUsage` expose historical coverage.
235
+ The dashboard simulation is explicitly hypothetical, separate from telemetry.
236
+
237
+ Updating the package does not update rule files already copied into projects.
238
+ Review and replace only the Jev efficiency section in CODEX.md, CLAUDE.md,
239
+ GEMINI.md, .cursorrules, .clinerules, .windsurfrules and
240
+ .github/copilot-instructions.md (plus custom AGENTS.md/Codex instructions).
241
+ The new template is returned by `getAgentRuleContent()`. `jev-dev doctor
242
+ --init-rules` overwrites the standard rule files: use it only when they contain
243
+ no project-specific instructions or after backing up and merging those rules.
244
+
245
+ In Codex, confirm the MCP command points to the updated installation/build.
246
+ For a pinned npx command, update its package version to 0.2.9 after publication.
247
+ Fully quit and reopen Codex to start a new MCP process; verify its version and
248
+ `jev_rank_context` output has `schemaVersion: 2`. Avoid reusing an old report as
249
+ evidence. These instructions do not change any other project automatically.
250
+
251
+ ## Measured usage (0.2.12)
252
+
253
+ The new `efficiency` CLI and `jev_compare_usage` MCP tool require the build
254
+ containing 0.2.12. See [the workflow](jev/MEASURED-USAGE.md) for paired runs,
255
+ scoped ledgers, declared coverage and validation/billing receipts. Do not claim
256
+ measured savings from ranking alone or republish 0.2.9 with the new source.