@codyswann/lisa 4.24.1 → 4.25.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.
Files changed (89) hide show
  1. package/all/copy-overwrite/scripts/check-orphaned-branches.mjs +218 -0
  2. package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +218 -82
  3. package/all/copy-overwrite/scripts/lisa-reconcile-policy.mjs +85 -12
  4. package/all/copy-overwrite/scripts/lisa-work-item.mjs +74 -15
  5. package/dist/cli/ui-config-write-persistence.d.ts +12 -2
  6. package/dist/cli/ui-config-write-persistence.d.ts.map +1 -1
  7. package/dist/cli/ui-config-write-persistence.js +7 -3
  8. package/dist/cli/ui-config-write-persistence.js.map +1 -1
  9. package/dist/cli/ui-config-write.d.ts +1 -1
  10. package/dist/cli/ui-config-write.d.ts.map +1 -1
  11. package/dist/cli/ui-config-write.js +62 -6
  12. package/dist/cli/ui-config-write.js.map +1 -1
  13. package/dist/codex/scripts/block-no-verify.sh +134 -37
  14. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  15. package/dist/core/lisa-owned-hash-ledger.js +16 -0
  16. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  17. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  18. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  19. package/dist/core/upstream-evidence-manifest.js +14 -10
  20. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  21. package/dist/opencode/plugin-templates/block-no-verify.sh +218 -82
  22. package/package.json +3 -3
  23. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  25. package/plugins/lisa/.codex-plugin/skills/lisa-git-submit-pr/SKILL.md +12 -0
  26. package/plugins/lisa/hooks/block-no-verify.agy.sh +134 -37
  27. package/plugins/lisa/hooks/block-no-verify.sh +218 -82
  28. package/plugins/lisa/skills/lisa-git-submit-pr/SKILL.md +12 -0
  29. package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +134 -37
  30. package/plugins/lisa-agy/plugin.json +1 -1
  31. package/plugins/lisa-agy/skills/lisa-git-submit-pr/SKILL.md +12 -0
  32. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  35. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-copilot/hooks/block-no-verify.sh +218 -82
  39. package/plugins/lisa-copilot/skills/lisa-git-submit-pr/SKILL.md +12 -0
  40. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-cursor/hooks/block-no-verify.sh +218 -82
  42. package/plugins/lisa-cursor/skills/lisa-git-submit-pr/SKILL.md +12 -0
  43. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  45. package/plugins/lisa-expo-agy/plugin.json +1 -1
  46. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  50. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  51. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  56. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  60. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  61. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  65. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  66. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails-agy/plugin.json +1 -1
  71. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  76. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  80. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  81. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  83. package/plugins/src/base/hooks/block-no-verify.agy.sh +134 -37
  84. package/plugins/src/base/hooks/block-no-verify.sh +218 -82
  85. package/plugins/src/base/skills/lisa-git-submit-pr/SKILL.md +12 -0
  86. package/scripts/check-security-floors.mjs +290 -31
  87. package/scripts/two-channel-couplings.json +1 -1
  88. package/typescript/copy-overwrite/.prettierignore +1 -0
  89. package/ui/README.md +30 -2
