@adhdev/daemon-core 0.9.82-rc.463 → 0.9.82-rc.464
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.
|
@@ -56,15 +56,16 @@ export interface PendingEventEmitHint {
|
|
|
56
56
|
* T6 (B3c) enforce switch. When ON, the drain path stops passing an unversioned
|
|
57
57
|
* (v1) or a validation-failing v2 event through to the coordinator — it QUARANTINES
|
|
58
58
|
* it instead (excluded from the delivered batch + WARN + counter), and unicast
|
|
59
|
-
* routing is the only delivery path (there is no v1 broadcast fallback).
|
|
60
|
-
* default
|
|
59
|
+
* routing is the only delivery path (there is no v1 broadcast fallback). On by
|
|
60
|
+
* default; set MESH_PROTOCOL_V2_ENFORCE=0/false/off/no to disable and restore the
|
|
61
|
+
* accept-and-warn rollout behaviour exactly.
|
|
61
62
|
*
|
|
62
|
-
* Per the rollout plan (§1 decision 4): enforce is `MESH_PROTOCOL_V2_ENFORCE` (env)
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* no data migration
|
|
67
|
-
* operator can toggle it without a restart.
|
|
63
|
+
* Per the rollout plan (§1 decision 4): enforce is `MESH_PROTOCOL_V2_ENFORCE` (env).
|
|
64
|
+
* Now that every node emits v2 (§배포 게이트 1 / risk §4), the code default is ON —
|
|
65
|
+
* a manual env injection is no longer required to get enforce behaviour. Rollback to
|
|
66
|
+
* accept mode is a pure-env step: set `MESH_PROTOCOL_V2_ENFORCE=0` (or `false`/`off`/
|
|
67
|
+
* `no`) — no code change, no data migration (the schema is additive). Read at call
|
|
68
|
+
* time so a test / operator can toggle it without a restart.
|
|
68
69
|
*
|
|
69
70
|
* Quarantine (not drop) keeps the loss-free invariant. The DESTRUCTIVE drain has
|
|
70
71
|
* already consumed the event from its store by the time routing runs, so "held
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhdev/daemon-core",
|
|
3
|
-
"version": "0.9.82-rc.
|
|
3
|
+
"version": "0.9.82-rc.464",
|
|
4
4
|
"description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"author": "vilmire",
|
|
48
48
|
"license": "AGPL-3.0-or-later",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@adhdev/mesh-shared": "0.9.82-rc.
|
|
51
|
-
"@adhdev/session-host-core": "0.9.82-rc.
|
|
50
|
+
"@adhdev/mesh-shared": "0.9.82-rc.464",
|
|
51
|
+
"@adhdev/session-host-core": "0.9.82-rc.464",
|
|
52
52
|
"@agentclientprotocol/sdk": "^0.16.1",
|
|
53
53
|
"ajv": "^8.20.0",
|
|
54
54
|
"ajv-formats": "^3.0.1",
|
|
@@ -138,15 +138,16 @@ function normalizeCoordinatorDaemonIds(
|
|
|
138
138
|
* T6 (B3c) enforce switch. When ON, the drain path stops passing an unversioned
|
|
139
139
|
* (v1) or a validation-failing v2 event through to the coordinator — it QUARANTINES
|
|
140
140
|
* it instead (excluded from the delivered batch + WARN + counter), and unicast
|
|
141
|
-
* routing is the only delivery path (there is no v1 broadcast fallback).
|
|
142
|
-
* default
|
|
141
|
+
* routing is the only delivery path (there is no v1 broadcast fallback). On by
|
|
142
|
+
* default; set MESH_PROTOCOL_V2_ENFORCE=0/false/off/no to disable and restore the
|
|
143
|
+
* accept-and-warn rollout behaviour exactly.
|
|
143
144
|
*
|
|
144
|
-
* Per the rollout plan (§1 decision 4): enforce is `MESH_PROTOCOL_V2_ENFORCE` (env)
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* no data migration
|
|
149
|
-
* operator can toggle it without a restart.
|
|
145
|
+
* Per the rollout plan (§1 decision 4): enforce is `MESH_PROTOCOL_V2_ENFORCE` (env).
|
|
146
|
+
* Now that every node emits v2 (§배포 게이트 1 / risk §4), the code default is ON —
|
|
147
|
+
* a manual env injection is no longer required to get enforce behaviour. Rollback to
|
|
148
|
+
* accept mode is a pure-env step: set `MESH_PROTOCOL_V2_ENFORCE=0` (or `false`/`off`/
|
|
149
|
+
* `no`) — no code change, no data migration (the schema is additive). Read at call
|
|
150
|
+
* time so a test / operator can toggle it without a restart.
|
|
150
151
|
*
|
|
151
152
|
* Quarantine (not drop) keeps the loss-free invariant. The DESTRUCTIVE drain has
|
|
152
153
|
* already consumed the event from its store by the time routing runs, so "held
|
|
@@ -159,9 +160,9 @@ function normalizeCoordinatorDaemonIds(
|
|
|
159
160
|
*/
|
|
160
161
|
export function isMeshProtocolV2EnforceEnabled(): boolean {
|
|
161
162
|
const raw = readNonEmptyString(process.env.MESH_PROTOCOL_V2_ENFORCE);
|
|
162
|
-
if (!raw) return
|
|
163
|
+
if (!raw) return true; // unset/blank = default ON
|
|
163
164
|
const v = raw.trim().toLowerCase();
|
|
164
|
-
return v === '
|
|
165
|
+
return !(v === '0' || v === 'false' || v === 'off' || v === 'no'); // only explicit off = false
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
/**
|
|
@@ -294,12 +294,13 @@ export function __resetMeshV2BackstopCountersForTests(): void {
|
|
|
294
294
|
|
|
295
295
|
/** Enforce switch mirror (see isMeshProtocolV2EnforceEnabled in mesh-events-pending);
|
|
296
296
|
* re-read here (not imported) to keep the reconcile loop free of a cross-file coupling
|
|
297
|
-
* and to read env at fire time.
|
|
297
|
+
* and to read env at fire time. On by default; set MESH_PROTOCOL_V2_ENFORCE=0/false/
|
|
298
|
+
* off/no to disable. Same vocabulary as the source of truth. */
|
|
298
299
|
function meshProtocolV2EnforceOn(): boolean {
|
|
299
300
|
const raw = process.env.MESH_PROTOCOL_V2_ENFORCE;
|
|
300
|
-
if (typeof raw !== 'string') return
|
|
301
|
+
if (typeof raw !== 'string' || !raw.trim()) return true; // unset/blank = default ON
|
|
301
302
|
const v = raw.trim().toLowerCase();
|
|
302
|
-
return v === '
|
|
303
|
+
return !(v === '0' || v === 'false' || v === 'off' || v === 'no');
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
/** Bump a backstop counter and, under enforce, WARN that a last-resort net fired —
|