@paraharness/sqlite 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +64 -2
- package/dist/builders/compaction-config-builder.d.ts +66 -0
- package/dist/builders/compaction-config-builder.d.ts.map +1 -0
- package/dist/builders/compaction-config-builder.js +2 -0
- package/dist/builders/compaction-config-builder.js.map +1 -0
- package/dist/builders/create-compaction-config-builder.d.ts +14 -0
- package/dist/builders/create-compaction-config-builder.d.ts.map +1 -0
- package/dist/builders/create-compaction-config-builder.js +66 -0
- package/dist/builders/create-compaction-config-builder.js.map +1 -0
- package/dist/builders/create-sqlite-global-rules-builder.d.ts +15 -0
- package/dist/builders/create-sqlite-global-rules-builder.d.ts.map +1 -0
- package/dist/builders/create-sqlite-global-rules-builder.js +30 -0
- package/dist/builders/create-sqlite-global-rules-builder.js.map +1 -0
- package/dist/builders/create-sqlite-ledger-builder.d.ts +15 -0
- package/dist/builders/create-sqlite-ledger-builder.d.ts.map +1 -0
- package/dist/builders/create-sqlite-ledger-builder.js +31 -0
- package/dist/builders/create-sqlite-ledger-builder.js.map +1 -0
- package/dist/builders/create-sqlite-lessons-builder.d.ts +12 -0
- package/dist/builders/create-sqlite-lessons-builder.d.ts.map +1 -0
- package/dist/builders/create-sqlite-lessons-builder.js +23 -0
- package/dist/builders/create-sqlite-lessons-builder.js.map +1 -0
- package/dist/builders/create-sqlite-topology-builder.d.ts +12 -0
- package/dist/builders/create-sqlite-topology-builder.d.ts.map +1 -0
- package/dist/builders/create-sqlite-topology-builder.js +23 -0
- package/dist/builders/create-sqlite-topology-builder.js.map +1 -0
- package/dist/builders/internal/compaction-config-builder-state.d.ts +16 -0
- package/dist/builders/internal/compaction-config-builder-state.d.ts.map +1 -0
- package/dist/builders/internal/compaction-config-builder-state.js +2 -0
- package/dist/builders/internal/compaction-config-builder-state.js.map +1 -0
- package/dist/builders/sqlite-global-rules-builder.d.ts +17 -0
- package/dist/builders/sqlite-global-rules-builder.d.ts.map +1 -0
- package/dist/builders/sqlite-global-rules-builder.js +2 -0
- package/dist/builders/sqlite-global-rules-builder.js.map +1 -0
- package/dist/builders/sqlite-ledger-builder.d.ts +21 -0
- package/dist/builders/sqlite-ledger-builder.d.ts.map +1 -0
- package/dist/builders/sqlite-ledger-builder.js +2 -0
- package/dist/builders/sqlite-ledger-builder.js.map +1 -0
- package/dist/builders/sqlite-lessons-builder.d.ts +18 -0
- package/dist/builders/sqlite-lessons-builder.d.ts.map +1 -0
- package/dist/builders/sqlite-lessons-builder.js +2 -0
- package/dist/builders/sqlite-lessons-builder.js.map +1 -0
- package/dist/builders/sqlite-namespace-contract.d.ts +64 -0
- package/dist/builders/sqlite-namespace-contract.d.ts.map +1 -0
- package/dist/builders/sqlite-namespace-contract.js +2 -0
- package/dist/builders/sqlite-namespace-contract.js.map +1 -0
- package/dist/builders/sqlite-namespace.d.ts +9 -0
- package/dist/builders/sqlite-namespace.d.ts.map +1 -0
- package/dist/builders/sqlite-namespace.js +17 -0
- package/dist/builders/sqlite-namespace.js.map +1 -0
- package/dist/builders/sqlite-topology-builder.d.ts +18 -0
- package/dist/builders/sqlite-topology-builder.d.ts.map +1 -0
- package/dist/builders/sqlite-topology-builder.js +2 -0
- package/dist/builders/sqlite-topology-builder.js.map +1 -0
- package/dist/ddl/internal/open-sqlite-connection.d.ts +24 -0
- package/dist/ddl/internal/open-sqlite-connection.d.ts.map +1 -0
- package/dist/ddl/internal/open-sqlite-connection.js +65 -0
- package/dist/ddl/internal/open-sqlite-connection.js.map +1 -0
- package/dist/ddl/sqlite-schema.constants.d.ts +21 -0
- package/dist/ddl/sqlite-schema.constants.d.ts.map +1 -0
- package/dist/ddl/sqlite-schema.constants.js +134 -0
- package/dist/ddl/sqlite-schema.constants.js.map +1 -0
- package/dist/executors/create-sqlite-executors.d.ts +11 -0
- package/dist/executors/create-sqlite-executors.d.ts.map +1 -0
- package/dist/executors/create-sqlite-executors.js +38 -0
- package/dist/executors/create-sqlite-executors.js.map +1 -0
- package/dist/executors/sqlite-executors.constants.d.ts +9 -0
- package/dist/executors/sqlite-executors.constants.d.ts.map +1 -0
- package/dist/executors/sqlite-executors.constants.js +9 -0
- package/dist/executors/sqlite-executors.constants.js.map +1 -0
- package/dist/executors/sqlite-rules-source-executor.d.ts +15 -0
- package/dist/executors/sqlite-rules-source-executor.d.ts.map +1 -0
- package/dist/executors/sqlite-rules-source-executor.js +47 -0
- package/dist/executors/sqlite-rules-source-executor.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/stores/internal/admit-lesson-params.d.ts +16 -0
- package/dist/stores/internal/admit-lesson-params.d.ts.map +1 -0
- package/dist/stores/internal/admit-lesson-params.js +2 -0
- package/dist/stores/internal/admit-lesson-params.js.map +1 -0
- package/dist/stores/internal/compute-normalized-relevance.d.ts +47 -0
- package/dist/stores/internal/compute-normalized-relevance.d.ts.map +1 -0
- package/dist/stores/internal/compute-normalized-relevance.js +63 -0
- package/dist/stores/internal/compute-normalized-relevance.js.map +1 -0
- package/dist/stores/internal/mark-frame-tombstone-params.d.ts +16 -0
- package/dist/stores/internal/mark-frame-tombstone-params.d.ts.map +1 -0
- package/dist/stores/internal/mark-frame-tombstone-params.js +2 -0
- package/dist/stores/internal/mark-frame-tombstone-params.js.map +1 -0
- package/dist/stores/internal/record-terminal-receipt-params.d.ts +16 -0
- package/dist/stores/internal/record-terminal-receipt-params.d.ts.map +1 -0
- package/dist/stores/internal/record-terminal-receipt-params.js +2 -0
- package/dist/stores/internal/record-terminal-receipt-params.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-compaction-ops.d.ts +14 -0
- package/dist/stores/internal/sqlite-ledger-compaction-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-compaction-ops.js +29 -0
- package/dist/stores/internal/sqlite-ledger-compaction-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-fork-operations.d.ts +33 -0
- package/dist/stores/internal/sqlite-ledger-fork-operations.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-fork-operations.js +44 -0
- package/dist/stores/internal/sqlite-ledger-fork-operations.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-frame-operations.d.ts +24 -0
- package/dist/stores/internal/sqlite-ledger-frame-operations.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-frame-operations.js +40 -0
- package/dist/stores/internal/sqlite-ledger-frame-operations.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-frame-ops.d.ts +50 -0
- package/dist/stores/internal/sqlite-ledger-frame-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-frame-ops.js +90 -0
- package/dist/stores/internal/sqlite-ledger-frame-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-plan-and-fork-ops.d.ts +59 -0
- package/dist/stores/internal/sqlite-ledger-plan-and-fork-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-plan-and-fork-ops.js +90 -0
- package/dist/stores/internal/sqlite-ledger-plan-and-fork-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-plan-operations.d.ts +40 -0
- package/dist/stores/internal/sqlite-ledger-plan-operations.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-plan-operations.js +39 -0
- package/dist/stores/internal/sqlite-ledger-plan-operations.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-run-operations.d.ts +41 -0
- package/dist/stores/internal/sqlite-ledger-run-operations.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-run-operations.js +89 -0
- package/dist/stores/internal/sqlite-ledger-run-operations.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-run-ops.d.ts +58 -0
- package/dist/stores/internal/sqlite-ledger-run-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-run-ops.js +80 -0
- package/dist/stores/internal/sqlite-ledger-run-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-step-operations.d.ts +28 -0
- package/dist/stores/internal/sqlite-ledger-step-operations.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-step-operations.js +53 -0
- package/dist/stores/internal/sqlite-ledger-step-operations.js.map +1 -0
- package/dist/stores/internal/sqlite-ledger-step-ops.d.ts +47 -0
- package/dist/stores/internal/sqlite-ledger-step-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-ledger-step-ops.js +89 -0
- package/dist/stores/internal/sqlite-ledger-step-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-lesson-ops.d.ts +100 -0
- package/dist/stores/internal/sqlite-lesson-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-lesson-ops.js +178 -0
- package/dist/stores/internal/sqlite-lesson-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-lesson-row.d.ts +28 -0
- package/dist/stores/internal/sqlite-lesson-row.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-lesson-row.js +2 -0
- package/dist/stores/internal/sqlite-lesson-row.js.map +1 -0
- package/dist/stores/internal/sqlite-overlay-step-mutation-entry.d.ts +21 -0
- package/dist/stores/internal/sqlite-overlay-step-mutation-entry.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-overlay-step-mutation-entry.js +2 -0
- package/dist/stores/internal/sqlite-overlay-step-mutation-entry.js.map +1 -0
- package/dist/stores/internal/sqlite-run-row.d.ts +36 -0
- package/dist/stores/internal/sqlite-run-row.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-run-row.js +2 -0
- package/dist/stores/internal/sqlite-run-row.js.map +1 -0
- package/dist/stores/internal/sqlite-step-row.d.ts +32 -0
- package/dist/stores/internal/sqlite-step-row.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-step-row.js +2 -0
- package/dist/stores/internal/sqlite-step-row.js.map +1 -0
- package/dist/stores/internal/sqlite-suspended-fork-row.d.ts +22 -0
- package/dist/stores/internal/sqlite-suspended-fork-row.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-suspended-fork-row.js +2 -0
- package/dist/stores/internal/sqlite-suspended-fork-row.js.map +1 -0
- package/dist/stores/internal/sqlite-topology-base-row.d.ts +18 -0
- package/dist/stores/internal/sqlite-topology-base-row.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-topology-base-row.js +2 -0
- package/dist/stores/internal/sqlite-topology-base-row.js.map +1 -0
- package/dist/stores/internal/sqlite-topology-commit-ops.d.ts +37 -0
- package/dist/stores/internal/sqlite-topology-commit-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-topology-commit-ops.js +58 -0
- package/dist/stores/internal/sqlite-topology-commit-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-commit.d.ts +25 -0
- package/dist/stores/internal/sqlite-topology-overlay-commit.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-commit.js +51 -0
- package/dist/stores/internal/sqlite-topology-overlay-commit.js.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-ops.d.ts +61 -0
- package/dist/stores/internal/sqlite-topology-overlay-ops.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-ops.js +156 -0
- package/dist/stores/internal/sqlite-topology-overlay-ops.js.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-row.d.ts +40 -0
- package/dist/stores/internal/sqlite-topology-overlay-row.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-row.js +2 -0
- package/dist/stores/internal/sqlite-topology-overlay-row.js.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-sync.d.ts +72 -0
- package/dist/stores/internal/sqlite-topology-overlay-sync.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-topology-overlay-sync.js +116 -0
- package/dist/stores/internal/sqlite-topology-overlay-sync.js.map +1 -0
- package/dist/stores/internal/sqlite-wire-frame-row.d.ts +26 -0
- package/dist/stores/internal/sqlite-wire-frame-row.d.ts.map +1 -0
- package/dist/stores/internal/sqlite-wire-frame-row.js +2 -0
- package/dist/stores/internal/sqlite-wire-frame-row.js.map +1 -0
- package/dist/stores/internal/three-way-merge-contract.d.ts +25 -0
- package/dist/stores/internal/three-way-merge-contract.d.ts.map +1 -0
- package/dist/stores/internal/three-way-merge-contract.js +76 -0
- package/dist/stores/internal/three-way-merge-contract.js.map +1 -0
- package/dist/stores/internal/update-continuation-stack-params.d.ts +17 -0
- package/dist/stores/internal/update-continuation-stack-params.d.ts.map +1 -0
- package/dist/stores/internal/update-continuation-stack-params.js +2 -0
- package/dist/stores/internal/update-continuation-stack-params.js.map +1 -0
- package/dist/stores/internal/update-contract-in-overlay-params.d.ts +16 -0
- package/dist/stores/internal/update-contract-in-overlay-params.d.ts.map +1 -0
- package/dist/stores/internal/update-contract-in-overlay-params.js +2 -0
- package/dist/stores/internal/update-contract-in-overlay-params.js.map +1 -0
- package/dist/stores/internal/validate-lane-dag.d.ts +59 -0
- package/dist/stores/internal/validate-lane-dag.d.ts.map +1 -0
- package/dist/stores/internal/validate-lane-dag.js +117 -0
- package/dist/stores/internal/validate-lane-dag.js.map +1 -0
- package/dist/stores/sqlite-ledger-store.d.ts +222 -0
- package/dist/stores/sqlite-ledger-store.d.ts.map +1 -0
- package/dist/stores/sqlite-ledger-store.js +295 -0
- package/dist/stores/sqlite-ledger-store.js.map +1 -0
- package/dist/stores/sqlite-lesson-store.d.ts +96 -0
- package/dist/stores/sqlite-lesson-store.d.ts.map +1 -0
- package/dist/stores/sqlite-lesson-store.js +121 -0
- package/dist/stores/sqlite-lesson-store.js.map +1 -0
- package/dist/stores/sqlite-topology-store.d.ts +112 -0
- package/dist/stores/sqlite-topology-store.d.ts.map +1 -0
- package/dist/stores/sqlite-topology-store.js +137 -0
- package/dist/stores/sqlite-topology-store.js.map +1 -0
- package/package.json +70 -3
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { threeWayMergeContract } from './three-way-merge-contract.js';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the `base_contract_text_at_acquire` value to persist when updating a partition contract in an overlay.
|
|
4
|
+
*
|
|
5
|
+
* Preserves `ovRow.base_contract_text_at_acquire` when already mutated in the current run,
|
|
6
|
+
* uses `ovRow.baseline_contract_text` on the first mutation after a prerequisite sync,
|
|
7
|
+
* or falls back to `baseText` when creating a fresh overlay row.
|
|
8
|
+
*
|
|
9
|
+
* @param {SqliteTopologyOverlayRow | undefined} ovRow - Existing overlay row for `(runId, partitionId)`, if any.
|
|
10
|
+
* @param {string} baseText - Canonical base contract text.
|
|
11
|
+
*
|
|
12
|
+
* @returns {string} Acquire-base contract text to store on the overlay row.
|
|
13
|
+
*/
|
|
14
|
+
export function resolveNextSqliteAcquireBase(ovRow, baseText) {
|
|
15
|
+
if (ovRow === undefined) {
|
|
16
|
+
return baseText;
|
|
17
|
+
}
|
|
18
|
+
if (ovRow.mutated_in_run === 1) {
|
|
19
|
+
return ovRow.base_contract_text_at_acquire;
|
|
20
|
+
}
|
|
21
|
+
return ovRow.baseline_contract_text;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the `base_contract_text_at_acquire` after folding `params.prereqRow` into `params.targetRow`.
|
|
25
|
+
*
|
|
26
|
+
* Advances the acquire baseline to `prereqRow.contract_text` when `targetRow` mutated on top of a prerequisite,
|
|
27
|
+
* or preserves the earlier baseline during a stacked child fold.
|
|
28
|
+
*
|
|
29
|
+
* @param {ResolveSyncedSqliteOverlayFieldParams} params - Prerequisite row, target row, and stacked-child fold state.
|
|
30
|
+
*
|
|
31
|
+
* @returns {string} Updated `base_contract_text_at_acquire` value.
|
|
32
|
+
*/
|
|
33
|
+
function resolveSyncedAcquireBase(params) {
|
|
34
|
+
const { prereqRow, targetRow, isStackedChildFold } = params;
|
|
35
|
+
if (targetRow === undefined || targetRow.mutated_in_run !== 1) {
|
|
36
|
+
return prereqRow.base_contract_text_at_acquire;
|
|
37
|
+
}
|
|
38
|
+
if (isStackedChildFold) {
|
|
39
|
+
return targetRow.base_contract_text_at_acquire;
|
|
40
|
+
}
|
|
41
|
+
return prereqRow.contract_text;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolves `last_mutated_by_run_id` after folding `params.prereqRow` into `params.targetRow`.
|
|
45
|
+
*
|
|
46
|
+
* Credits the stacked child on a child fold, the target run when `targetRow` mutated independently,
|
|
47
|
+
* or the prerequisite run when `targetRow` had not mutated the partition.
|
|
48
|
+
*
|
|
49
|
+
* @param {ResolveSyncedSqliteOverlayFieldParams} params - Prerequisite row, target row, and stacked-child fold state.
|
|
50
|
+
*
|
|
51
|
+
* @returns {string | null} Run identifier to record as `last_mutated_by_run_id`.
|
|
52
|
+
*/
|
|
53
|
+
function resolveSyncedLastMutatedBy(params) {
|
|
54
|
+
const { prereqRow, targetRow, isStackedChildFold } = params;
|
|
55
|
+
if (targetRow === undefined || targetRow.mutated_in_run !== 1) {
|
|
56
|
+
return prereqRow.last_mutated_by_run_id;
|
|
57
|
+
}
|
|
58
|
+
if (isStackedChildFold) {
|
|
59
|
+
return prereqRow.last_mutated_by_run_id ?? targetRow.last_mutated_by_run_id;
|
|
60
|
+
}
|
|
61
|
+
return targetRow.last_mutated_by_run_id ?? prereqRow.last_mutated_by_run_id;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Computes the merged overlay state when synchronizing `params.prereqRow` into `params.targetRunId`.
|
|
65
|
+
*
|
|
66
|
+
* Performs a 3-way contract merge when `targetRow` also mutated the partition and unions absorbed run IDs.
|
|
67
|
+
*
|
|
68
|
+
* @param {ComputeSyncedSqliteOverlayParams} params - Target and prerequisite overlay rows.
|
|
69
|
+
*
|
|
70
|
+
* @returns {SyncedSqliteOverlayValuesOptions} Computed column values for upserting the target overlay row.
|
|
71
|
+
*/
|
|
72
|
+
export function computeSyncedSqliteOverlayValues(params) {
|
|
73
|
+
const { targetRunId, prereqRunId, prereqRow, targetRow } = params;
|
|
74
|
+
const prereqAbsorbed = new Set(JSON.parse(prereqRow.absorbed_run_ids_json));
|
|
75
|
+
const absorbed = new Set(targetRow !== undefined ? JSON.parse(targetRow.absorbed_run_ids_json) : []);
|
|
76
|
+
for (const id of prereqAbsorbed) {
|
|
77
|
+
absorbed.add(id);
|
|
78
|
+
}
|
|
79
|
+
absorbed.add(prereqRunId);
|
|
80
|
+
const isStackedChildFold = targetRow !== undefined &&
|
|
81
|
+
(prereqAbsorbed.has(targetRunId) ||
|
|
82
|
+
prereqRow.base_contract_text_at_acquire === targetRow.contract_text);
|
|
83
|
+
const targetMutated = targetRow !== undefined && targetRow.mutated_in_run === 1;
|
|
84
|
+
const mergeBase = isStackedChildFold
|
|
85
|
+
? prereqRow.base_contract_text_at_acquire
|
|
86
|
+
: (targetRow?.base_contract_text_at_acquire ?? prereqRow.base_contract_text_at_acquire);
|
|
87
|
+
const mergedContractText = targetMutated
|
|
88
|
+
? threeWayMergeContract(mergeBase, prereqRow.contract_text, targetRow.contract_text)
|
|
89
|
+
: prereqRow.contract_text;
|
|
90
|
+
const nextAcquireBase = resolveSyncedAcquireBase({
|
|
91
|
+
prereqRow,
|
|
92
|
+
targetRow,
|
|
93
|
+
isStackedChildFold,
|
|
94
|
+
});
|
|
95
|
+
const nextLastMutatedBy = resolveSyncedLastMutatedBy({
|
|
96
|
+
prereqRow,
|
|
97
|
+
targetRow,
|
|
98
|
+
isStackedChildFold,
|
|
99
|
+
});
|
|
100
|
+
const nextEpoch = targetRow !== undefined ? Math.max(targetRow.epoch, prereqRow.epoch) : prereqRow.epoch;
|
|
101
|
+
const initialBase = targetRow !== undefined
|
|
102
|
+
? targetRow.initial_base_contract_text
|
|
103
|
+
: prereqRow.initial_base_contract_text;
|
|
104
|
+
return {
|
|
105
|
+
nextEpoch,
|
|
106
|
+
mergedContractText,
|
|
107
|
+
nextAcquireBase,
|
|
108
|
+
initialBase,
|
|
109
|
+
nextLastMutatedBy,
|
|
110
|
+
absorbedRunIdsJson: JSON.stringify(Array.from(absorbed)),
|
|
111
|
+
mutatedInRun: targetRow !== undefined ? targetRow.mutated_in_run : 0,
|
|
112
|
+
status: targetRow !== undefined ? targetRow.status : 'ACTIVE',
|
|
113
|
+
stepMutationsJson: targetRow !== undefined ? targetRow.step_mutations_json : '[]',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=sqlite-topology-overlay-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-topology-overlay-sync.js","sourceRoot":"","sources":["../../../src/stores/internal/sqlite-topology-overlay-sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAoDtE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,4BAA4B,CAC1C,KAA2C,EAC3C,QAAgB;IAEhB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,KAAK,CAAC,cAAc,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,6BAA6B,CAAC;IAC7C,CAAC;IACD,OAAO,KAAK,CAAC,sBAAsB,CAAC;AACtC,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,wBAAwB,CAAC,MAA6C;IAC7E,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IAC5D,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,cAAc,KAAK,CAAC,EAAE,CAAC;QAC9D,OAAO,SAAS,CAAC,6BAA6B,CAAC;IACjD,CAAC;IACD,IAAI,kBAAkB,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC,6BAA6B,CAAC;IACjD,CAAC;IACD,OAAO,SAAS,CAAC,aAAa,CAAC;AACjC,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,0BAA0B,CAAC,MAA6C;IAC/E,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IAC5D,IAAI,SAAS,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Lite row shape for `harness_wire_frames`.
|
|
3
|
+
*
|
|
4
|
+
* Maps snake_case database columns to typed properties for wire-frame append, replacement, and chain queries.
|
|
5
|
+
*/
|
|
6
|
+
export interface SqliteWireFrameRow {
|
|
7
|
+
/** Unique wire frame message identifier. */
|
|
8
|
+
readonly message_id: string;
|
|
9
|
+
/** Enclosing flow run identifier. */
|
|
10
|
+
readonly run_id: string;
|
|
11
|
+
/** Preceding message identifier in the chain, or `null` for Turn 0. */
|
|
12
|
+
readonly parent_message_id: string | null;
|
|
13
|
+
/** Model vendor identifier string. */
|
|
14
|
+
readonly vendor_id: string;
|
|
15
|
+
/** Raw UTF-8 encoded vendor wire frame buffer. */
|
|
16
|
+
readonly raw_wire_frame: Buffer;
|
|
17
|
+
/** JSON-serialized `CanonicalMessage` projection. */
|
|
18
|
+
readonly canonical_json: string;
|
|
19
|
+
/** SHA-256 hex digest of the compiled wire prefix. */
|
|
20
|
+
readonly prefix_digest: string;
|
|
21
|
+
/** Optional JSON-serialized `Record<string, string>` of skill tombstones. */
|
|
22
|
+
readonly compacted_tombstones_json: string | null;
|
|
23
|
+
/** Compaction flag (`1` when raw wire bytes have been pruned, `0` otherwise). */
|
|
24
|
+
readonly is_compacted: number;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=sqlite-wire-frame-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-wire-frame-row.d.ts","sourceRoot":"","sources":["../../../src/stores/internal/sqlite-wire-frame-row.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,sCAAsC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,sDAAsD;IACtD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-wire-frame-row.js","sourceRoot":"","sources":["../../../src/stores/internal/sqlite-wire-frame-row.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Three-way conflict region produced by `diff3Merge` (`node-diff3`).
|
|
3
|
+
*/
|
|
4
|
+
export interface Diff3ConflictRegionParams {
|
|
5
|
+
/** Lines from the left branch (`currentBaseText`). */
|
|
6
|
+
readonly a: readonly string[];
|
|
7
|
+
/** Lines from the common ancestor (`baseAtAcquire`). */
|
|
8
|
+
readonly o: readonly string[];
|
|
9
|
+
/** Lines from the right branch (`overlayText`). */
|
|
10
|
+
readonly b: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Performs a 3-way merge of `overlayText` and `currentBaseText` against `baseAtAcquire` (`SPEC.md` §3.3).
|
|
14
|
+
*
|
|
15
|
+
* Uses `diff3Merge` (`node-diff3`) to merge non-conflicting line additions/modifications from both
|
|
16
|
+
* `currentBaseText` and `overlayText`, falling back to section concatenation on conflict blocks.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} baseAtAcquire - Contract text pinned when the run acquired or synced the partition.
|
|
19
|
+
* @param {string} currentBaseText - Current committed contract text in the canonical base store.
|
|
20
|
+
* @param {string} overlayText - Contract text in the committing run's overlay.
|
|
21
|
+
*
|
|
22
|
+
* @returns {string} Merged canonical contract text.
|
|
23
|
+
*/
|
|
24
|
+
export declare function threeWayMergeContract(baseAtAcquire: string, currentBaseText: string, overlayText: string): string;
|
|
25
|
+
//# sourceMappingURL=three-way-merge-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three-way-merge-contract.d.ts","sourceRoot":"","sources":["../../../src/stores/internal/three-way-merge-contract.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,sDAAsD;IACtD,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AA6CD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,GAClB,MAAM,CAuBR"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { diff3Merge } from 'node-diff3';
|
|
2
|
+
/**
|
|
3
|
+
* Splits a contract text string into an array of lines for 3-way line-level merging.
|
|
4
|
+
*
|
|
5
|
+
* Returns an empty array when `text` is empty so empty baselines do not introduce phantom blank lines.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} text - Contract text to split.
|
|
8
|
+
*
|
|
9
|
+
* @returns {string[]} Array of lines.
|
|
10
|
+
*/
|
|
11
|
+
function splitContractLines(text) {
|
|
12
|
+
return text.length > 0 ? text.split('\n') : [];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolves a `diff3Merge` conflict block by removing ancestor `o` lines deleted by either side
|
|
16
|
+
* and concatenating surviving additions/modifications from `conflict.a` and `conflict.b`.
|
|
17
|
+
*
|
|
18
|
+
* Handles both adjacent-line hunk merges in `node-diff3` and concurrent same-line modifications (`SPEC.md` §3.3).
|
|
19
|
+
*
|
|
20
|
+
* @param {string[]} target - Mutable output line buffer.
|
|
21
|
+
* @param {Diff3ConflictRegionParams} conflict - Conflict region from `diff3Merge`.
|
|
22
|
+
*
|
|
23
|
+
* @returns {void} Appends resolved lines to `target` in-place.
|
|
24
|
+
*/
|
|
25
|
+
function resolveConflictRegion(target, conflict) {
|
|
26
|
+
const oSet = new Set(conflict.o);
|
|
27
|
+
const aSet = new Set(conflict.a);
|
|
28
|
+
const bSet = new Set(conflict.b);
|
|
29
|
+
const seen = new Set();
|
|
30
|
+
for (const line of conflict.a) {
|
|
31
|
+
if ((!oSet.has(line) || bSet.has(line)) && !seen.has(line)) {
|
|
32
|
+
target.push(line);
|
|
33
|
+
seen.add(line);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
for (const line of conflict.b) {
|
|
37
|
+
if ((!oSet.has(line) || aSet.has(line)) && !seen.has(line)) {
|
|
38
|
+
target.push(line);
|
|
39
|
+
seen.add(line);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Performs a 3-way merge of `overlayText` and `currentBaseText` against `baseAtAcquire` (`SPEC.md` §3.3).
|
|
45
|
+
*
|
|
46
|
+
* Uses `diff3Merge` (`node-diff3`) to merge non-conflicting line additions/modifications from both
|
|
47
|
+
* `currentBaseText` and `overlayText`, falling back to section concatenation on conflict blocks.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} baseAtAcquire - Contract text pinned when the run acquired or synced the partition.
|
|
50
|
+
* @param {string} currentBaseText - Current committed contract text in the canonical base store.
|
|
51
|
+
* @param {string} overlayText - Contract text in the committing run's overlay.
|
|
52
|
+
*
|
|
53
|
+
* @returns {string} Merged canonical contract text.
|
|
54
|
+
*/
|
|
55
|
+
export function threeWayMergeContract(baseAtAcquire, currentBaseText, overlayText) {
|
|
56
|
+
if (currentBaseText === baseAtAcquire || currentBaseText.length === 0) {
|
|
57
|
+
return overlayText;
|
|
58
|
+
}
|
|
59
|
+
if (overlayText === baseAtAcquire || overlayText === currentBaseText) {
|
|
60
|
+
return currentBaseText;
|
|
61
|
+
}
|
|
62
|
+
const regions = diff3Merge(splitContractLines(currentBaseText), splitContractLines(baseAtAcquire), splitContractLines(overlayText));
|
|
63
|
+
const mergedLines = [];
|
|
64
|
+
for (const region of regions) {
|
|
65
|
+
if (region.ok !== undefined) {
|
|
66
|
+
for (const line of region.ok) {
|
|
67
|
+
mergedLines.push(line);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else if (region.conflict !== undefined) {
|
|
71
|
+
resolveConflictRegion(mergedLines, region.conflict);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return mergedLines.join('\n');
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=three-way-merge-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three-way-merge-contract.js","sourceRoot":"","sources":["../../../src/stores/internal/three-way-merge-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAcxC;;;;;;;;GAQG;AACH,SAAS,kBAAkB,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACjD,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,qBAAqB,CAAC,MAAgB,EAAE,QAAmC;IAClF,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,QAAQ,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,QAAQ,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,QAAQ,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAA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AI,MAAM,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;YAC5B,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;gBAC7B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;aAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACzC,qBAAqB,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ContinuationFrame } from '@paraharness/core';
|
|
2
|
+
/**
|
|
3
|
+
* Parameter object for `updateContinuationStackInSqlite`.
|
|
4
|
+
*
|
|
5
|
+
* Bundles the run ID, step execution ID, continuation stack array, and optional base scope checkpoint.
|
|
6
|
+
*/
|
|
7
|
+
export interface UpdateContinuationStackParams {
|
|
8
|
+
/** Enclosing flow run identifier. */
|
|
9
|
+
readonly runId: string;
|
|
10
|
+
/** Target step execution identifier. */
|
|
11
|
+
readonly stepExecId: string;
|
|
12
|
+
/** Updated outer-to-inner continuation stack. */
|
|
13
|
+
readonly continuationStack: readonly ContinuationFrame[];
|
|
14
|
+
/** Optional updated base scope checkpoint. */
|
|
15
|
+
readonly baseScopeCheckpoint?: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=update-continuation-stack-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-continuation-stack-params.d.ts","sourceRoot":"","sources":["../../../src/stores/internal/update-continuation-stack-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,iBAAiB,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACzD,8CAA8C;IAC9C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-continuation-stack-params.js","sourceRoot":"","sources":["../../../src/stores/internal/update-continuation-stack-params.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameter object for `updateContractInOverlay`.
|
|
3
|
+
*
|
|
4
|
+
* Bundles the run ID, partition ID, new contract text, and optional step execution ID.
|
|
5
|
+
*/
|
|
6
|
+
export interface UpdateContractInOverlayParams {
|
|
7
|
+
/** Active flow run identifier. */
|
|
8
|
+
readonly runId: string;
|
|
9
|
+
/** Target partition identifier. */
|
|
10
|
+
readonly partitionId: string;
|
|
11
|
+
/** Updated contract text to write to the run's CoW overlay. */
|
|
12
|
+
readonly newContractText: string;
|
|
13
|
+
/** Optional step execution identifier for step-scoped rollback. */
|
|
14
|
+
readonly stepExecId?: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=update-contract-in-overlay-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-contract-in-overlay-params.d.ts","sourceRoot":"","sources":["../../../src/stores/internal/update-contract-in-overlay-params.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,mCAAmC;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-contract-in-overlay-params.js","sourceRoot":"","sources":["../../../src/stores/internal/update-contract-in-overlay-params.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Graph } from '@dagrejs/graphlib';
|
|
2
|
+
import type { MutateLanePlanRequest } from '@paraharness/core';
|
|
3
|
+
/**
|
|
4
|
+
* Persisted lane item row shape passed to `buildChainedLaneDependencies`.
|
|
5
|
+
*/
|
|
6
|
+
export interface ExistingLaneItemRowParams {
|
|
7
|
+
/** Work item deduplication key. */
|
|
8
|
+
readonly item_key: string;
|
|
9
|
+
/** JSON-serialized array of prerequisite `item_key` strings. */
|
|
10
|
+
readonly depends_on_json: string;
|
|
11
|
+
/** Most recently chained prerequisite tip key for `item_key`, if any. */
|
|
12
|
+
readonly latest_spawned_tip_key: string | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Validated lane dependency graph state returned by `buildChainedLaneDependencies`.
|
|
16
|
+
*/
|
|
17
|
+
export interface ChainedLaneDependenciesOptions {
|
|
18
|
+
/** Mutable map of `itemKey -> dependsOn[]`. */
|
|
19
|
+
readonly depsByItem: Map<string, string[]>;
|
|
20
|
+
/** Updated prerequisite tip key for `req.parentItemKey`, if any. */
|
|
21
|
+
readonly rollingTip: string | undefined;
|
|
22
|
+
/** Updated direct prerequisite list for `req.parentItemKey`. */
|
|
23
|
+
readonly nextParentDeps: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a `@dagrejs/graphlib` directed `Graph` from `depsByItem` and verifies acyclicity via `alg.isAcyclic` and `alg.findCycles`.
|
|
27
|
+
*
|
|
28
|
+
* Throws an actionable error naming the cycle members if any self-loop or multi-node cycle exists.
|
|
29
|
+
*
|
|
30
|
+
* @param {ReadonlyMap<string, readonly string[]>} depsByItem - Adjacency map of `itemKey -> dependsOn[]`.
|
|
31
|
+
* @param {string} laneId - Enclosing lane identifier for error diagnostics.
|
|
32
|
+
*
|
|
33
|
+
* @returns {Graph} Validated acyclic `@dagrejs/graphlib` directed graph.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildAcyclicLaneGraph(depsByItem: ReadonlyMap<string, readonly string[]>, laneId: string): Graph;
|
|
36
|
+
/**
|
|
37
|
+
* Validates that the lane prerequisite graph `depsByItem` is acyclic and within `maxPrerequisiteDepth` using `@dagrejs/graphlib`.
|
|
38
|
+
*
|
|
39
|
+
* Uses `alg.topsort` over the validated DAG to compute longest prerequisite chain depths in $O(V + E)$ time.
|
|
40
|
+
*
|
|
41
|
+
* @param {ReadonlyMap<string, readonly string[]>} depsByItem - Adjacency map of `itemKey -> dependsOn[]`.
|
|
42
|
+
* @param {number} maxPrerequisiteDepth - Maximum allowed prerequisite chain depth.
|
|
43
|
+
* @param {string} laneId - Enclosing lane identifier for error diagnostics.
|
|
44
|
+
*
|
|
45
|
+
* @returns {void} Returns nothing when the graph is acyclic and within `maxPrerequisiteDepth`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function assertValidLaneDag(depsByItem: ReadonlyMap<string, readonly string[]>, maxPrerequisiteDepth: number, laneId: string): void;
|
|
48
|
+
/**
|
|
49
|
+
* Builds the chained lane dependency graph for `req` and validates DAG acyclicity and `maxPrerequisiteDepth`.
|
|
50
|
+
*
|
|
51
|
+
* Chains newly spawned prerequisite items linearly onto any previously spawned tip prerequisite of `req.parentItemKey`.
|
|
52
|
+
*
|
|
53
|
+
* @param {readonly ExistingLaneItemRowParams[]} existingRows - Current lane rows.
|
|
54
|
+
* @param {MutateLanePlanRequest} req - Plan mutation request.
|
|
55
|
+
*
|
|
56
|
+
* @returns {ChainedLaneDependenciesOptions} Validated DAG update state.
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildChainedLaneDependencies(existingRows: readonly ExistingLaneItemRowParams[], req: MutateLanePlanRequest): ChainedLaneDependenciesOptions;
|
|
59
|
+
//# sourceMappingURL=validate-lane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+1,117 @@
|
|
|
1
|
+
import { Graph, alg } from '@dagrejs/graphlib';
|
|
2
|
+
/**
|
|
3
|
+
* Constructs a `@dagrejs/graphlib` directed `Graph` from `depsByItem` and verifies acyclicity via `alg.isAcyclic` and `alg.findCycles`.
|
|
4
|
+
*
|
|
5
|
+
* Throws an actionable error naming the cycle members if any self-loop or multi-node cycle exists.
|
|
6
|
+
*
|
|
7
|
+
* @param {ReadonlyMap<string, readonly string[]>} depsByItem - Adjacency map of `itemKey -> dependsOn[]`.
|
|
8
|
+
* @param {string} laneId - Enclosing lane identifier for error diagnostics.
|
|
9
|
+
*
|
|
10
|
+
* @returns {Graph} Validated acyclic `@dagrejs/graphlib` directed graph.
|
|
11
|
+
*/
|
|
12
|
+
export function buildAcyclicLaneGraph(depsByItem, laneId) {
|
|
13
|
+
const graph = new Graph({ directed: true });
|
|
14
|
+
for (const [itemKey, deps] of depsByItem.entries()) {
|
|
15
|
+
graph.setNode(itemKey);
|
|
16
|
+
for (const depKey of deps) {
|
|
17
|
+
graph.setNode(depKey);
|
|
18
|
+
graph.setEdge(itemKey, depKey);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
if (!alg.isAcyclic(graph)) {
|
|
22
|
+
const cycles = alg.findCycles(graph);
|
|
23
|
+
const firstCycle = cycles[0] ?? [];
|
|
24
|
+
throw new Error(`Cycle detected in lane prerequisite DAG for lane '${laneId}' involving [${firstCycle.join(', ')}].`);
|
|
25
|
+
}
|
|
26
|
+
return graph;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Validates that the lane prerequisite graph `depsByItem` is acyclic and within `maxPrerequisiteDepth` using `@dagrejs/graphlib`.
|
|
30
|
+
*
|
|
31
|
+
* Uses `alg.topsort` over the validated DAG to compute longest prerequisite chain depths in $O(V + E)$ time.
|
|
32
|
+
*
|
|
33
|
+
* @param {ReadonlyMap<string, readonly string[]>} depsByItem - Adjacency map of `itemKey -> dependsOn[]`.
|
|
34
|
+
* @param {number} maxPrerequisiteDepth - Maximum allowed prerequisite chain depth.
|
|
35
|
+
* @param {string} laneId - Enclosing lane identifier for error diagnostics.
|
|
36
|
+
*
|
|
37
|
+
* @returns {void} Returns nothing when the graph is acyclic and within `maxPrerequisiteDepth`.
|
|
38
|
+
*/
|
|
39
|
+
export function assertValidLaneDag(depsByItem, maxPrerequisiteDepth, laneId) {
|
|
40
|
+
const graph = buildAcyclicLaneGraph(depsByItem, laneId);
|
|
41
|
+
const topoOrder = alg.topsort(graph);
|
|
42
|
+
const depthByNode = new Map();
|
|
43
|
+
for (let idx = topoOrder.length - 1; idx >= 0; idx -= 1) {
|
|
44
|
+
const nodeKey = topoOrder[idx];
|
|
45
|
+
if (nodeKey !== undefined) {
|
|
46
|
+
const directDeps = graph.successors(nodeKey) ?? [];
|
|
47
|
+
let maxChildDepth = 0;
|
|
48
|
+
for (const depKey of directDeps) {
|
|
49
|
+
const edgeDepth = 1 + (depthByNode.get(depKey) ?? 0);
|
|
50
|
+
if (edgeDepth > maxChildDepth) {
|
|
51
|
+
maxChildDepth = edgeDepth;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
depthByNode.set(nodeKey, maxChildDepth);
|
|
55
|
+
if (maxChildDepth > maxPrerequisiteDepth) {
|
|
56
|
+
throw new Error(`Prerequisite chain depth ${String(maxChildDepth)} for item '${nodeKey}' in lane '${laneId}' exceeds maxPrerequisiteDepth (${String(maxPrerequisiteDepth)}).`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Builds the chained lane dependency graph for `req` and validates DAG acyclicity and `maxPrerequisiteDepth`.
|
|
63
|
+
*
|
|
64
|
+
* Chains newly spawned prerequisite items linearly onto any previously spawned tip prerequisite of `req.parentItemKey`.
|
|
65
|
+
*
|
|
66
|
+
* @param {readonly ExistingLaneItemRowParams[]} existingRows - Current lane rows.
|
|
67
|
+
* @param {MutateLanePlanRequest} req - Plan mutation request.
|
|
68
|
+
*
|
|
69
|
+
* @returns {ChainedLaneDependenciesOptions} Validated DAG update state.
|
|
70
|
+
*/
|
|
71
|
+
export function buildChainedLaneDependencies(existingRows, req) {
|
|
72
|
+
const depsByItem = new Map();
|
|
73
|
+
let prevTipKey;
|
|
74
|
+
for (const row of existingRows) {
|
|
75
|
+
depsByItem.set(row.item_key, JSON.parse(row.depends_on_json));
|
|
76
|
+
if (row.item_key === req.parentItemKey && row.latest_spawned_tip_key !== null) {
|
|
77
|
+
prevTipKey = row.latest_spawned_tip_key;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const currentParentDeps = depsByItem.get(req.parentItemKey) ?? [];
|
|
81
|
+
if (prevTipKey === undefined && currentParentDeps.length > 0) {
|
|
82
|
+
prevTipKey = currentParentDeps[currentParentDeps.length - 1];
|
|
83
|
+
}
|
|
84
|
+
const spawned = req.spawnedItems ?? [];
|
|
85
|
+
let rollingTip = prevTipKey;
|
|
86
|
+
for (const spawnedTask of spawned) {
|
|
87
|
+
const taskDepSet = new Set();
|
|
88
|
+
if (rollingTip !== undefined) {
|
|
89
|
+
taskDepSet.add(rollingTip);
|
|
90
|
+
}
|
|
91
|
+
for (const dep of spawnedTask.dependsOn) {
|
|
92
|
+
taskDepSet.add(dep);
|
|
93
|
+
}
|
|
94
|
+
depsByItem.set(spawnedTask.itemKey, Array.from(taskDepSet));
|
|
95
|
+
rollingTip = spawnedTask.itemKey;
|
|
96
|
+
}
|
|
97
|
+
const nextParentDepSet = new Set();
|
|
98
|
+
for (const existingDep of currentParentDeps) {
|
|
99
|
+
if (spawned.length === 0 || existingDep !== prevTipKey) {
|
|
100
|
+
nextParentDepSet.add(existingDep);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (spawned.length > 0 && rollingTip !== undefined) {
|
|
104
|
+
nextParentDepSet.add(rollingTip);
|
|
105
|
+
}
|
|
106
|
+
for (const addedDep of req.addedDependencies ?? []) {
|
|
107
|
+
nextParentDepSet.add(addedDep);
|
|
108
|
+
if (!depsByItem.has(addedDep)) {
|
|
109
|
+
depsByItem.set(addedDep, []);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const nextParentDeps = Array.from(nextParentDepSet);
|
|
113
|
+
depsByItem.set(req.parentItemKey, nextParentDeps);
|
|
114
|
+
assertValidLaneDag(depsByItem, req.maxPrerequisiteDepth, req.laneId);
|
|
115
|
+
return { depsByItem, rollingTip, nextParentDeps };
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=validate-lane-dag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-lane-dag.js","sourceRoot":"","sources":["../../../src/stores/internal/validate-lane-dag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AA2B/C;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,UAAkD,EAClD,MAAc;IAEd,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5C,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;QACnD,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,KAAK,MAAM,MAAM,IAAI,IAAI,EAAE,CAAC;YAC1B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACtB,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CACb,qDAAqD,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