@massu/core 1.16.2 → 1.16.3
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 +68 -0
- package/dist/cli.js +1089 -696
- package/dist/hooks/auto-learning-pipeline.js +401 -55
- package/dist/hooks/classify-failure.js +399 -53
- package/dist/hooks/cost-tracker.js +411 -65
- package/dist/hooks/fix-detector.js +410 -64
- package/dist/hooks/incident-pipeline.js +396 -50
- package/dist/hooks/intent-suggester.js +411 -65
- package/dist/hooks/memory-recall.js +415 -69
- package/dist/hooks/post-edit-context.js +413 -67
- package/dist/hooks/post-tool-use.js +439 -93
- package/dist/hooks/pre-compact.js +411 -65
- package/dist/hooks/pre-delete-check.js +415 -69
- package/dist/hooks/pre-tool-use-gate.js +415 -69
- package/dist/hooks/quality-event.js +411 -65
- package/dist/hooks/rule-enforcement-pipeline.js +397 -51
- package/dist/hooks/security-gate.js +411 -65
- package/dist/hooks/session-end.js +440 -94
- package/dist/hooks/session-start.js +532 -282
- package/dist/hooks/user-prompt.js +444 -98
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,74 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
10
10
|
> redistributed under the **Apache License 2.0**. Full license + NOTICE:
|
|
11
11
|
> `packages/core/assets/embedder/MODEL-LICENSE`.
|
|
12
12
|
|
|
13
|
+
## [1.16.3] - 2026-07-15
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **Cloud sync no longer silently discards large sessions, and the `cloud.requestTimeoutMs`
|
|
18
|
+
knob actually works** (`plan-2026-07-20-cloud-sync-timeout`, incident 2026-07-20). A
|
|
19
|
+
session with many observations produces a large `/sync` payload; a 423-observation
|
|
20
|
+
payload measured ~9.2 s against the live ingest, over the 8 s per-request timeout — and
|
|
21
|
+
the client does not retry a timeout, so every drain failed, re-queued, and grew the queue
|
|
22
|
+
until the retry-limit shredder permanently discarded payloads (83 `cloud_sync_giveup`
|
|
23
|
+
events, real session/observation copies lost). The documented `cloud.requestTimeoutMs`
|
|
24
|
+
remedy was itself unusable: the key was absent from `CloudConfigSchema` (zod strips
|
|
25
|
+
unknown keys, so it never reached the reader), and `cloud.enabled` used a zod
|
|
26
|
+
`.default(false)` that overrode the key-triggered auto-enable via object spread — so
|
|
27
|
+
merely declaring a `cloud:` block to tune the timeout silently turned sync **off**. The
|
|
28
|
+
default per-request timeout is raised 8 s → 15 s (inside the 20 s deadline),
|
|
29
|
+
`requestTimeoutMs` is now a real schema key (capped at the deadline), and `enabled` is
|
|
30
|
+
decided after the spread so an explicit `false` is still honoured. Drift-guard:
|
|
31
|
+
`cloud-config-knobs.test.ts` (mutation-verified).
|
|
32
|
+
- **Native SQLite engine now self-heals on a Node ABI mismatch, and `massu doctor` can no
|
|
33
|
+
longer lie about it** (`plan-massu-resilience-layer1`, incident 2026-07-12, CR-65).
|
|
34
|
+
`better-sqlite3` is a native module compiled for one Node ABI; installing under one Node
|
|
35
|
+
major and running under another made its binary `dlopen`-fail lazily inside the `Database`
|
|
36
|
+
constructor. Two defects fell out: (1) DB-touching commands died — on one build
|
|
37
|
+
`consolidate --dry-run --json` printed the raw `NODE_MODULE_VERSION` error and **exited 0**
|
|
38
|
+
(silently-dead memory); (2) `massu doctor` reported "better-sqlite3 loads correctly" because
|
|
39
|
+
it only imported the JS wrapper (the native load is lazy). Now every load routes through a
|
|
40
|
+
single SSOT loader that, on an ABI failure, **rebuilds the engine for the Node you are
|
|
41
|
+
actually running** (via `prebuild-install` → `node-gyp`, driven by `process.execPath`,
|
|
42
|
+
cross-process-locked), retries once, and otherwise fails LOUD with a structured error and a
|
|
43
|
+
one-command remedy — never swallowed, never exit 0. `massu doctor` now actually constructs a
|
|
44
|
+
DB and runs `SELECT 1` (sharing one probe with server startup), and a new **`massu heal`**
|
|
45
|
+
command (`massu heal --check` is non-mutating) rebuilds on demand. Hooks route through the
|
|
46
|
+
loader but never rebuild (5 s budget). Heal events are recorded to
|
|
47
|
+
`~/.massu/native-heal-events.jsonl`.
|
|
48
|
+
- **Config templates can no longer silently ship `verification.<lang>` commands that disagree
|
|
49
|
+
with the detection source-of-truth** (`plan-swift-ios-config-template-drift`, incident
|
|
50
|
+
2026-07-18, CR-66). `massu init` wrote a scaffolded config's per-language test/build/lint
|
|
51
|
+
command block from two independent places — the code map (`vr-command-map.ts:getVRCommands`)
|
|
52
|
+
and each language template's hand-copied YAML — with nothing binding them, so they drifted
|
|
53
|
+
(`go-chi` shipped a `gofmt` syntax step the map lacked and dropped `go build ./...`;
|
|
54
|
+
`rails`/`spring` added commands the map had no case for). `vr-command-map.ts` is now the single
|
|
55
|
+
authoring site: a filesystem-derived drift-guard asserts every template's block equals the map
|
|
56
|
+
(dir-normalized, null-stripped), every intentional divergence is recorded in one self-pruning
|
|
57
|
+
allowlist that must actually diverge, and a pattern-scanner check mirrors it — so a template
|
|
58
|
+
block that disagrees with the map, or a new template that drifts, fails the build. No shipped
|
|
59
|
+
`massu init` output changed (the agreeing templates are locked, not rewritten).
|
|
60
|
+
|
|
61
|
+
### Infrastructure
|
|
62
|
+
|
|
63
|
+
- Internal-only bookkeeping (no shipped `@massu/core` runtime change): SEC-1 license-signing key
|
|
64
|
+
rotation recorded as FULLY CLOSED — the leaked key was purged from git history (`git filter-repo
|
|
65
|
+
--replace-text`, force-pushed main + all tags, remote verified clean), the local private key
|
|
66
|
+
shredded, and only a future adoption-gated fingerprint-allowlist shrink remains. `.mcp.json` pin
|
|
67
|
+
bumped to `@massu/core@1.16.2`, and the memory-system roadmap adds WS0 (retro-on-discovery) as
|
|
68
|
+
STEP 0.
|
|
69
|
+
- Test-suite flake eliminated (test-only; no shipped code): 13 tests wrote scratch files under
|
|
70
|
+
`packages/core/src`, which intermittently raced the source-tree walkers under the coverage run
|
|
71
|
+
(ENOENT crash). All scratch moved to the OS temp dir, and a mutation-tested drift-guard now makes
|
|
72
|
+
writing scratch under `src` impossible to reintroduce.
|
|
73
|
+
- G-6 anti-vacuity registry (internal gate work; no shipped `@massu/core` runtime change),
|
|
74
|
+
`plan-2026-07-15-wave-1-g6-anti-vacuity-registry`: the meta-gate that proves every OTHER gate can
|
|
75
|
+
actually fail. Wave 1a covered the 108 shell fail-points; Wave 1b extends it to the full
|
|
76
|
+
structurally-discovered guard universe — an AST discoverer over every vitest/shell/eslint
|
|
77
|
+
enforcement guard, a completeness gate + validated `exempt` allowlist, and a per-kind real-tree
|
|
78
|
+
can-fail oracle. All 472 guard candidates are ruled (proven can-fail or cited-exempt); the P7b
|
|
79
|
+
harness mutation-tests the machinery itself; enforced in CI.
|
|
80
|
+
|
|
13
81
|
## [1.16.2] - 2026-07-15
|
|
14
82
|
|
|
15
83
|
### Security
|