@codyswann/lisa 4.17.6 → 4.17.7
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/all/copy-contents/gitignore +6 -0
- package/dist/cli/doctor-reconciliation.d.ts +15 -0
- package/dist/cli/doctor-reconciliation.d.ts.map +1 -0
- package/dist/cli/doctor-reconciliation.js +123 -0
- package/dist/cli/doctor-reconciliation.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +7 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +15 -1
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/reconciliation-report.d.ts +100 -0
- package/dist/core/reconciliation-report.d.ts.map +1 -0
- package/dist/core/reconciliation-report.js +178 -0
- package/dist/core/reconciliation-report.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +7 -1
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/utils/postinstall-trampoline-report-source.d.ts +50 -0
- package/dist/utils/postinstall-trampoline-report-source.d.ts.map +1 -0
- package/dist/utils/postinstall-trampoline-report-source.js +113 -0
- package/dist/utils/postinstall-trampoline-report-source.js.map +1 -0
- package/dist/utils/postinstall-trampoline-source.d.ts +65 -0
- package/dist/utils/postinstall-trampoline-source.d.ts.map +1 -0
- package/dist/utils/postinstall-trampoline-source.js +312 -0
- package/dist/utils/postinstall-trampoline-source.js.map +1 -0
- package/dist/utils/postinstall-trampoline.d.ts +4 -2
- package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
- package/dist/utils/postinstall-trampoline.js +5 -197
- package/dist/utils/postinstall-trampoline.js.map +1 -1
- package/package.json +2 -2
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/** Directory-relative location of the report, for messages and gitignores. */
|
|
2
|
+
export declare const RECONCILIATION_REPORT_DISPLAY_PATH = ".lisa/reconciliation-report.json";
|
|
3
|
+
/**
|
|
4
|
+
* Report schema version. Bump only alongside a reader change — an unknown
|
|
5
|
+
* version is treated as no report at all rather than being misread.
|
|
6
|
+
*/
|
|
7
|
+
export declare const RECONCILIATION_REPORT_SCHEMA_VERSION = 1;
|
|
8
|
+
/**
|
|
9
|
+
* What the reconciliation ended up doing.
|
|
10
|
+
*
|
|
11
|
+
* The two non-terminal values are the load-bearing ones. `scheduled` is written
|
|
12
|
+
* by the parent apply before the spawn; `started` is written by the detached
|
|
13
|
+
* child as its very first act. A report that never advances past `scheduled`
|
|
14
|
+
* means the child never ran; one stuck at `started` means it ran and died. Both
|
|
15
|
+
* used to look identical to success.
|
|
16
|
+
*/
|
|
17
|
+
export type ReconciliationOutcome =
|
|
18
|
+
/** Parent recorded the intent; no child has reported yet. */
|
|
19
|
+
"scheduled"
|
|
20
|
+
/** The detached child is alive and waiting for the package manager to exit. */
|
|
21
|
+
| "started"
|
|
22
|
+
/** The parent apply could not spawn the child at all. */
|
|
23
|
+
| "spawn-failed"
|
|
24
|
+
/** The child gave up waiting for the package manager and deliberately did not re-apply. */
|
|
25
|
+
| "parent-wait-timed-out"
|
|
26
|
+
/** The child ran and found package.json matching its pre-apply baseline: no lockfile can be stale. */
|
|
27
|
+
| "not-needed"
|
|
28
|
+
/** Every detected lockfile was regenerated successfully. */
|
|
29
|
+
| "regenerated"
|
|
30
|
+
/** The child started but did not finish: a regen command failed, or it aborted. */
|
|
31
|
+
| "failed";
|
|
32
|
+
/** Outcomes that mean the reconciliation finished and nothing is outstanding. */
|
|
33
|
+
export declare const SETTLED_RECONCILIATION_OUTCOMES: readonly ReconciliationOutcome[];
|
|
34
|
+
/** Outcomes that mean a child has not yet reported a terminal result. */
|
|
35
|
+
export declare const PENDING_RECONCILIATION_OUTCOMES: readonly ReconciliationOutcome[];
|
|
36
|
+
/** The persisted `.lisa/reconciliation-report.json` shape. */
|
|
37
|
+
export interface ReconciliationReport {
|
|
38
|
+
readonly schema_version: number;
|
|
39
|
+
/** Lisa version whose apply scheduled the reconciliation. */
|
|
40
|
+
readonly lisa_version: string;
|
|
41
|
+
/** Where the reconciliation got to. */
|
|
42
|
+
readonly outcome: ReconciliationOutcome;
|
|
43
|
+
/** ISO timestamp of the parent apply that scheduled it. */
|
|
44
|
+
readonly scheduled_at: string;
|
|
45
|
+
/** ISO timestamp of the most recent write — the age that makes a stall visible. */
|
|
46
|
+
readonly updated_at: string;
|
|
47
|
+
/** Package managers whose lockfiles the child regenerated (or tried to). */
|
|
48
|
+
readonly package_managers: readonly string[];
|
|
49
|
+
/** One operator-readable sentence about this outcome. */
|
|
50
|
+
readonly detail: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the single path every reader and writer uses.
|
|
54
|
+
* @param root - Project root
|
|
55
|
+
* @returns Absolute path to the report
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveReconciliationReportPath(root: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Read the report, returning null when it is missing, unparseable, or written
|
|
60
|
+
* by a schema this build does not understand.
|
|
61
|
+
* @param root - Project root
|
|
62
|
+
* @returns The report, or null when there is no usable one
|
|
63
|
+
*/
|
|
64
|
+
export declare function readReconciliationReport(root: string): Promise<ReconciliationReport | null>;
|
|
65
|
+
/**
|
|
66
|
+
* Write a report.
|
|
67
|
+
*
|
|
68
|
+
* Written atomically (temp file plus rename) so a reader never sees a partial
|
|
69
|
+
* document, and never throws: a report that could not be written must not turn
|
|
70
|
+
* a successful install into a failed one. That is the same trade the apply
|
|
71
|
+
* receipt makes, and for the same reason — the cost of a missing record is one
|
|
72
|
+
* doctor blind spot, the cost of throwing here is breaking installs.
|
|
73
|
+
* @param root - Project root being reconciled
|
|
74
|
+
* @param report - The record to persist
|
|
75
|
+
* @returns True when the report was persisted
|
|
76
|
+
*/
|
|
77
|
+
export declare function writeReconciliationReport(root: string, report: ReconciliationReport): Promise<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* Record that a reconciliation is about to be spawned.
|
|
80
|
+
*
|
|
81
|
+
* Written by the PARENT apply, before the spawn, precisely so that a spawn which
|
|
82
|
+
* never produces a child still leaves a trace. Without this write there is
|
|
83
|
+
* nothing on disk at all when the trampoline fails to launch, which is one of
|
|
84
|
+
* the two failure modes #2750 could not tell apart.
|
|
85
|
+
* @param root - Project root being reconciled
|
|
86
|
+
* @param lisaVersion - Lisa version running the apply
|
|
87
|
+
* @param now - Clock, injectable for tests
|
|
88
|
+
* @returns True when the report was persisted
|
|
89
|
+
*/
|
|
90
|
+
export declare function recordReconciliationScheduled(root: string, lisaVersion: string, now?: () => Date): Promise<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Record that the parent apply could not spawn the reconciliation child.
|
|
93
|
+
* @param root - Project root being reconciled
|
|
94
|
+
* @param lisaVersion - Lisa version running the apply
|
|
95
|
+
* @param message - The spawn error, verbatim
|
|
96
|
+
* @param now - Clock, injectable for tests
|
|
97
|
+
* @returns True when the report was persisted
|
|
98
|
+
*/
|
|
99
|
+
export declare function recordReconciliationSpawnFailure(root: string, lisaVersion: string, message: string, now?: () => Date): Promise<boolean>;
|
|
100
|
+
//# sourceMappingURL=reconciliation-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciliation-report.d.ts","sourceRoot":"","sources":["../../src/core/reconciliation-report.ts"],"names":[],"mappings":"AAiCA,8EAA8E;AAC9E,eAAO,MAAM,kCAAkC,qCACX,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,oCAAoC,IAAI,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB;AAC/B,6DAA6D;AAC3D,WAAW;AACb,+EAA+E;GAC7E,SAAS;AACX,yDAAyD;GACvD,cAAc;AAChB,2FAA2F;GACzF,uBAAuB;AACzB,sGAAsG;GACpG,YAAY;AACd,4DAA4D;GAC1D,aAAa;AACf,mFAAmF;GACjF,QAAQ,CAAC;AAEb,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,EAAE,SAAS,qBAAqB,EAC7C,CAAC;AAEhC,yEAAyE;AACzE,eAAO,MAAM,+BAA+B,EAAE,SAAS,qBAAqB,EAClD,CAAC;AAY3B,8DAA8D;AAC9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAyBD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAuBtC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,OAAO,CAAC,CAWlB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,GAAG,GAAE,MAAM,IAAuB,GACjC,OAAO,CAAC,OAAO,CAAC,CAalB;AAED;;;;;;;GAOG;AACH,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAAM,IAAuB,GACjC,OAAO,CAAC,OAAO,CAAC,CAWlB"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The durable record of what the lockfile-reconciliation trampoline actually did.
|
|
3
|
+
*
|
|
4
|
+
* `lisa apply` runs from a host project's `postinstall`, which means bun (and
|
|
5
|
+
* every other package manager) writes the lockfile BEFORE apply rewrites
|
|
6
|
+
* package.json. The detached trampoline exists to close that gap: it waits for
|
|
7
|
+
* the package manager to exit, re-applies, and regenerates the lockfiles.
|
|
8
|
+
*
|
|
9
|
+
* It runs with `stdio: "ignore"` — it has to, because it outlives the terminal
|
|
10
|
+
* that started it — and its regen step swallows failures on purpose, because a
|
|
11
|
+
* missing package-manager binary must never cascade into a failed install. Both
|
|
12
|
+
* are correct, and together they made the control indistinguishable from its own
|
|
13
|
+
* failure: a trampoline that never spawned, one that died on arrival, and one
|
|
14
|
+
* that ran and correctly did nothing all produced exactly the same evidence,
|
|
15
|
+
* which is none (CodySwannGT/lisa#2750). The only signal anyone could use was
|
|
16
|
+
* the apply receipt, and only because it happens to be written for an unrelated
|
|
17
|
+
* reason.
|
|
18
|
+
*
|
|
19
|
+
* So the trampoline now reports. The parent records `scheduled` before it
|
|
20
|
+
* spawns; the child records `started` as its first act, which is what separates
|
|
21
|
+
* "never spawned" from "spawned and died"; and the child records a terminal
|
|
22
|
+
* outcome naming what it regenerated or why it could not. A report still sitting
|
|
23
|
+
* at `scheduled` or `started` long after it was written is a reconciliation that
|
|
24
|
+
* never landed, and `lisa doctor` says so (see `cli/doctor-reconciliation`).
|
|
25
|
+
*
|
|
26
|
+
* Machine-local and gitignored for the same reason as the apply receipt: it
|
|
27
|
+
* describes this checkout's last install, not the project.
|
|
28
|
+
* @module core/reconciliation-report
|
|
29
|
+
*/
|
|
30
|
+
import { mkdir, rename, writeFile } from "node:fs/promises";
|
|
31
|
+
import * as path from "node:path";
|
|
32
|
+
import { readJsonOrNull } from "../utils/json-utils.js";
|
|
33
|
+
/** Directory-relative location of the report, for messages and gitignores. */
|
|
34
|
+
export const RECONCILIATION_REPORT_DISPLAY_PATH = ".lisa/reconciliation-report.json";
|
|
35
|
+
/**
|
|
36
|
+
* Report schema version. Bump only alongside a reader change — an unknown
|
|
37
|
+
* version is treated as no report at all rather than being misread.
|
|
38
|
+
*/
|
|
39
|
+
export const RECONCILIATION_REPORT_SCHEMA_VERSION = 1;
|
|
40
|
+
/** Outcomes that mean the reconciliation finished and nothing is outstanding. */
|
|
41
|
+
export const SETTLED_RECONCILIATION_OUTCOMES = ["not-needed", "regenerated"];
|
|
42
|
+
/** Outcomes that mean a child has not yet reported a terminal result. */
|
|
43
|
+
export const PENDING_RECONCILIATION_OUTCOMES = ["scheduled", "started"];
|
|
44
|
+
const KNOWN_OUTCOMES = [
|
|
45
|
+
"scheduled",
|
|
46
|
+
"started",
|
|
47
|
+
"spawn-failed",
|
|
48
|
+
"parent-wait-timed-out",
|
|
49
|
+
"not-needed",
|
|
50
|
+
"regenerated",
|
|
51
|
+
"failed",
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Narrow a persisted outcome, treating anything unrecognised as `scheduled`.
|
|
55
|
+
*
|
|
56
|
+
* Deliberately the most alarming reading rather than the most reassuring one: a
|
|
57
|
+
* report this build cannot interpret is exactly the case where claiming the
|
|
58
|
+
* reconciliation succeeded would restore the silence this file exists to end.
|
|
59
|
+
* @param value - Raw value from the report
|
|
60
|
+
* @returns A known outcome
|
|
61
|
+
*/
|
|
62
|
+
function toOutcome(value) {
|
|
63
|
+
return KNOWN_OUTCOMES.find(outcome => outcome === value) ?? "scheduled";
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Narrow the recorded package-manager list, dropping anything non-string.
|
|
67
|
+
* @param value - Raw value from the report
|
|
68
|
+
* @returns The recorded managers, or an empty list
|
|
69
|
+
*/
|
|
70
|
+
function toPackageManagers(value) {
|
|
71
|
+
if (!Array.isArray(value))
|
|
72
|
+
return [];
|
|
73
|
+
return value.filter((entry) => typeof entry === "string");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Resolve the single path every reader and writer uses.
|
|
77
|
+
* @param root - Project root
|
|
78
|
+
* @returns Absolute path to the report
|
|
79
|
+
*/
|
|
80
|
+
export function resolveReconciliationReportPath(root) {
|
|
81
|
+
return path.join(root, ".lisa", "reconciliation-report.json");
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Read the report, returning null when it is missing, unparseable, or written
|
|
85
|
+
* by a schema this build does not understand.
|
|
86
|
+
* @param root - Project root
|
|
87
|
+
* @returns The report, or null when there is no usable one
|
|
88
|
+
*/
|
|
89
|
+
export async function readReconciliationReport(root) {
|
|
90
|
+
const parsed = await readJsonOrNull(resolveReconciliationReportPath(root));
|
|
91
|
+
if (parsed?.schema_version !== RECONCILIATION_REPORT_SCHEMA_VERSION ||
|
|
92
|
+
typeof parsed.lisa_version !== "string" ||
|
|
93
|
+
typeof parsed.scheduled_at !== "string") {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
schema_version: parsed.schema_version,
|
|
98
|
+
lisa_version: parsed.lisa_version,
|
|
99
|
+
outcome: toOutcome(parsed.outcome),
|
|
100
|
+
scheduled_at: parsed.scheduled_at,
|
|
101
|
+
updated_at: typeof parsed.updated_at === "string"
|
|
102
|
+
? parsed.updated_at
|
|
103
|
+
: parsed.scheduled_at,
|
|
104
|
+
package_managers: toPackageManagers(parsed.package_managers),
|
|
105
|
+
detail: typeof parsed.detail === "string" ? parsed.detail : "",
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Write a report.
|
|
110
|
+
*
|
|
111
|
+
* Written atomically (temp file plus rename) so a reader never sees a partial
|
|
112
|
+
* document, and never throws: a report that could not be written must not turn
|
|
113
|
+
* a successful install into a failed one. That is the same trade the apply
|
|
114
|
+
* receipt makes, and for the same reason — the cost of a missing record is one
|
|
115
|
+
* doctor blind spot, the cost of throwing here is breaking installs.
|
|
116
|
+
* @param root - Project root being reconciled
|
|
117
|
+
* @param report - The record to persist
|
|
118
|
+
* @returns True when the report was persisted
|
|
119
|
+
*/
|
|
120
|
+
export async function writeReconciliationReport(root, report) {
|
|
121
|
+
const reportPath = resolveReconciliationReportPath(root);
|
|
122
|
+
try {
|
|
123
|
+
await mkdir(path.dirname(reportPath), { recursive: true });
|
|
124
|
+
const tempPath = `${reportPath}.tmp`;
|
|
125
|
+
await writeFile(tempPath, `${JSON.stringify(report, null, 2)}\n`, "utf8");
|
|
126
|
+
await rename(tempPath, reportPath);
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Record that a reconciliation is about to be spawned.
|
|
135
|
+
*
|
|
136
|
+
* Written by the PARENT apply, before the spawn, precisely so that a spawn which
|
|
137
|
+
* never produces a child still leaves a trace. Without this write there is
|
|
138
|
+
* nothing on disk at all when the trampoline fails to launch, which is one of
|
|
139
|
+
* the two failure modes #2750 could not tell apart.
|
|
140
|
+
* @param root - Project root being reconciled
|
|
141
|
+
* @param lisaVersion - Lisa version running the apply
|
|
142
|
+
* @param now - Clock, injectable for tests
|
|
143
|
+
* @returns True when the report was persisted
|
|
144
|
+
*/
|
|
145
|
+
export async function recordReconciliationScheduled(root, lisaVersion, now = () => new Date()) {
|
|
146
|
+
const timestamp = now().toISOString();
|
|
147
|
+
return writeReconciliationReport(root, {
|
|
148
|
+
schema_version: RECONCILIATION_REPORT_SCHEMA_VERSION,
|
|
149
|
+
lisa_version: lisaVersion,
|
|
150
|
+
outcome: "scheduled",
|
|
151
|
+
scheduled_at: timestamp,
|
|
152
|
+
updated_at: timestamp,
|
|
153
|
+
package_managers: [],
|
|
154
|
+
detail: "Lisa's apply changed package.json and scheduled a detached lockfile " +
|
|
155
|
+
"reconciliation. Nothing has reported back yet.",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Record that the parent apply could not spawn the reconciliation child.
|
|
160
|
+
* @param root - Project root being reconciled
|
|
161
|
+
* @param lisaVersion - Lisa version running the apply
|
|
162
|
+
* @param message - The spawn error, verbatim
|
|
163
|
+
* @param now - Clock, injectable for tests
|
|
164
|
+
* @returns True when the report was persisted
|
|
165
|
+
*/
|
|
166
|
+
export async function recordReconciliationSpawnFailure(root, lisaVersion, message, now = () => new Date()) {
|
|
167
|
+
const timestamp = now().toISOString();
|
|
168
|
+
return writeReconciliationReport(root, {
|
|
169
|
+
schema_version: RECONCILIATION_REPORT_SCHEMA_VERSION,
|
|
170
|
+
lisa_version: lisaVersion,
|
|
171
|
+
outcome: "spawn-failed",
|
|
172
|
+
scheduled_at: timestamp,
|
|
173
|
+
updated_at: timestamp,
|
|
174
|
+
package_managers: [],
|
|
175
|
+
detail: `Could not spawn the lockfile reconciliation: ${message}`,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=reconciliation-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciliation-report.js","sourceRoot":"","sources":["../../src/core/reconciliation-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kCAAkC,GAC7C,kCAAkC,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC;AA2BtD,iFAAiF;AACjF,MAAM,CAAC,MAAM,+BAA+B,GAC1C,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;AAEhC,yEAAyE;AACzE,MAAM,CAAC,MAAM,+BAA+B,GAC1C,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAE3B,MAAM,cAAc,GAAqC;IACvD,WAAW;IACX,SAAS;IACT,cAAc;IACd,uBAAuB;IACvB,YAAY;IACZ,aAAa;IACb,QAAQ;CACT,CAAC;AAmBF;;;;;;;;GAQG;AACH,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,CAAC,IAAI,WAAW,CAAC;AAC1E,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,KAAc;IACvC,IAAI,CAAC,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E,oCAAoC;QACpD,YAAY,EAAE,WAAW;QACzB,OAAO,EAAE,cAAc;QACvB,YAAY,EAAE,SAAS;QACvB,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,EAAE;QACpB,MAAM,EAAE,gDAAgD,OAAO,EAAE;KAClE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA46EpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA46EpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CA6tPjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** Generated by scripts/generate-upstream-evidence-manifest.mjs. Do not edit. */
|
|
3
3
|
export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
|
|
4
4
|
"all/copy-contents/.gitattributes": "b23282f829ee514a25d8e334b31597851c1d89c1c58f119787eb4c99ecdc8407",
|
|
5
|
-
"all/copy-contents/gitignore": "
|
|
5
|
+
"all/copy-contents/gitignore": "3c3ce0693a6bf0531c7e080aef16103c5cfa6aeb0f897ffaba730966c103ffb6",
|
|
6
6
|
"all/copy-overwrite/scripts/check-conflict-markers.mjs": "d7a689bcc122af7f38d1c536924fc2f3dcb503b09658ffc6035ccbe720d14d6b",
|
|
7
7
|
"all/copy-overwrite/scripts/check-state-classification.mjs": "a72910f9885629dd6d8a739b900f5603e4b53d68ece64100a2a5647016b58e1e",
|
|
8
8
|
"all/copy-overwrite/scripts/lib/bounded-spawn.mjs": "72e277ada531914d7bc51c3cb8dc67b8881aa817d96fa2f9f4d81668a3d3bbc1",
|
|
@@ -7241,6 +7241,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
7241
7241
|
"src/cli/doctor-readiness-workflows.ts": true,
|
|
7242
7242
|
"src/cli/doctor-readiness-workspaces.ts": true,
|
|
7243
7243
|
"src/cli/doctor-readiness.ts": true,
|
|
7244
|
+
"src/cli/doctor-reconciliation.ts": true,
|
|
7244
7245
|
"src/cli/doctor-render.ts": true,
|
|
7245
7246
|
"src/cli/doctor-reusable-workflow-refs.ts": true,
|
|
7246
7247
|
"src/cli/doctor-serialize-legs-contract.ts": true,
|
|
@@ -7454,6 +7455,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
7454
7455
|
"src/core/override-floors.ts": true,
|
|
7455
7456
|
"src/core/project-config-kane.ts": true,
|
|
7456
7457
|
"src/core/project-config.ts": true,
|
|
7458
|
+
"src/core/reconciliation-report.ts": true,
|
|
7457
7459
|
"src/core/self-apply.ts": true,
|
|
7458
7460
|
"src/core/sonar-integration.ts": true,
|
|
7459
7461
|
"src/core/template-ownership.ts": true,
|
|
@@ -7584,6 +7586,8 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
7584
7586
|
"src/utils/package-manager-detect.ts": true,
|
|
7585
7587
|
"src/utils/path-utils.ts": true,
|
|
7586
7588
|
"src/utils/pm-env.ts": true,
|
|
7589
|
+
"src/utils/postinstall-trampoline-report-source.ts": true,
|
|
7590
|
+
"src/utils/postinstall-trampoline-source.ts": true,
|
|
7587
7591
|
"src/utils/postinstall-trampoline.ts": true,
|
|
7588
7592
|
"src/utils/usage-accounting-rollup.ts": true,
|
|
7589
7593
|
"src/utils/usage-accounting.ts": true,
|
|
@@ -7790,6 +7794,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
7790
7794
|
"tests/integration/playwright-caller-template.test.ts": true,
|
|
7791
7795
|
"tests/integration/playwright-e2e-workflow.test.ts": true,
|
|
7792
7796
|
"tests/integration/postinstall-safe-reports-stale-root-configs.test.ts": true,
|
|
7797
|
+
"tests/integration/postinstall-trampoline-regen.test.ts": true,
|
|
7793
7798
|
"tests/integration/pre-tool-refusal-equivalence.test.ts": true,
|
|
7794
7799
|
"tests/integration/pre-tool-refusal-inventory.test.ts": true,
|
|
7795
7800
|
"tests/integration/pre-tool-refusal-scripts-resolve-gates.test.ts": true,
|
|
@@ -7902,6 +7907,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
7902
7907
|
"tests/unit/cli/doctor-readiness-tracking.test.ts": true,
|
|
7903
7908
|
"tests/unit/cli/doctor-readiness-workflows.test.ts": true,
|
|
7904
7909
|
"tests/unit/cli/doctor-readiness.test.ts": true,
|
|
7910
|
+
"tests/unit/cli/doctor-reconciliation.test.ts": true,
|
|
7905
7911
|
"tests/unit/cli/doctor-render.test.ts": true,
|
|
7906
7912
|
"tests/unit/cli/doctor-reusable-workflow-refs.test.ts": true,
|
|
7907
7913
|
"tests/unit/cli/doctor-serialize-legs-contract.test.ts": true,
|