@githolon/dsl 0.119.9 → 0.119.11
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/dart/CHANGELOG.md +4 -0
- package/dart/lib/src/reception/workspace_preparation_report.dart +50 -41
- package/dart/lib/src/runner/node-entry.mjs +2 -2
- package/dart/pubspec.yaml +1 -1
- package/dart/test/workspace_preparation_upkeep_test.dart +40 -6
- package/package.json +2 -2
- package/src/compile_package_main.ts +2 -2
package/dart/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.70.11
|
|
2
|
+
|
|
3
|
+
- A pack tidy that fails after a sync no longer shows the application as still preparing: the read index a sync owes is reported under its own read cause, and a SYNC report is custody upkeep alone (CAP-952).
|
|
4
|
+
|
|
1
5
|
## 0.70.10
|
|
2
6
|
|
|
3
7
|
Deliver the shared runtime's owned, bounded pack import continuations and cancellation with the matching kernel protocol, preventing concurrent workspace acquisition from dropping an active import.
|
|
@@ -55,47 +55,56 @@ final class WorkspacePreparationReport {
|
|
|
55
55
|
WorkspacePreparationReport? previous,
|
|
56
56
|
}) {
|
|
57
57
|
final kernel = progress.hasKernel() ? progress.kernel : null;
|
|
58
|
-
final retry =
|
|
59
|
-
|
|
58
|
+
final retry = progress.hasRetryAfterMillis()
|
|
59
|
+
? progress.retryAfterMillis
|
|
60
|
+
: null;
|
|
60
61
|
final step = progress.satisfiedByRead
|
|
61
62
|
? WorkspacePreparationStep.complete
|
|
62
63
|
: kernel == null
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
|
|
64
|
+
? switch (progress.cause) {
|
|
65
|
+
protocol
|
|
66
|
+
.ReadMaintenanceCause
|
|
67
|
+
.READ_MAINTENANCE_CAUSE_DOMAIN_PREPARATION =>
|
|
68
|
+
WorkspacePreparationStep.preparingWrites,
|
|
69
|
+
protocol.ReadMaintenanceCause.READ_MAINTENANCE_CAUSE_OPEN ||
|
|
70
|
+
protocol.ReadMaintenanceCause.READ_MAINTENANCE_CAUSE_READ_DEBT ||
|
|
71
|
+
protocol.ReadMaintenanceCause.READ_MAINTENANCE_CAUSE_RESIDENCY =>
|
|
72
|
+
WorkspacePreparationStep.preparingReads,
|
|
73
|
+
_ => WorkspacePreparationStep.preparingWorkspace,
|
|
74
|
+
}
|
|
75
|
+
: switch (kernel.phase) {
|
|
76
|
+
protocol.MaintenancePhase.MAINTENANCE_PHASE_READ_DOCUMENTS ||
|
|
77
|
+
protocol.MaintenancePhase.MAINTENANCE_PHASE_SQLITE_INDEX ||
|
|
78
|
+
protocol.MaintenancePhase.MAINTENANCE_PHASE_READ_INDEX_CACHE =>
|
|
79
|
+
WorkspacePreparationStep.preparingReads,
|
|
80
|
+
protocol.MaintenancePhase.MAINTENANCE_PHASE_COMMAND_FRONTIER ||
|
|
81
|
+
protocol.MaintenancePhase.MAINTENANCE_PHASE_COMMAND_ROUTE =>
|
|
82
|
+
WorkspacePreparationStep.preparingWrites,
|
|
83
|
+
protocol.MaintenancePhase.MAINTENANCE_PHASE_GIT_CUSTODY =>
|
|
84
|
+
WorkspacePreparationStep.preparingCustody,
|
|
85
|
+
protocol.MaintenancePhase.MAINTENANCE_PHASE_COMPLETE =>
|
|
86
|
+
WorkspacePreparationStep.complete,
|
|
87
|
+
_ => WorkspacePreparationStep.preparingWorkspace,
|
|
88
|
+
};
|
|
89
|
+
// Packing Git custody after writes or after a sync, or upkeep merely scheduled because
|
|
90
|
+
// commits were admitted or received, never holds a read or a write: the workspace is ready
|
|
91
|
+
// meanwhile. The read index a sync owes is reported under its own read cause, so a report
|
|
92
|
+
// carrying the SYNC cause is custody upkeep alone. Without SYNC here, one failed pack tidy
|
|
93
|
+
// after a sync showed the whole application as "still preparing" for its back-off (up to
|
|
94
|
+
// 30 minutes) while every workspace was up to date (prod web, 13 Oct 2026).
|
|
95
|
+
final upkeep =
|
|
96
|
+
step == WorkspacePreparationStep.preparingCustody ||
|
|
92
97
|
(kernel == null &&
|
|
93
|
-
progress.cause ==
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
(progress.cause ==
|
|
99
|
+
protocol
|
|
100
|
+
.ReadMaintenanceCause
|
|
101
|
+
.READ_MAINTENANCE_CAUSE_ADMITTED_OFFER ||
|
|
102
|
+
progress.cause ==
|
|
103
|
+
protocol.ReadMaintenanceCause.READ_MAINTENANCE_CAUSE_SYNC));
|
|
96
104
|
return WorkspacePreparationReport(
|
|
97
105
|
step: step,
|
|
98
|
-
active:
|
|
106
|
+
active:
|
|
107
|
+
retry == null &&
|
|
99
108
|
!upkeep &&
|
|
100
109
|
!progress.stopped &&
|
|
101
110
|
!progress.satisfiedByRead &&
|
|
@@ -108,18 +117,18 @@ final class WorkspacePreparationReport {
|
|
|
108
117
|
gitFrontier: kernel == null
|
|
109
118
|
? null
|
|
110
119
|
: kernel.hasGitFrontier()
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
? kernel.gitFrontier
|
|
121
|
+
: previous?.gitFrontier,
|
|
113
122
|
readFrontier: kernel == null
|
|
114
123
|
? null
|
|
115
124
|
: kernel.hasReadFrontier()
|
|
116
|
-
|
|
117
|
-
|
|
125
|
+
? kernel.readFrontier
|
|
126
|
+
: previous?.readFrontier,
|
|
118
127
|
sqliteFrontier: kernel == null
|
|
119
128
|
? null
|
|
120
129
|
: kernel.hasSqliteFrontier()
|
|
121
|
-
|
|
122
|
-
|
|
130
|
+
? kernel.sqliteFrontier
|
|
131
|
+
: previous?.sqliteFrontier,
|
|
123
132
|
);
|
|
124
133
|
}
|
|
125
134
|
|
|
@@ -23834,7 +23834,7 @@ var ReadMaintenanceDesk = class {
|
|
|
23834
23834
|
const failures = demand.failures + 1;
|
|
23835
23835
|
this.#pending.delete(workspace);
|
|
23836
23836
|
const retryMillis = Math.min(30 * 60 * 1e3, 1e3 * 2 ** Math.min(failures - 1, 10));
|
|
23837
|
-
slowQuantumObserver
|
|
23837
|
+
(slowQuantumObserver ?? ((line) => console.warn(line)))(`[nomos-kernel-perf] ${JSON.stringify({
|
|
23838
23838
|
op: "peer_maintenance_failure",
|
|
23839
23839
|
failed: true,
|
|
23840
23840
|
workspace,
|
|
@@ -25893,7 +25893,7 @@ function delayUntilDue(follow, nowUnixMillis) {
|
|
|
25893
25893
|
|
|
25894
25894
|
// ../src/runtime/runtime_identity.ts
|
|
25895
25895
|
init_define_NOMOS_KERNEL_RELEASE();
|
|
25896
|
-
var PEER_RUNTIME_IDENTITY = "0.119.
|
|
25896
|
+
var PEER_RUNTIME_IDENTITY = "0.119.11" ? `@githolon/runtime@${"0.119.11"}` : "@githolon/runtime@unbundled";
|
|
25897
25897
|
|
|
25898
25898
|
// ../src/runtime/replica_follow_desk.ts
|
|
25899
25899
|
init_define_NOMOS_KERNEL_RELEASE();
|
package/dart/pubspec.yaml
CHANGED
|
@@ -7,7 +7,7 @@ repository: https://github.com/Captain-App/nomos2
|
|
|
7
7
|
description: >-
|
|
8
8
|
Nomos 2 Dart client — generated domain values, intent payloads and application
|
|
9
9
|
lifecycle types over the typed Nomos kernel protocol and USDA custody model.
|
|
10
|
-
version: 0.70.
|
|
10
|
+
version: 0.70.11
|
|
11
11
|
|
|
12
12
|
environment:
|
|
13
13
|
sdk: ^3.5.0
|
|
@@ -37,12 +37,14 @@ void main() {
|
|
|
37
37
|
),
|
|
38
38
|
),
|
|
39
39
|
);
|
|
40
|
-
expect(
|
|
41
|
-
|
|
40
|
+
expect(
|
|
41
|
+
reads.active,
|
|
42
|
+
isTrue,
|
|
43
|
+
reason: 'a read index still being built is real preparation',
|
|
44
|
+
);
|
|
42
45
|
});
|
|
43
46
|
|
|
44
|
-
test('upkeep backing off after a failure is not a sync problem (CAP-693)',
|
|
45
|
-
() {
|
|
47
|
+
test('upkeep backing off after a failure is not a sync problem (CAP-693)', () {
|
|
46
48
|
// A shallow device's Git upkeep was refused by the kernel; the status turned orange though
|
|
47
49
|
// every read and write still worked.
|
|
48
50
|
final failingUpkeep = WorkspacePreparationReport.fromMaintenance(
|
|
@@ -63,7 +65,39 @@ void main() {
|
|
|
63
65
|
retryAfterMillis: 4000,
|
|
64
66
|
),
|
|
65
67
|
);
|
|
66
|
-
expect(
|
|
67
|
-
|
|
68
|
+
expect(
|
|
69
|
+
failingReads.retrying,
|
|
70
|
+
isTrue,
|
|
71
|
+
reason: 'preparation a read waits on still shows',
|
|
72
|
+
);
|
|
68
73
|
});
|
|
74
|
+
|
|
75
|
+
test(
|
|
76
|
+
'a pack tidy that fails after a sync is upkeep backing off, not a sync problem (CAP-952)',
|
|
77
|
+
() {
|
|
78
|
+
// Prod web, 13 Oct 2026: the kernel refused a repack after an incoming sync ("repack header
|
|
79
|
+
// …: object could not be found"). The sync icon stayed amber on "Still preparing" for the
|
|
80
|
+
// back-off while all 34 workspaces were up to date.
|
|
81
|
+
final failingAfterSync = WorkspacePreparationReport.fromMaintenance(
|
|
82
|
+
protocol.ReadMaintenanceProgress(
|
|
83
|
+
workspace: 'estate',
|
|
84
|
+
cause: protocol.ReadMaintenanceCause.READ_MAINTENANCE_CAUSE_SYNC,
|
|
85
|
+
retryAfterMillis: 1800000,
|
|
86
|
+
),
|
|
87
|
+
);
|
|
88
|
+
expect(failingAfterSync.retrying, isFalse);
|
|
89
|
+
expect(failingAfterSync.upkeepRetrying, isTrue);
|
|
90
|
+
expect(failingAfterSync.active, isFalse);
|
|
91
|
+
|
|
92
|
+
// The read index a sync owes travels under its own read cause and still counts.
|
|
93
|
+
final indexAfterSync = WorkspacePreparationReport.fromMaintenance(
|
|
94
|
+
protocol.ReadMaintenanceProgress(
|
|
95
|
+
workspace: 'estate',
|
|
96
|
+
cause: protocol.ReadMaintenanceCause.READ_MAINTENANCE_CAUSE_RESIDENCY,
|
|
97
|
+
retryAfterMillis: 1000,
|
|
98
|
+
),
|
|
99
|
+
);
|
|
100
|
+
expect(indexAfterSync.retrying, isTrue);
|
|
101
|
+
},
|
|
102
|
+
);
|
|
69
103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@githolon/dsl",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"test": "vitest run"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@githolon/runtime": "^0.119.
|
|
85
|
+
"@githolon/runtime": "^0.119.11",
|
|
86
86
|
"@bufbuild/protobuf": "^2.13.0",
|
|
87
87
|
"@bufbuild/protoc-gen-es": "^2.13.0",
|
|
88
88
|
"esbuild": "0.24.2",
|
|
@@ -2591,8 +2591,8 @@ const NOMOS_TYPES_DEP = "^0.15.2";
|
|
|
2591
2591
|
// 0.48.x: session-bound clients (XClient.bind/NomosClientInterface/DomainClientSessionMismatch/
|
|
2592
2592
|
// DomainNotInstalledForSession, engine.follow, pendingConflicts lanes) — the generated client
|
|
2593
2593
|
// REQUIRES this surface. 0.48.1 fixes NomosSession.watchPendingConflicts delegation.
|
|
2594
|
-
const NOMOS_CLIENT_DEP = "^0.70.
|
|
2595
|
-
const NOMOS_FLUTTER_DEP = "^0.69.
|
|
2594
|
+
const NOMOS_CLIENT_DEP = "^0.70.11";
|
|
2595
|
+
const NOMOS_FLUTTER_DEP = "^0.69.1";
|
|
2596
2596
|
// DRIFT TRIPWIRE: pubspec_pins.test.ts asserts these equal the CURRENT versions in the Dart and Flutter
|
|
2597
2597
|
// package pubspecs — a release without this bump fails the suite, so tenants never
|
|
2598
2598
|
// land back in dependency_overrides (the exact co2 report this closes, third occurrence).
|