instar 1.3.12 → 1.3.14
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/dist/feedback-factory/processor/cluster.d.ts +33 -0
- package/dist/feedback-factory/processor/cluster.d.ts.map +1 -0
- package/dist/feedback-factory/processor/cluster.js +120 -0
- package/dist/feedback-factory/processor/cluster.js.map +1 -0
- package/dist/feedback-factory/processor/types.d.ts +46 -0
- package/dist/feedback-factory/processor/types.d.ts.map +1 -0
- package/dist/feedback-factory/processor/types.js +10 -0
- package/dist/feedback-factory/processor/types.js.map +1 -0
- package/dist/scheduler/MentorOnboardingRunner.d.ts +19 -0
- package/dist/scheduler/MentorOnboardingRunner.d.ts.map +1 -1
- package/dist/scheduler/MentorOnboardingRunner.js +44 -1
- package/dist/scheduler/MentorOnboardingRunner.js.map +1 -1
- package/dist/scheduler/MentorOnboardingTick.d.ts +10 -0
- package/dist/scheduler/MentorOnboardingTick.d.ts.map +1 -1
- package/dist/scheduler/MentorOnboardingTick.js +8 -0
- package/dist/scheduler/MentorOnboardingTick.js.map +1 -1
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +32 -3
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +10 -10
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/scripts/feedback-factory/_py_clustering_ref.py +56 -0
- package/scripts/feedback-factory/clustering-corpus.json +17 -0
- package/scripts/feedback-factory/clustering-parity.mjs +71 -0
- package/src/data/builtin-manifest.json +47 -47
- package/upgrades/1.3.13.md +37 -0
- package/upgrades/1.3.14.md +26 -0
- package/upgrades/side-effects/feedback-factory-clustering.md +34 -0
- package/upgrades/side-effects/mentor-live-readiness.md +63 -0
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Parity reference: run the REAL cmd_cluster decision loop over a fixture.
|
|
3
|
+
|
|
4
|
+
Imports the reference processor without running its CLI main, then MONKEYPATCHES
|
|
5
|
+
its `run_prisma_query` so the two DB reads cmd_cluster does (unprocessed items,
|
|
6
|
+
then active clusters) return our fixture arrays instead of hitting a database.
|
|
7
|
+
cmd_cluster then runs its actual, unmodified decision loop and RETURNS the
|
|
8
|
+
results — which is exactly what the TS port must reproduce. cmd_cluster's own
|
|
9
|
+
stdout (FALSE-MERGE-GUARD logs + its json.dumps) is suppressed; we emit the
|
|
10
|
+
captured return value as clean JSON.
|
|
11
|
+
|
|
12
|
+
Usage: python3 _py_clustering_ref.py <processor_path> <fixture_path>
|
|
13
|
+
"""
|
|
14
|
+
import sys
|
|
15
|
+
import io
|
|
16
|
+
import json
|
|
17
|
+
import importlib.util
|
|
18
|
+
import contextlib
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def load_processor(path):
|
|
22
|
+
spec = importlib.util.spec_from_file_location("_feedback_processor_ref_cl", path)
|
|
23
|
+
mod = importlib.util.module_from_spec(spec)
|
|
24
|
+
spec.loader.exec_module(mod)
|
|
25
|
+
return mod
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def main():
|
|
29
|
+
if len(sys.argv) != 3:
|
|
30
|
+
print("usage: _py_clustering_ref.py <processor_path> <fixture_path>", file=sys.stderr)
|
|
31
|
+
sys.exit(2)
|
|
32
|
+
processor_path, fixture_path = sys.argv[1], sys.argv[2]
|
|
33
|
+
proc = load_processor(processor_path)
|
|
34
|
+
with open(fixture_path, encoding="utf-8") as f:
|
|
35
|
+
fixture = json.load(f)
|
|
36
|
+
|
|
37
|
+
# cmd_cluster calls run_prisma_query twice in order: items first, clusters second.
|
|
38
|
+
responses = [json.dumps(fixture["items"]), json.dumps(fixture["clusters"])]
|
|
39
|
+
call = {"n": 0}
|
|
40
|
+
|
|
41
|
+
def fake_query(*_args, **_kwargs):
|
|
42
|
+
i = call["n"]
|
|
43
|
+
call["n"] += 1
|
|
44
|
+
return responses[i] if i < len(responses) else "[]"
|
|
45
|
+
|
|
46
|
+
proc.run_prisma_query = fake_query
|
|
47
|
+
|
|
48
|
+
# Run the REAL loop; suppress cmd_cluster's stdout noise, capture its return.
|
|
49
|
+
with contextlib.redirect_stdout(io.StringIO()):
|
|
50
|
+
results = proc.cmd_cluster()
|
|
51
|
+
|
|
52
|
+
sys.stdout.write(json.dumps(results if results is not None else [], ensure_ascii=False))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
if __name__ == "__main__":
|
|
56
|
+
main()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Parity fixture for the clustering driver. `clusters` = pre-existing active clusters; `items` = unprocessed feedback processed in order. Exercises: create-new, merge into open cluster, the 0.55 fixed-cluster false-merge guard (score in [0.35,0.55) vs a fixed cluster → create), merge into fixed (regression note), merge into deferred (reopen note), order-dependence (a later item matching a cluster created for an earlier item), and slug generation. The Python ref runs the REAL cmd_cluster with its DB query monkeypatched to these arrays.",
|
|
3
|
+
"clusters": [
|
|
4
|
+
{ "clusterId": "cluster-existing-open", "title": "GitSync pull fails intermittently", "description": "the pull step times out under load", "type": "bug", "status": "investigating" },
|
|
5
|
+
{ "clusterId": "cluster-existing-fixed", "title": "auth token refresh broken", "description": "token refresh returns 401 after expiry", "type": "bug", "status": "fixed" },
|
|
6
|
+
{ "clusterId": "cluster-existing-deferred", "title": "dashboard pin rotation edge case", "description": "pin rotation skips on concurrent login", "type": "bug", "status": "deferred" }
|
|
7
|
+
],
|
|
8
|
+
"items": [
|
|
9
|
+
{ "feedbackId": "fb-1", "title": "GitSync pull fails intermittently", "description": "the pull step times out under load", "type": "bug" },
|
|
10
|
+
{ "feedbackId": "fb-2", "title": "completely different telemetry export bug", "description": "csv export drops the last row", "type": "bug" },
|
|
11
|
+
{ "feedbackId": "fb-3", "title": "telemetry export bug csv", "description": "the export drops the final row of data", "type": "bug" },
|
|
12
|
+
{ "feedbackId": "fb-4", "title": "auth token refresh broken", "description": "token refresh returns 401 after expiry", "type": "bug" },
|
|
13
|
+
{ "feedbackId": "fb-5", "title": "auth token refresh sometimes", "description": "occasional 401 seen again", "type": "bug" },
|
|
14
|
+
{ "feedbackId": "fb-6", "title": "dashboard pin rotation edge case", "description": "pin rotation skips on concurrent login", "type": "bug" },
|
|
15
|
+
{ "feedbackId": "fb-7", "title": "Brand New Issue: Weird Unicode café title", "description": "something about an emoji in the report", "type": "feature" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* clustering-parity.mjs — LOCAL parity gate for the clustering driver port.
|
|
4
|
+
*
|
|
5
|
+
* Runs the REAL reference cmd_cluster (DB monkeypatched to a fixture) and the TS
|
|
6
|
+
* clusterItems() over the same fixture, and asserts the per-item decisions match
|
|
7
|
+
* exactly: action (merge/create), clusterId, rounded similarity, and the merge
|
|
8
|
+
* note. LOCAL evidence gate, not CI (CI lacks the reference checkout).
|
|
9
|
+
*
|
|
10
|
+
* Exit 0 = parity; exit 1 = mismatch.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { spawnSync } from 'node:child_process';
|
|
14
|
+
import fs from 'node:fs';
|
|
15
|
+
import path from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const ROOT = path.resolve(__dirname, '..', '..');
|
|
20
|
+
|
|
21
|
+
const PROCESSOR = process.env.PORTAL_PROCESSOR
|
|
22
|
+
|| '/Users/justin/Documents/Projects/the-portal/.claude/scripts/feedback-processor.py';
|
|
23
|
+
const FIXTURE = path.join(__dirname, 'clustering-corpus.json');
|
|
24
|
+
const PY_REF = path.join(__dirname, '_py_clustering_ref.py');
|
|
25
|
+
|
|
26
|
+
if (!fs.existsSync(PROCESSOR)) {
|
|
27
|
+
console.error(`[cluster-parity] reference processor not found: ${PROCESSOR}`);
|
|
28
|
+
process.exit(2);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const py = spawnSync('python3', [PY_REF, PROCESSOR, FIXTURE], { encoding: 'utf8' });
|
|
32
|
+
if (py.status !== 0) {
|
|
33
|
+
console.error('[cluster-parity] python reference failed:\n', py.stderr || py.stdout);
|
|
34
|
+
process.exit(2);
|
|
35
|
+
}
|
|
36
|
+
const reference = JSON.parse(py.stdout);
|
|
37
|
+
|
|
38
|
+
const fixture = JSON.parse(fs.readFileSync(FIXTURE, 'utf8'));
|
|
39
|
+
const distUrl = new URL('file://' + path.join(ROOT, 'dist', 'feedback-factory', 'processor', 'cluster.js'));
|
|
40
|
+
const { clusterItems } = await import(distUrl.href);
|
|
41
|
+
const got = clusterItems(fixture.items, fixture.clusters);
|
|
42
|
+
|
|
43
|
+
let mismatches = 0;
|
|
44
|
+
const norm = (r) => JSON.stringify({
|
|
45
|
+
feedbackId: r.feedbackId, action: r.action, clusterId: r.clusterId,
|
|
46
|
+
similarity: r.similarity, note: r.note ?? null,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (got.length !== reference.length) {
|
|
50
|
+
console.error(`[cluster-parity] length mismatch: ts=${got.length} python=${reference.length}`);
|
|
51
|
+
mismatches++;
|
|
52
|
+
}
|
|
53
|
+
for (let i = 0; i < Math.max(got.length, reference.length); i++) {
|
|
54
|
+
const a = got[i] ? norm(got[i]) : '(missing)';
|
|
55
|
+
const b = reference[i] ? norm(reference[i]) : '(missing)';
|
|
56
|
+
if (a !== b) {
|
|
57
|
+
mismatches++;
|
|
58
|
+
console.error(`[MISMATCH #${i}]`);
|
|
59
|
+
console.error(` python: ${b}`);
|
|
60
|
+
console.error(` ts : ${a}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const total = reference.length;
|
|
65
|
+
if (mismatches === 0) {
|
|
66
|
+
console.error(`[cluster-parity] ✓ ${total}/${total} clustering decisions match the reference cmd_cluster.`);
|
|
67
|
+
process.exit(0);
|
|
68
|
+
} else {
|
|
69
|
+
console.error(`[cluster-parity] ✗ ${mismatches} mismatch(es) — the TS port diverges from the reference.`);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-27T06:14:27.030Z",
|
|
5
|
+
"instarVersion": "1.3.14",
|
|
6
6
|
"entryCount": 192,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
"type": "route-group",
|
|
402
402
|
"domain": "monitoring",
|
|
403
403
|
"sourcePath": "src/server/routes.ts",
|
|
404
|
-
"contentHash": "
|
|
404
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
405
405
|
"since": "2025-01-01"
|
|
406
406
|
},
|
|
407
407
|
"route-group:agents": {
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
"type": "route-group",
|
|
410
410
|
"domain": "sessions",
|
|
411
411
|
"sourcePath": "src/server/routes.ts",
|
|
412
|
-
"contentHash": "
|
|
412
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
413
413
|
"since": "2025-01-01"
|
|
414
414
|
},
|
|
415
415
|
"route-group:backups": {
|
|
@@ -417,7 +417,7 @@
|
|
|
417
417
|
"type": "route-group",
|
|
418
418
|
"domain": "operations",
|
|
419
419
|
"sourcePath": "src/server/routes.ts",
|
|
420
|
-
"contentHash": "
|
|
420
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
421
421
|
"since": "2025-01-01"
|
|
422
422
|
},
|
|
423
423
|
"route-group:git": {
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
"type": "route-group",
|
|
426
426
|
"domain": "coordination",
|
|
427
427
|
"sourcePath": "src/server/routes.ts",
|
|
428
|
-
"contentHash": "
|
|
428
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
429
429
|
"since": "2025-01-01"
|
|
430
430
|
},
|
|
431
431
|
"route-group:memory": {
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
"type": "route-group",
|
|
434
434
|
"domain": "memory",
|
|
435
435
|
"sourcePath": "src/server/routes.ts",
|
|
436
|
-
"contentHash": "
|
|
436
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
437
437
|
"since": "2025-01-01"
|
|
438
438
|
},
|
|
439
439
|
"route-group:semantic": {
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
"type": "route-group",
|
|
442
442
|
"domain": "memory",
|
|
443
443
|
"sourcePath": "src/server/routes.ts",
|
|
444
|
-
"contentHash": "
|
|
444
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
445
445
|
"since": "2025-01-01"
|
|
446
446
|
},
|
|
447
447
|
"route-group:status": {
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
"type": "route-group",
|
|
450
450
|
"domain": "monitoring",
|
|
451
451
|
"sourcePath": "src/server/routes.ts",
|
|
452
|
-
"contentHash": "
|
|
452
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
453
453
|
"since": "2025-01-01"
|
|
454
454
|
},
|
|
455
455
|
"route-group:capabilities": {
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
"type": "route-group",
|
|
458
458
|
"domain": "mapping",
|
|
459
459
|
"sourcePath": "src/server/routes.ts",
|
|
460
|
-
"contentHash": "
|
|
460
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
461
461
|
"since": "2025-01-01"
|
|
462
462
|
},
|
|
463
463
|
"route-group:project-map": {
|
|
@@ -465,7 +465,7 @@
|
|
|
465
465
|
"type": "route-group",
|
|
466
466
|
"domain": "mapping",
|
|
467
467
|
"sourcePath": "src/server/routes.ts",
|
|
468
|
-
"contentHash": "
|
|
468
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
469
469
|
"since": "2025-01-01"
|
|
470
470
|
},
|
|
471
471
|
"route-group:coherence": {
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
"type": "route-group",
|
|
474
474
|
"domain": "coherence",
|
|
475
475
|
"sourcePath": "src/server/routes.ts",
|
|
476
|
-
"contentHash": "
|
|
476
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
477
477
|
"since": "2025-01-01"
|
|
478
478
|
},
|
|
479
479
|
"route-group:topic-bindings": {
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
"type": "route-group",
|
|
482
482
|
"domain": "sessions",
|
|
483
483
|
"sourcePath": "src/server/routes.ts",
|
|
484
|
-
"contentHash": "
|
|
484
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
485
485
|
"since": "2025-01-01"
|
|
486
486
|
},
|
|
487
487
|
"route-group:context": {
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
"type": "route-group",
|
|
490
490
|
"domain": "context",
|
|
491
491
|
"sourcePath": "src/server/routes.ts",
|
|
492
|
-
"contentHash": "
|
|
492
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
493
493
|
"since": "2025-01-01"
|
|
494
494
|
},
|
|
495
495
|
"route-group:scope-coherence": {
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
"type": "route-group",
|
|
498
498
|
"domain": "coherence",
|
|
499
499
|
"sourcePath": "src/server/routes.ts",
|
|
500
|
-
"contentHash": "
|
|
500
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
501
501
|
"since": "2025-01-01"
|
|
502
502
|
},
|
|
503
503
|
"route-group:canonical-state": {
|
|
@@ -505,7 +505,7 @@
|
|
|
505
505
|
"type": "route-group",
|
|
506
506
|
"domain": "state",
|
|
507
507
|
"sourcePath": "src/server/routes.ts",
|
|
508
|
-
"contentHash": "
|
|
508
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
509
509
|
"since": "2025-01-01"
|
|
510
510
|
},
|
|
511
511
|
"route-group:ci": {
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
"type": "route-group",
|
|
514
514
|
"domain": "monitoring",
|
|
515
515
|
"sourcePath": "src/server/routes.ts",
|
|
516
|
-
"contentHash": "
|
|
516
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
517
517
|
"since": "2025-01-01"
|
|
518
518
|
},
|
|
519
519
|
"route-group:sessions": {
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
"type": "route-group",
|
|
522
522
|
"domain": "sessions",
|
|
523
523
|
"sourcePath": "src/server/routes.ts",
|
|
524
|
-
"contentHash": "
|
|
524
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
525
525
|
"since": "2025-01-01"
|
|
526
526
|
},
|
|
527
527
|
"route-group:jobs": {
|
|
@@ -529,7 +529,7 @@
|
|
|
529
529
|
"type": "route-group",
|
|
530
530
|
"domain": "scheduling",
|
|
531
531
|
"sourcePath": "src/server/routes.ts",
|
|
532
|
-
"contentHash": "
|
|
532
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
533
533
|
"since": "2025-01-01"
|
|
534
534
|
},
|
|
535
535
|
"route-group:skip-ledger": {
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
"type": "route-group",
|
|
538
538
|
"domain": "scheduling",
|
|
539
539
|
"sourcePath": "src/server/routes.ts",
|
|
540
|
-
"contentHash": "
|
|
540
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
541
541
|
"since": "2025-01-01"
|
|
542
542
|
},
|
|
543
543
|
"route-group:telegram": {
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
"type": "route-group",
|
|
546
546
|
"domain": "communication",
|
|
547
547
|
"sourcePath": "src/server/routes.ts",
|
|
548
|
-
"contentHash": "
|
|
548
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
549
549
|
"since": "2025-01-01"
|
|
550
550
|
},
|
|
551
551
|
"route-group:attention": {
|
|
@@ -553,7 +553,7 @@
|
|
|
553
553
|
"type": "route-group",
|
|
554
554
|
"domain": "communication",
|
|
555
555
|
"sourcePath": "src/server/routes.ts",
|
|
556
|
-
"contentHash": "
|
|
556
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
557
557
|
"since": "2025-01-01"
|
|
558
558
|
},
|
|
559
559
|
"route-group:relationships": {
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
"type": "route-group",
|
|
562
562
|
"domain": "relationships",
|
|
563
563
|
"sourcePath": "src/server/routes.ts",
|
|
564
|
-
"contentHash": "
|
|
564
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
565
565
|
"since": "2025-01-01"
|
|
566
566
|
},
|
|
567
567
|
"route-group:feedback": {
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
"type": "route-group",
|
|
570
570
|
"domain": "feedback",
|
|
571
571
|
"sourcePath": "src/server/routes.ts",
|
|
572
|
-
"contentHash": "
|
|
572
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
573
573
|
"since": "2025-01-01"
|
|
574
574
|
},
|
|
575
575
|
"route-group:updates": {
|
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
"type": "route-group",
|
|
578
578
|
"domain": "updates",
|
|
579
579
|
"sourcePath": "src/server/routes.ts",
|
|
580
|
-
"contentHash": "
|
|
580
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
581
581
|
"since": "2025-01-01"
|
|
582
582
|
},
|
|
583
583
|
"route-group:dispatches": {
|
|
@@ -585,7 +585,7 @@
|
|
|
585
585
|
"type": "route-group",
|
|
586
586
|
"domain": "dispatches",
|
|
587
587
|
"sourcePath": "src/server/routes.ts",
|
|
588
|
-
"contentHash": "
|
|
588
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
589
589
|
"since": "2025-01-01"
|
|
590
590
|
},
|
|
591
591
|
"route-group:quota": {
|
|
@@ -593,7 +593,7 @@
|
|
|
593
593
|
"type": "route-group",
|
|
594
594
|
"domain": "monitoring",
|
|
595
595
|
"sourcePath": "src/server/routes.ts",
|
|
596
|
-
"contentHash": "
|
|
596
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
597
597
|
"since": "2025-01-01"
|
|
598
598
|
},
|
|
599
599
|
"route-group:publishing": {
|
|
@@ -601,7 +601,7 @@
|
|
|
601
601
|
"type": "route-group",
|
|
602
602
|
"domain": "publishing",
|
|
603
603
|
"sourcePath": "src/server/routes.ts",
|
|
604
|
-
"contentHash": "
|
|
604
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
605
605
|
"since": "2025-01-01"
|
|
606
606
|
},
|
|
607
607
|
"route-group:private-views": {
|
|
@@ -609,7 +609,7 @@
|
|
|
609
609
|
"type": "route-group",
|
|
610
610
|
"domain": "publishing",
|
|
611
611
|
"sourcePath": "src/server/routes.ts",
|
|
612
|
-
"contentHash": "
|
|
612
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
613
613
|
"since": "2025-01-01"
|
|
614
614
|
},
|
|
615
615
|
"route-group:tunnel": {
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
"type": "route-group",
|
|
618
618
|
"domain": "networking",
|
|
619
619
|
"sourcePath": "src/server/routes.ts",
|
|
620
|
-
"contentHash": "
|
|
620
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
621
621
|
"since": "2025-01-01"
|
|
622
622
|
},
|
|
623
623
|
"route-group:events": {
|
|
@@ -625,7 +625,7 @@
|
|
|
625
625
|
"type": "route-group",
|
|
626
626
|
"domain": "networking",
|
|
627
627
|
"sourcePath": "src/server/routes.ts",
|
|
628
|
-
"contentHash": "
|
|
628
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
629
629
|
"since": "2025-01-01"
|
|
630
630
|
},
|
|
631
631
|
"route-group:evolution": {
|
|
@@ -633,7 +633,7 @@
|
|
|
633
633
|
"type": "route-group",
|
|
634
634
|
"domain": "evolution",
|
|
635
635
|
"sourcePath": "src/server/routes.ts",
|
|
636
|
-
"contentHash": "
|
|
636
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
637
637
|
"since": "2025-01-01"
|
|
638
638
|
},
|
|
639
639
|
"route-group:watchdog": {
|
|
@@ -641,7 +641,7 @@
|
|
|
641
641
|
"type": "route-group",
|
|
642
642
|
"domain": "monitoring",
|
|
643
643
|
"sourcePath": "src/server/routes.ts",
|
|
644
|
-
"contentHash": "
|
|
644
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
645
645
|
"since": "2025-01-01"
|
|
646
646
|
},
|
|
647
647
|
"route-group:topic-memory": {
|
|
@@ -649,7 +649,7 @@
|
|
|
649
649
|
"type": "route-group",
|
|
650
650
|
"domain": "memory",
|
|
651
651
|
"sourcePath": "src/server/routes.ts",
|
|
652
|
-
"contentHash": "
|
|
652
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
653
653
|
"since": "2025-01-01"
|
|
654
654
|
},
|
|
655
655
|
"route-group:state-sync": {
|
|
@@ -657,7 +657,7 @@
|
|
|
657
657
|
"type": "route-group",
|
|
658
658
|
"domain": "coordination",
|
|
659
659
|
"sourcePath": "src/server/routes.ts",
|
|
660
|
-
"contentHash": "
|
|
660
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
661
661
|
"since": "2025-01-01"
|
|
662
662
|
},
|
|
663
663
|
"route-group:intent": {
|
|
@@ -665,7 +665,7 @@
|
|
|
665
665
|
"type": "route-group",
|
|
666
666
|
"domain": "intent",
|
|
667
667
|
"sourcePath": "src/server/routes.ts",
|
|
668
|
-
"contentHash": "
|
|
668
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
669
669
|
"since": "2025-01-01"
|
|
670
670
|
},
|
|
671
671
|
"route-group:triage": {
|
|
@@ -673,7 +673,7 @@
|
|
|
673
673
|
"type": "route-group",
|
|
674
674
|
"domain": "safety",
|
|
675
675
|
"sourcePath": "src/server/routes.ts",
|
|
676
|
-
"contentHash": "
|
|
676
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
677
677
|
"since": "2025-01-01"
|
|
678
678
|
},
|
|
679
679
|
"route-group:operations": {
|
|
@@ -681,7 +681,7 @@
|
|
|
681
681
|
"type": "route-group",
|
|
682
682
|
"domain": "safety",
|
|
683
683
|
"sourcePath": "src/server/routes.ts",
|
|
684
|
-
"contentHash": "
|
|
684
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
685
685
|
"since": "2025-01-01"
|
|
686
686
|
},
|
|
687
687
|
"route-group:sentinel": {
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
"type": "route-group",
|
|
690
690
|
"domain": "safety",
|
|
691
691
|
"sourcePath": "src/server/routes.ts",
|
|
692
|
-
"contentHash": "
|
|
692
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
693
693
|
"since": "2025-01-01"
|
|
694
694
|
},
|
|
695
695
|
"route-group:trust": {
|
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
"type": "route-group",
|
|
698
698
|
"domain": "safety",
|
|
699
699
|
"sourcePath": "src/server/routes.ts",
|
|
700
|
-
"contentHash": "
|
|
700
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
701
701
|
"since": "2025-01-01"
|
|
702
702
|
},
|
|
703
703
|
"route-group:monitoring": {
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
"type": "route-group",
|
|
706
706
|
"domain": "monitoring",
|
|
707
707
|
"sourcePath": "src/server/routes.ts",
|
|
708
|
-
"contentHash": "
|
|
708
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
709
709
|
"since": "2025-01-01"
|
|
710
710
|
},
|
|
711
711
|
"route-group:commitments": {
|
|
@@ -713,7 +713,7 @@
|
|
|
713
713
|
"type": "route-group",
|
|
714
714
|
"domain": "commitments",
|
|
715
715
|
"sourcePath": "src/server/routes.ts",
|
|
716
|
-
"contentHash": "
|
|
716
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
717
717
|
"since": "2025-01-01"
|
|
718
718
|
},
|
|
719
719
|
"route-group:episodes": {
|
|
@@ -721,7 +721,7 @@
|
|
|
721
721
|
"type": "route-group",
|
|
722
722
|
"domain": "memory",
|
|
723
723
|
"sourcePath": "src/server/routes.ts",
|
|
724
|
-
"contentHash": "
|
|
724
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
725
725
|
"since": "2025-01-01"
|
|
726
726
|
},
|
|
727
727
|
"route-group:messages": {
|
|
@@ -729,7 +729,7 @@
|
|
|
729
729
|
"type": "route-group",
|
|
730
730
|
"domain": "coordination",
|
|
731
731
|
"sourcePath": "src/server/routes.ts",
|
|
732
|
-
"contentHash": "
|
|
732
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
733
733
|
"since": "2025-01-01"
|
|
734
734
|
},
|
|
735
735
|
"route-group:system-reviews": {
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
"type": "route-group",
|
|
738
738
|
"domain": "monitoring",
|
|
739
739
|
"sourcePath": "src/server/routes.ts",
|
|
740
|
-
"contentHash": "
|
|
740
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
741
741
|
"since": "2025-01-01"
|
|
742
742
|
},
|
|
743
743
|
"route-group:machine-mesh": {
|
|
@@ -753,7 +753,7 @@
|
|
|
753
753
|
"type": "route-group",
|
|
754
754
|
"domain": "security",
|
|
755
755
|
"sourcePath": "src/server/routes.ts",
|
|
756
|
-
"contentHash": "
|
|
756
|
+
"contentHash": "e866bbf04ea3077fceeb8cc7b6860d869579d002da7a06889f4a6781ee149a79",
|
|
757
757
|
"since": "2025-01-01"
|
|
758
758
|
},
|
|
759
759
|
"cli:init": {
|
|
@@ -1449,7 +1449,7 @@
|
|
|
1449
1449
|
"type": "subsystem",
|
|
1450
1450
|
"domain": "server",
|
|
1451
1451
|
"sourcePath": "src/server/AgentServer.ts",
|
|
1452
|
-
"contentHash": "
|
|
1452
|
+
"contentHash": "75aaa59ade72e28362b53041b5e0e90958740f8d15174381d52f7ff97cd5561e",
|
|
1453
1453
|
"since": "2025-01-01"
|
|
1454
1454
|
},
|
|
1455
1455
|
"subsystem:session-manager": {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Instar Upgrade Guide — NEXT
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
**Framework-Onboarding Mentor System — live-readiness hardening.** Closes the three things the
|
|
8
|
+
§19.4 reviewer flagged as must-haves before the mentor can ever be promoted to `live`: the tick is
|
|
9
|
+
now fire-and-forget (a slow helper-spawn can't hang the request — the result lands in
|
|
10
|
+
`/mentor/status`); the helper-spawn now kills its session and bails cleanly if it overruns (no
|
|
11
|
+
orphaned panes, no half-read transcripts); and `live` mode now has a real, safe delivery path — it
|
|
12
|
+
appends the message to a durable per-mentee outbox the mentee's running session picks up, instead of
|
|
13
|
+
spawning a fresh counterpart session (the structural fix for the agent-to-agent message loop). Still
|
|
14
|
+
dormant by default.
|
|
15
|
+
|
|
16
|
+
## What to Tell Your User
|
|
17
|
+
|
|
18
|
+
- The mentor's plumbing is now safe to switch on without it hanging or leaking sessions, and when it
|
|
19
|
+
eventually talks to the mentee it does so the calm way (drop a note in their inbox, no spawning).
|
|
20
|
+
- Nothing's changed day-to-day; it's still off until you turn it on, and turning it fully live is
|
|
21
|
+
still gated behind your sign-off.
|
|
22
|
+
|
|
23
|
+
## Summary of New Capabilities
|
|
24
|
+
|
|
25
|
+
| Capability | How to Use |
|
|
26
|
+
|-----------|-----------|
|
|
27
|
+
| Async mentor tick | `POST /mentor/tick` returns 202; outcome in `GET /mentor/status`.lastResult |
|
|
28
|
+
| Persist-only delivery | live mode appends to `server-data/mentor-outbox/<framework>.jsonl` (never spawns) |
|
|
29
|
+
|
|
30
|
+
## Evidence
|
|
31
|
+
|
|
32
|
+
Net-new hardening of a dormant feature, not a bug fix — no prior production failure. Proven by tests:
|
|
33
|
+
the delivery path is asserted to fire **only in live mode and never in dry-run** (and to no-op safely
|
|
34
|
+
when unwired); the async tick is asserted to return 202 with the result landing in `status.lastResult`
|
|
35
|
+
and the in-flight guard preventing overlap; the spawn-kill-on-timeout path throws after killing the
|
|
36
|
+
session so the tick captures a clean failure rather than a partial transcript. 27 mentor tests +
|
|
37
|
+
route-completeness/discoverability gates; affected push-config suite green (745) vs canonical main.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
Fourth increment of the **Feedback Factory Migration** (Dawn → Echo; spec `docs/specs/feedback-factory-migration.md`, approved). Ports the **clustering driver** — the decision loop of `cmd_cluster` — from the reference Python (`the-portal/.claude/scripts/feedback-processor.py`) to TypeScript at `src/feedback-factory/processor/cluster.ts` (`clusterItems`), plus shared types in `src/feedback-factory/processor/types.ts`.
|
|
8
|
+
|
|
9
|
+
This is the orchestration that ties the brain together: for each incoming report it picks the most-similar existing cluster (via the already-ported Jaccard matcher) and either merges into it or creates a new one — applying the higher 0.55 similarity bar before merging into an already-fixed cluster (the false-merge guard), and flagging possible regressions/reopens. Pure functions; **not wired into any route or job yet** — no behavioral change.
|
|
10
|
+
|
|
11
|
+
## What to Tell Your User
|
|
12
|
+
|
|
13
|
+
- The part of the feedback brain that actually groups reports into "this is one bug" piles is now ported — including the safety rule that makes it harder to wrongly lump a new report onto an already-fixed bug.
|
|
14
|
+
- Proven against Dawn's original the strongest way yet: I fed the same reports through her real grouping code and my rewrite and got identical grouping decisions, 7 for 7.
|
|
15
|
+
|
|
16
|
+
## Summary of New Capabilities
|
|
17
|
+
|
|
18
|
+
| Capability | How to Use |
|
|
19
|
+
|-----------|-----------|
|
|
20
|
+
| Clustering driver (TS port) | Internal module `src/feedback-factory/processor/cluster.ts` — not yet wired |
|
|
21
|
+
| Clustering parity harness | `node scripts/feedback-factory/clustering-parity.mjs` (local; set `PORTAL_PROCESSOR`) |
|
|
22
|
+
|
|
23
|
+
## Evidence
|
|
24
|
+
|
|
25
|
+
- **Parity vs the REAL `cmd_cluster`:** the harness monkeypatches the reference's database query to feed a fixture (existing clusters + incoming items) and runs cmd_cluster's actual, unmodified decision loop, capturing its results — then compares to the TS port. Result: **7/7 identical** decisions (merge vs create, which cluster, rounded similarity, and the regression/reopen note). The fixture exercises create, merge-into-open, the 0.55 false-merge guard, merge-into-fixed (regression), merge-into-deferred (reopen), and order-dependence (a later report matching a cluster created moments earlier in the same batch).
|
|
26
|
+
- **CI anchors:** unit tests assert each of those behaviors plus the Python-style half-to-even rounding, so a regression fails in CI even without the reference checkout.
|