@@ -673,8 +673,10 @@ export function readLivePolicy({ repo, gh }) {
673
673
  * One record per declared (ruleset, context) pair, from `declaredChecks`.
674
674
  * Supplied, it is what the comparison is made of; absent, the name-keyed
675
675
  * `homes`/`pins` projection is reconstituted into equivalent records.
676
- * @param {Array<{context:string, ruleset?:string}>} [options.awaited]
677
- * Awaited declarations, preserving their ruleset identity.
676
+ * @param {Array<{context:string, ruleset?:string, integration_id?:number}>} [options.awaited]
677
+ * Awaited declarations, preserving their ruleset identity and declared pin.
678
+ * A declaration carrying a ruleset becomes a comparison record of its own,
679
+ * unless `records` already declares that same (ruleset, context) pair.
678
680
  * @returns {ContextDrift} Three sets, plus the unsatisfied records.
679
681
  */
680
682
  export function reconcileContexts({
@@ -711,6 +713,37 @@ export function reconcileContexts({
711
713
  if (!byContext.has(record.context)) byContext.set(record.context, []);
712
714
  byContext.get(record.context).push(record);
713
715
  }
716
+ // An awaited declaration names a ruleset too — the home `awaitedHome`
717
+ // resolved, which is where its repair will be written. It has to reach the
718
+ // records the comparison is made of for exactly the reason a configured
719
+ // record does: without it, an awaited context required in `release` answered
720
+ // for the requirement `base` was missing, the pair read as matched, and the
721
+ // repair that would have added it was never planned.
722
+ for (const record of awaitedDeclarations) {
723
+ if (!declaredNames.has(record?.context)) continue;
724
+ // No home could be resolved — an ambiguous repository, or an explicit
725
+ // `--ruleset` naming one that is not here. Name-only matching is retained
726
+ // there on purpose: tightening would report drift against a ruleset nobody
727
+ // chose, and the repair has no place to write it either.
728
+ if (record.ruleset === undefined || record.ruleset === null) continue;
729
+ if (!byContext.has(record.context)) byContext.set(record.context, []);
730
+ const declarationsFor = byContext.get(record.context);
731
+ // An explicit `requiredChecks` declaration for the same pair is the one the
732
+ // project wrote down, and it stays in charge — including of its pin. Adding
733
+ // the awaited record beside it would state two expectations for one
734
+ // (ruleset, context) pair, and a pinned declaration and an unpinned one can
735
+ // never both be satisfied: the pair would be permanently missing.
736
+ if (declarationsFor.some(entry => entry.ruleset === record.ruleset)) {
737
+ continue;
738
+ }
739
+ declarationsFor.push({
740
+ context: record.context,
741
+ ruleset: record.ruleset,
742
+ ...(Number.isInteger(record.integration_id)
743
+ ? { integration_id: record.integration_id }
744
+ : {}),
745
+ });
746
+ }
714
747
  // A gate-derived context names no ruleset and no app, so it keeps matching on
715
748
  // name against any active ruleset; nothing is tightened that was never stated.
716
749
  const declarations = [...declaredNames]
@@ -1243,7 +1276,7 @@ function planContextRepairs({
1243
1276
  pins,
1244
1277
  homes,
1245
1278
  }) {
1246
- /** @type {Map<string, {add: string[], remove: string[], pins: Record<string, number>, unpinned: Set<string>}>} */
1279
+ /** @type {Map<string, {add: string[], remove: string[], pins: Record<string, number>, unpinned: Set<string>, awaited: Set<string>}>} */
1247
1280
  const groups = new Map();
1248
1281
  const group = name => {
1249
1282
  if (!groups.has(name)) {
@@ -1252,11 +1285,26 @@ function planContextRepairs({
1252
1285
  remove: [],
1253
1286
  pins: {},
1254
1287
  unpinned: new Set(),
1288
+ // Which of THIS ruleset's additions are awaited. A declaration that
1289
+ // resolved a home of its own is matched by name below; this set is for
1290
+ // the ones that did not, whose home only becomes knowable here.
1291
+ awaited: new Set(),
1255
1292
  });
1256
1293
  }
1257
1294
  return groups.get(name);
1258
1295
  };
1259
1296
  const problems = [];
1297
+ // An awaited declaration with no ruleset resolved no home of its own, yet it
1298
+ // is still routed somewhere — through `homes`, or through the fallback. The
1299
+ // payload matched awaited records against the target by their OWN ruleset,
1300
+ // so these were dropped from the awaited list and written with the Actions
1301
+ // pin: the one writer that can never post an external check, which leaves the
1302
+ // repaired rule permanently unsatisfiable. Record where each one lands.
1303
+ const unscopedAwaited = new Set(
1304
+ awaited
1305
+ .filter(record => record.ruleset === undefined || record.ruleset === null)
1306
+ .map(record => record.context)
1307
+ );
1260
1308
 
1261
1309
  // A removal goes to the ruleset that actually requires it. That ruleset is
1262
1310
  // reported alongside every EXTRA context precisely so this is knowable.
@@ -1281,6 +1329,7 @@ function planContextRepairs({
1281
1329
  const target = home ? group(home) : null;
1282
1330
  if (target) {
1283
1331
  target.add.push(context);
1332
+ if (unscopedAwaited.has(context)) target.awaited.add(context);
1284
1333
  // A declared record is authoritative about its own pin — INCLUDING the
1285
1334
  // absence of one. `pins` is name-keyed and last-write-wins, so if `base`
1286
1335
  // declares a context unpinned and `release` pins it to app 99, the
@@ -1303,11 +1352,16 @@ function planContextRepairs({
1303
1352
  problems.push(fallback.problem);
1304
1353
  continue;
1305
1354
  }
1306
- group(fallback.ruleset.name).add.push(context);
1355
+ const fallbackGroup = group(fallback.ruleset.name);
1356
+ fallbackGroup.add.push(context);
1357
+ if (unscopedAwaited.has(context)) fallbackGroup.awaited.add(context);
1307
1358
  }
1308
1359
 
1309
1360
  const actions = [];
1310
- for (const [name, { add, remove, pins: groupPins, unpinned }] of groups) {
1361
+ for (const [
1362
+ name,
1363
+ { add, remove, pins: groupPins, unpinned, awaited: routedAwaited },
1364
+ ] of groups) {
1311
1365
  const ruleset = (live.rulesets ?? []).find(entry => entry?.name === name);
1312
1366
  if (!ruleset) {
1313
1367
  actions.push({
@@ -1329,9 +1383,17 @@ function planContextRepairs({
1329
1383
  payload: rulesetPayload(ruleset, {
1330
1384
  add,
1331
1385
  remove,
1332
- awaited: awaited
1333
- .filter(record => record.ruleset === name)
1334
- .map(record => record.context),
1386
+ // Both halves of the same question — which of this ruleset's additions
1387
+ // an external app posts. A declaration that named this ruleset answers
1388
+ // it directly; one that named none was answered by the routing above.
1389
+ awaited: [
1390
+ ...new Set([
1391
+ ...awaited
1392
+ .filter(record => record.ruleset === name)
1393
+ .map(record => record.context),
1394
+ ...routedAwaited,
1395
+ ]),
1396
+ ],
1335
1397
  // The name-keyed map still carries AWAITED pins, which are declared per
1336
1398
  // context and have no ruleset of their own, so it stays the base. A
1337
1399
  // declared record then overrides it — with its pin, or by deleting the
@@ -1478,13 +1540,24 @@ export function reconcile({
1478
1540
 
1479
1541
  // The structured declaration travels through the comparison, so a pinned
1480
1542
  // context is not reported as satisfied by an unpinned one somewhere else.
1481
- // Only `configured` is passed: it is what the project actually declared. The
1482
- // awaited-context homes below are a routing hint for repairs, not a stated
1483
- // expectation, and treating them as one would report drift nobody declared.
1543
+ // The awaited-context home is part of that structure, not a repair-only
1544
+ // routing hint: it is the ruleset this run WILL write the context to, so a
1545
+ // comparison that ignored it reported the requirement satisfied by whichever
1546
+ // other ruleset happened to carry the name — and then planned no repair for
1547
+ // the one that lacked it. Where no home resolves, nothing is asserted and the
1548
+ // context keeps matching on name alone, so no drift is invented either.
1484
1549
  const resolvedAwaitedHome = awaitedHome(live, rulesetName);
1550
+ const declaredAwaitedPins = awaitedPins(gates, moment);
1551
+ // The declared pin travels with the declaration. Once the awaited home is a
1552
+ // comparison record, that record is what the repair reads its pin off — so
1553
+ // omitting it here would have the repair write the context unpinned and
1554
+ // silently discard the one app the project said may post it.
1485
1555
  const awaitedDeclarations = awaited.map(context => ({
1486
1556
  context,
1487
1557
  ...(resolvedAwaitedHome === null ? {} : { ruleset: resolvedAwaitedHome }),
1558
+ ...(Object.hasOwn(declaredAwaitedPins, context)
1559
+ ? { integration_id: declaredAwaitedPins[context] }
1560
+ : {}),
1488
1561
  }));
1489
1562
  const contexts = reconcileContexts({
1490
1563
  declared,
@@ -1514,7 +1587,7 @@ export function reconcile({
1514
1587
  prune,
1515
1588
  rulesetName,
1516
1589
  awaited: awaitedDeclarations,
1517
- pins: { ...configured.pins, ...awaitedPins(gates, moment) },
1590
+ pins: { ...configured.pins, ...declaredAwaitedPins },
1518
1591
  // An awaited context has no ruleset in its declaration — it is declared
1519
1592
  // on a GATE. Its home defaults to the ruleset Lisa generates from
1520
1593
  // config, which is where the applier writes it, so the two writers
@@ -2508,30 +2508,89 @@ function option(args, name, envName) {
2508
2508
  }
2509
2509
 
2510
2510
  /**
2511
- * Resolve the canonical pull-request option without letting an environment
2512
- * fallback outrank either explicit alias.
2511
+ * Read one explicit pull-request alias, refusing a present-but-empty flag.
2512
+ *
2513
+ * Written as "absent, or a usable value" — never "absent, or absent-looking".
2514
+ * The shared `option` helper treats a valueless flag as absent so a good value
2515
+ * in the environment still wins, which is right for `--ref` and wrong here: an
2516
+ * operator who typed `--pr-url` has NAMED the evidence, and quietly answering
2517
+ * with `LISA_PR_URL` writes a backlink to whatever pull request the surrounding
2518
+ * automation happened to export. Measured before this refusal existed:
2519
+ * `backlink --ref <item> --pr-url --json` with `LISA_PR_URL` set to a different
2520
+ * pull request wrote the managed comment pointing at the environment's pull
2521
+ * request and exited 0, so the traceability gate went green having proved the
2522
+ * work item was linked to the wrong change.
2523
+ *
2524
+ * A present flag whose value is empty, whitespace, or another option is the
2525
+ * same typo with three spellings, and all three are refused rather than
2526
+ * resolved — a refusal costs one re-run, and the alternative is evidence
2527
+ * nobody chose.
2528
+ * @param {string[]} args Command arguments.
2529
+ * @param {string} name Alias to read, including leading dashes.
2530
+ * @returns {string | undefined} The supplied value, or undefined when absent.
2531
+ */
2532
+ function explicitPullRequestUrl(args, name) {
2533
+ const index = args.indexOf(name);
2534
+ if (index < 0) return undefined;
2535
+ const value = args[index + 1];
2536
+ if (value === undefined || value.startsWith("-") || value.trim() === "") {
2537
+ throw new TrackingError(
2538
+ `${name} was supplied without a pull-request URL. Pass ` +
2539
+ `${name} https://github.com/owner/repo/pull/123, or omit the flag ` +
2540
+ `entirely to fall back to LISA_PR_URL`
2541
+ );
2542
+ }
2543
+ return value;
2544
+ }
2545
+
2546
+ /**
2547
+ * Resolve the canonical pull-request URL for backlink, validation and
2548
+ * completion, without letting an environment fallback outrank either alias.
2549
+ *
2550
+ * Two rules, and both exist because the backlink is how completion is PROVEN.
2513
2551
  *
2514
- * Resolving `--pr-url` with an environment fallback before inspecting `--url`
2515
- * lets `LISA_PR_URL` hide an explicit alias. Conflicting explicit aliases are
2516
- * refused instead of choosing completion evidence by argument order.
2552
+ * Precedence: `LISA_PR_URL` is read only when neither explicit alias is
2553
+ * present. Resolving `--pr-url` with an environment fallback before inspecting
2554
+ * `--url` let the environment hide an explicit alias.
2555
+ *
2556
+ * Canonicalisation: the value returned is the parsed canonical URL, not the
2557
+ * caller's string. `assertBacklink` compares URLs by equality — token equality
2558
+ * in `textContainsBacklink`, `===` on both native link fields — and the
2559
+ * completion path already canonicalises through `mergedPullRequestEvidence`.
2560
+ * A backlink WRITTEN from the raw string therefore did not match the same pull
2561
+ * request READ back a moment later if the two spellings differed by a trailing
2562
+ * slash, and the failure surfaces as "no verified backlink" on work that is
2563
+ * genuinely linked. Canonicalising here puts one spelling on both sides. It
2564
+ * also means a value that is not a GitHub pull-request URL at all is refused
2565
+ * where it is supplied, rather than written into the managed comment and
2566
+ * discovered later by the check it was supposed to satisfy.
2567
+ *
2568
+ * Conflicting explicit aliases are refused on the RAW strings, so two
2569
+ * spellings of one pull request conflict just as two different pull requests
2570
+ * do. The looser rule would have to canonicalise first and then accept, and
2571
+ * accepting evidence the caller spelled two ways is the direction that reports
2572
+ * unproven work as proven.
2573
+ *
2574
+ * An empty `LISA_PR_URL` is absent, unlike an empty `--pr-url`: exporting an
2575
+ * empty variable is how a shell says "unset" and no operator typed it, so the
2576
+ * caller still gets the command's own "requires --pr-url <url>" refusal
2577
+ * instead of a parse error about a string nobody wrote.
2517
2578
  * @param {string[]} args Command arguments.
2518
- * @returns {string | undefined} The explicit or environment URL.
2579
+ * @returns {string | undefined} The canonical URL, or undefined when none.
2519
2580
  */
2520
2581
  function pullRequestUrlOption(args) {
2521
- const explicit = name => {
2522
- const index = args.indexOf(name);
2523
- if (index < 0) return undefined;
2524
- const value = args[index + 1];
2525
- return value === undefined || value.startsWith("-") ? undefined : value;
2526
- };
2527
- const canonical = explicit("--pr-url");
2528
- const alias = explicit("--url");
2582
+ const canonical = explicitPullRequestUrl(args, "--pr-url");
2583
+ const alias = explicitPullRequestUrl(args, "--url");
2529
2584
  if (canonical && alias && canonical !== alias) {
2530
2585
  throw new TrackingError(
2531
2586
  "Conflicting pull-request evidence: --pr-url and --url name different values"
2532
2587
  );
2533
2588
  }
2534
- return canonical ?? alias ?? process.env.LISA_PR_URL;
2589
+ const supplied = canonical ?? alias;
2590
+ if (supplied !== undefined) return githubPullRequestUrl(supplied).url;
2591
+ const fromEnvironment = String(process.env.LISA_PR_URL ?? "").trim();
2592
+ if (fromEnvironment === "") return undefined;
2593
+ return githubPullRequestUrl(fromEnvironment).url;
2535
2594
  }
2536
2595
 
2537
2596
  function bind(args) {
@@ -8,12 +8,22 @@ export interface RoutedConfigChanges {
8
8
  }
9
9
  /** Callback that enforces registry validators against the prospective config. */
10
10
  export type ValidateCommittedConfig = (config: JsonObject) => void;
11
+ /**
12
+ * Follow-up work run under the same serialization as the write it follows.
13
+ *
14
+ * Config propagation reads and rewrites both config files, so running it after
15
+ * the lock is released would let a second request's snapshot interleave with
16
+ * this request's propagation. It runs inside the transaction instead, and its
17
+ * result becomes the caller's config view.
18
+ */
19
+ export type AfterPersist = (projectRoot: string) => Promise<JsonObject>;
11
20
  /**
12
21
  * Persist one pre-classified request under the project write queue.
13
22
  * @param destDir - Project root containing the two fixed config filenames
14
23
  * @param changes - Changes split by committed versus local ownership
15
24
  * @param validateCommitted - Registry validation applied before either write
16
- * @returns Prospective committed config only; local values are never echoed
25
+ * @param afterPersist - Optional in-transaction follow-up supplying the result
26
+ * @returns The follow-up's config view, or the prospective committed config
17
27
  */
18
- export declare function persistRoutedConfigChanges(destDir: string, changes: RoutedConfigChanges, validateCommitted: ValidateCommittedConfig): Promise<JsonObject>;
28
+ export declare function persistRoutedConfigChanges(destDir: string, changes: RoutedConfigChanges, validateCommitted: ValidateCommittedConfig, afterPersist?: AfterPersist): Promise<JsonObject>;
19
29
  //# sourceMappingURL=ui-config-write-persistence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-config-write-persistence.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write-persistence.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA0BlE,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IACxD,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACrD;AAoBD,iFAAiF;AACjF,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;AAEnE;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,mBAAmB,EAC5B,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,UAAU,CAAC,CAwCrB"}
1
+ {"version":3,"file":"ui-config-write-persistence.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write-persistence.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA0BlE,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IACxD,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACrD;AAoBD,iFAAiF;AACjF,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAExE;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,mBAAmB,EAC5B,iBAAiB,EAAE,uBAAuB,EAC1C,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,UAAU,CAAC,CA2CrB"}
@@ -35,9 +35,10 @@ const configWriteQueues = new Map();
35
35
  * @param destDir - Project root containing the two fixed config filenames
36
36
  * @param changes - Changes split by committed versus local ownership
37
37
  * @param validateCommitted - Registry validation applied before either write
38
- * @returns Prospective committed config only; local values are never echoed
38
+ * @param afterPersist - Optional in-transaction follow-up supplying the result
39
+ * @returns The follow-up's config view, or the prospective committed config
39
40
  */
40
- export async function persistRoutedConfigChanges(destDir, changes, validateCommitted) {
41
+ export async function persistRoutedConfigChanges(destDir, changes, validateCommitted, afterPersist) {
41
42
  const projectRoot = await requireCanonicalProjectRoot(destDir);
42
43
  const lockTarget = await resolveConfigLockTarget(projectRoot.path);
43
44
  return await withConfigWriteLock(projectRoot.path, async () => await withFileTargetLock(lockTarget, async () => {
@@ -61,7 +62,10 @@ export async function persistRoutedConfigChanges(destDir, changes, validateCommi
61
62
  await assertProjectRootIdentity(projectRoot);
62
63
  await publishPrepared(local, true, projectRoot);
63
64
  await assertProjectRootIdentity(projectRoot);
64
- return committed.document;
65
+ if (afterPersist === undefined) {
66
+ return committed.document;
67
+ }
68
+ return await afterPersist(projectRoot.path);
65
69
  }));
66
70
  }
67
71
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ui-config-write-persistence.js","sourceRoot":"","sources":["../../src/cli/ui-config-write-persistence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,GAET,MAAM,kBAAkB,CAAC;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AAC,WAAW,CAAC,CAAC;YAC7C,MAAM,OAAO,GAAG,MAAM,kBAAkB,CACtC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAC1B,WAAW,CACZ,CAAC;YACF,IACE,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAClD,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,QAAQ,CAAC,IAAI,EACvC,CAAC;gBACD,MAAM,IAAI,KAAK,CACb,GAAG,QAAQ,CAAC,QAAQ,CAAC,QAAQ,oCAAoC,CAClE,CAAC;YACJ,CAAC;YACD,MAAM,yBAAyB,CAAC,WAAW,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC,CAAC;IACH,MAAM,yBAAyB,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;GAKG;AACH,SAAS,SAAS,CAChB,OAA2B,EAC3B,QAA4B;IAE5B,IAAI,OAAO,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,OAAO,KAAK,QAAQ,CAAC;IAC9B,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import * as http from "node:http";
6
6
  /**
7
- * Serve the same-origin committed-config write endpoint.
7
+ * Serve the same-origin config write endpoint.
8
8
  * @param request - Incoming loopback request
9
9
  * @param response - Response associated with the request
10
10
  * @param destDir - Project root whose committed config is written
@@ -1 +1 @@
1
- {"version":3,"file":"ui-config-write.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAqQlC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,eAAe,EAC7B,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,OAAO,EAAE,MAAM,GACd,IAAI,CA0DN"}
1
+ {"version":3,"file":"ui-config-write.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAuUlC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,eAAe,EAC7B,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,OAAO,EAAE,MAAM,GACd,IAAI,CA8DN"}
@@ -1,5 +1,7 @@
1
1
  import { getAtPath, isJsonObject, } from "../sync/json-path.js";
2
+ import { runConfigSync } from "../sync/config-sync.js";
2
3
  import { SYNC_REGISTRY } from "../sync/registry.js";
4
+ import { readConfinedMergedConfig } from "./ui-confined-project-read.js";
3
5
  import { persistRoutedConfigChanges, } from "./ui-config-write-persistence.js";
4
6
  import { parseUnambiguousJson } from "./ui-config-write-document.js";
5
7
  const JSON_CONTENT_TYPE = "application/json; charset=utf-8";
@@ -14,6 +16,16 @@ const LOCAL_CONFIG_KEYS = new Set([
14
16
  /** Error raised for malformed request bodies that should return 400. */
15
17
  class RequestBodyError extends Error {
16
18
  }
19
+ /**
20
+ * Error raised when the config landed but propagation or re-read did not.
21
+ *
22
+ * The write is already durable at this point, so the endpoint must not claim
23
+ * the write failed. It reports the propagation failure instead, because a
24
+ * silent success here would leave exactly the config-versus-artifact drift the
25
+ * in-band sync exists to remove.
26
+ */
27
+ class ConfigPropagationError extends Error {
28
+ }
17
29
  /**
18
30
  * Restrict loopback origins to the authority advertised by `lisa ui`.
19
31
  * @param host - Origin URL host
@@ -226,7 +238,52 @@ function decodeRequestBody(bytes) {
226
238
  }
227
239
  }
228
240
  /**
229
- * Serve the same-origin committed-config write endpoint.
241
+ * Propagate a landed write to the mirrored artifacts and re-read the result.
242
+ *
243
+ * The write and its propagation are one user action: a Save that updated
244
+ * `.lisa.config.json` while leaving `vitest.thresholds.json` behind would leave
245
+ * the console claiming one floor while CI enforced another. `runConfigSync`
246
+ * only rewrites artifact files that already exist, so this never scaffolds an
247
+ * artifact a project did not ask for.
248
+ *
249
+ * The merged config is read back from disk afterwards rather than derived from
250
+ * the prospective document, so the response describes what actually landed —
251
+ * including any value sync itself populated — instead of what the request
252
+ * assumed.
253
+ * @param destDir - Project root whose config was just written
254
+ * @returns Committed-plus-local merged config, with local winning per key
255
+ */
256
+ async function propagateAndReadMergedConfig(destDir) {
257
+ try {
258
+ await runConfigSync(destDir);
259
+ return await readConfinedMergedConfig(destDir);
260
+ }
261
+ catch (error) {
262
+ throw new ConfigPropagationError(error instanceof Error ? error.message : "Config propagation failed");
263
+ }
264
+ }
265
+ /**
266
+ * Choose an error message that never misreports which stage actually failed.
267
+ *
268
+ * A propagation failure happens after the config is already durable, so
269
+ * reporting it as a failed write would tell the operator to retry a write that
270
+ * already succeeded.
271
+ * @param error - Rejected value from the request pipeline
272
+ * @param isRequestBodyError - Whether the request itself was malformed
273
+ * @param isPropagationError - Whether the landed write failed to propagate
274
+ * @returns Operator-readable message for the response body
275
+ */
276
+ function propagationSafeMessage(error, isRequestBodyError, isPropagationError) {
277
+ if (isRequestBodyError && error instanceof Error) {
278
+ return error.message;
279
+ }
280
+ if (isPropagationError && error instanceof Error) {
281
+ return `Lisa config was saved, but updating the files it feeds failed: ${error.message}`;
282
+ }
283
+ return "Unable to write Lisa config";
284
+ }
285
+ /**
286
+ * Serve the same-origin config write endpoint.
230
287
  * @param request - Incoming loopback request
231
288
  * @param response - Response associated with the request
232
289
  * @param destDir - Project root whose committed config is written
@@ -262,23 +319,22 @@ export function serveConfigWrite(request, response, destDir) {
262
319
  response.end(JSON.stringify({ error: parsed.error }));
263
320
  return;
264
321
  }
265
- const committed = await persistRoutedConfigChanges(destDir, parsed.changes, validateProspectiveConfig);
322
+ const config = await persistRoutedConfigChanges(destDir, parsed.changes, validateProspectiveConfig, propagateAndReadMergedConfig);
266
323
  response.writeHead(200, {
267
324
  "cache-control": NO_STORE,
268
325
  "content-type": JSON_CONTENT_TYPE,
269
326
  });
270
- response.end(JSON.stringify({ ok: true, config: committed }));
327
+ response.end(JSON.stringify({ ok: true, config }));
271
328
  })
272
329
  .catch(error => {
273
330
  const isRequestBodyError = error instanceof RequestBodyError;
331
+ const isPropagationError = error instanceof ConfigPropagationError;
274
332
  response.writeHead(isRequestBodyError ? 400 : 500, {
275
333
  "cache-control": NO_STORE,
276
334
  "content-type": JSON_CONTENT_TYPE,
277
335
  });
278
336
  response.end(JSON.stringify({
279
- error: isRequestBodyError
280
- ? error.message
281
- : "Unable to write Lisa config",
337
+ error: propagationSafeMessage(error, isRequestBodyError, isPropagationError),
282
338
  }));
283
339
  });
284
340
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ui-config-write.js","sourceRoot":"","sources":["../../src/cli/ui-config-write.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,YAAY,GAGb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,0BAA0B,GAE3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,iBAAiB,GAAG,iCAAiC,CAAC;AAC5D,MAAM,sBAAsB,GAAG,GAAG,GAAG,IAAI,CAAC;AAC1C,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;AACtD,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IACrD,iBAAiB;IACjB,iBAAiB;IACjB,iCAAiC;CAClC,CAAC,CAAC;AAEH,wEAAwE;AACxE,MAAM,gBAAiB,SAAQ,KAAK;CAAG;AAEvC;;;;GAIG;AACH,SAAS,cAAc,CAAC,IAAY;IAClC,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC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