@ruso-0/nreki 10.6.1 → 10.7.1
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.
- package/CHANGELOG.md +55 -0
- package/README.md +72 -618
- package/dist/engine.d.ts +6 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +58 -12
- package/dist/engine.js.map +1 -1
- package/dist/handlers/code/edit.d.ts.map +1 -1
- package/dist/handlers/code/edit.js +39 -4
- package/dist/handlers/code/edit.js.map +1 -1
- package/dist/handlers/code/kernel-bridge.d.ts.map +1 -1
- package/dist/handlers/code/kernel-bridge.js +10 -4
- package/dist/handlers/code/kernel-bridge.js.map +1 -1
- package/dist/handlers/navigate.d.ts.map +1 -1
- package/dist/handlers/navigate.js +31 -3
- package/dist/handlers/navigate.js.map +1 -1
- package/dist/repo-map.d.ts +4 -0
- package/dist/repo-map.d.ts.map +1 -1
- package/dist/repo-map.js +8 -2
- package/dist/repo-map.js.map +1 -1
- package/dist/semantic-edit.d.ts +2 -0
- package/dist/semantic-edit.d.ts.map +1 -1
- package/dist/semantic-edit.js +50 -3
- package/dist/semantic-edit.js.map +1 -1
- package/dist/utils/defect-radar.d.ts +35 -0
- package/dist/utils/defect-radar.d.ts.map +1 -0
- package/dist/utils/defect-radar.js +49 -0
- package/dist/utils/defect-radar.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to NREKI will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [10.7.1] - 2026-04-18
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Critical cache miss bug in edit validation warm path**: `engine.cachedGraph` was never populated during warmup (`getRepoMap` did not set it, only `getDependencyGraph` did). Additionally, the FSWatcher invalidated the cache indiscriminately after any internal edit, forcing a full repo reparse (~70s on VSCode-scale codebases, 5,584 files).
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Cryptographic edit tickets (SHA-256) in `NrekiEngine` to distinguish internal edits (NREKI writes) from external changes (human, git, linter, auto-healer). Only external changes invalidate the topology cache.
|
|
12
|
+
- `topologyChanged` detection in `semanticEdit` and `batchSemanticEdit` using AST signature change + import/export diff. Selective cache invalidation only when the edit actually changes topology.
|
|
13
|
+
- Dynamic imports (`import("...")`) and side-effect imports (`import "module";`) now detected by `extractImports`.
|
|
14
|
+
- OOM guard on ticket map (max 100 entries, FIFO eviction).
|
|
15
|
+
- `engine.invalidateCachedGraph()` public method for explicit invalidation.
|
|
16
|
+
- 6 new tests in `tests/cache-tickets.test.ts` covering cache persistence, invalidation on import changes, ticket rollback cleanup, external modification detection, OOM guard, and SQLite index freshness.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- `engine.getRepoMap()` now populates `cachedGraph` as side effect on warmup (fix for cold-boot cache miss).
|
|
20
|
+
- `processQueue` always calls `indexFile` to keep SQLite/BM25 search index synchronized, even for internal edits.
|
|
21
|
+
|
|
22
|
+
### Performance
|
|
23
|
+
Warm edits on VSCode-scale codebase (5,584 files):
|
|
24
|
+
- Before: ~39-74s per edit (full repo reparse on every edit)
|
|
25
|
+
- After: ~17ms median for edits without import changes (2,254x improvement)
|
|
26
|
+
- Edits that change imports/exports trigger legitimate regeneration (~56-70s, one-time)
|
|
27
|
+
|
|
28
|
+
Benchmark methodology: 5 edits on microsoft/vscode with cold warmup. Results reproducible via the instrumented benchmark wrapper. See `D:\bench\results\nreki-v10.7.1-fix-benchmark-2026-04-18.json`.
|
|
29
|
+
|
|
30
|
+
### Tests
|
|
31
|
+
- 789 tests passing (783 pre-existing + 6 new cache-tickets tests)
|
|
32
|
+
- Zero-any discipline preserved
|
|
33
|
+
- No regressions
|
|
34
|
+
|
|
35
|
+
## 10.7.0 (2026-04-17) — The NREKI Way
|
|
36
|
+
|
|
37
|
+
NREKI stops acting like a passive guard and starts acting like an immune system. The LLM is now surrounded by parasitic signals that cost nothing per call but continuously shape its behavior toward discipline. Four features ship in one minor bump.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- **Parasitic Defect Radar.** Four regex-based inline detectors run during `outline` on `sym.body`, tagging symbols with `⚠️ [label,...]` when LLM rush signals are detected: `swallowed-error` (empty catch), `type-escape-any` (any escape — anchored to avoid JSX false positives), `ts-suppress` (`@ts-ignore` / `@ts-expect-error` / `@ts-nocheck`), `non-null-assert` (`value!.method()` — anchored to skip `!==`). Zero additional tokens consumed — tags ride the outline header that's already emitted. Microsecond latency per symbol. Escape hatch: a `// nreki-hunt: disable` comment anywhere in the body zeros out all detections for that symbol.
|
|
41
|
+
- **Symbol-level Ghost Oracle.** Exported symbols with 0 external references are tagged `👻 [0 ext refs]` in outline. Entry files (`index.*`, `main.*`, `app.*`, `setup.*`, `server.*`, `cli.*`, `vite-env.*`, `*.config.*`, `*.test.*`, `*.spec.*`) are excluded — they're referenced by runtimes and test-runners, not by the import graph. Pre-fetched via `Promise.all` over unique names so the LSP-backed lookup can parallelize when it becomes truly async (currently `engine.searchFilesBySymbol` is an async wrapper over sync `NrekiDB.searchRawCode` — future-proof shape).
|
|
42
|
+
- **Executable Engrams (immortal ASSERT).** Engrams whose `insight` starts with `ASSERT` (case-insensitive) survive AST-hash mutation — they remain pinned to the symbol across edits. Regular engrams still invalidate on mutation as before. No DSL, just English — the LLM reads and respects. Use it to pin invariants about a symbol's role or contract that transcend the body's implementation.
|
|
43
|
+
- **TTRD Bounties (quantified).** Successful restoration of strict types now reports the exact CFI discount to the LLM via `[TTRD BOUNTY] TYPE DEBT PAID 🏆` feedback: `File friction score (CFI) reduced by N.N points. Excellent engineering.` Pavlovian reinforcement loop closed — the LLM learns that narrowing types produces a measurable reward, not a token of praise.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
- [handleOutline](src/handlers/navigate.ts) now renders defect tags, ghost tags, and immortal ASSERT engrams inline alongside the existing risk tags. The LOW-risk skip is extended so any symbol flagged with defects or a ghost tag stays visible.
|
|
47
|
+
- [kernel-bridge.ts](src/handlers/code/kernel-bridge.ts) TTRD feedback now quantifies CFI reduction (via `getFileCFI` before/after) instead of emitting a generic "debt paid" message.
|
|
48
|
+
|
|
49
|
+
### Tests
|
|
50
|
+
- +7 unit tests for [defect-radar.ts](tests/defect-radar.test.ts) (detector coverage + false-positive guards + escape-hatch).
|
|
51
|
+
- +5 integration tests for [handleOutline](tests/navigate.test.ts) (ghost oracle + entry-file exemption + immortal ASSERT survival + regular engram invalidation + case-insensitivity). Real `NrekiEngine`, temp projects, no mocks.
|
|
52
|
+
- Total: 783/783 across 54 files. Zero regressions.
|
|
53
|
+
|
|
54
|
+
### Internal
|
|
55
|
+
- Zero new `any` introduced. Residue grep shows only the 6 known cosmetic hits from v10.6.1 (JSDoc in shadow-generator, one codegen string literal, and three descriptive comments).
|
|
56
|
+
|
|
57
|
+
### Philosophy
|
|
58
|
+
> NREKI now acts less like a passive guard and more like an immune system. The LLM is surrounded by parasitic signals that cost nothing per call but continuously shape its behavior toward discipline.
|
|
59
|
+
|
|
5
60
|
## 10.6.1 (2026-04-17) — Zero-any Discipline Milestone
|
|
6
61
|
|
|
7
62
|
Five bisectable commits eliminating every semantic `any` usage from first-party TypeScript code. Pure refactor — no behavior change, no new tests, no regressions.
|