@deskwork/core 0.45.2 → 0.46.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/dist/config.d.ts +14 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +43 -12
- package/dist/config.js.map +1 -1
- package/dist/content-index.d.ts +25 -0
- package/dist/content-index.d.ts.map +1 -1
- package/dist/content-index.js +142 -15
- package/dist/content-index.js.map +1 -1
- package/dist/doctor/index.d.ts +3 -0
- package/dist/doctor/index.d.ts.map +1 -1
- package/dist/doctor/index.js +3 -0
- package/dist/doctor/index.js.map +1 -1
- package/dist/doctor/legacy-config.d.ts +98 -0
- package/dist/doctor/legacy-config.d.ts.map +1 -0
- package/dist/doctor/legacy-config.js +174 -0
- package/dist/doctor/legacy-config.js.map +1 -0
- package/dist/doctor/project-scope-gate.d.ts +12 -21
- package/dist/doctor/project-scope-gate.d.ts.map +1 -1
- package/dist/doctor/project-scope-gate.js +13 -25
- package/dist/doctor/project-scope-gate.js.map +1 -1
- package/dist/doctor/repair.d.ts +11 -0
- package/dist/doctor/repair.d.ts.map +1 -1
- package/dist/doctor/repair.js +10 -89
- package/dist/doctor/repair.js.map +1 -1
- package/dist/doctor/rules/duplicate-id.d.ts +7 -2
- package/dist/doctor/rules/duplicate-id.d.ts.map +1 -1
- package/dist/doctor/rules/duplicate-id.js +8 -5
- package/dist/doctor/rules/duplicate-id.js.map +1 -1
- package/dist/doctor/rules/duplicate-id.ts +8 -5
- package/dist/doctor/rules/legacy-top-level-id-migration.d.ts.map +1 -1
- package/dist/doctor/rules/legacy-top-level-id-migration.js +11 -8
- package/dist/doctor/rules/legacy-top-level-id-migration.js.map +1 -1
- package/dist/doctor/rules/legacy-top-level-id-migration.ts +10 -11
- package/dist/doctor/rules/sites-to-lanes-migration.d.ts +39 -0
- package/dist/doctor/rules/sites-to-lanes-migration.d.ts.map +1 -0
- package/dist/doctor/rules/sites-to-lanes-migration.js +395 -0
- package/dist/doctor/rules/sites-to-lanes-migration.js.map +1 -0
- package/dist/doctor/rules/sites-to-lanes-migration.ts +449 -0
- package/dist/doctor/rules/workflow-stale.d.ts.map +1 -1
- package/dist/doctor/rules/workflow-stale.js +5 -2
- package/dist/doctor/rules/workflow-stale.js.map +1 -1
- package/dist/doctor/rules/workflow-stale.ts +5 -1
- package/dist/doctor/runner.d.ts +15 -1
- package/dist/doctor/runner.d.ts.map +1 -1
- package/dist/doctor/runner.js +48 -41
- package/dist/doctor/runner.js.map +1 -1
- package/dist/doctor/sites-migration-backfill.d.ts +71 -0
- package/dist/doctor/sites-migration-backfill.d.ts.map +1 -0
- package/dist/doctor/sites-migration-backfill.js +164 -0
- package/dist/doctor/sites-migration-backfill.js.map +1 -0
- package/dist/doctor/validate.d.ts.map +1 -1
- package/dist/doctor/validate.js +34 -73
- package/dist/doctor/validate.js.map +1 -1
- package/dist/entry/resolve-artifact.d.ts +80 -0
- package/dist/entry/resolve-artifact.d.ts.map +1 -0
- package/dist/entry/resolve-artifact.js +102 -0
- package/dist/entry/resolve-artifact.js.map +1 -0
- package/dist/entry/shortform-path.d.ts +34 -0
- package/dist/entry/shortform-path.d.ts.map +1 -0
- package/dist/entry/shortform-path.js +50 -0
- package/dist/entry/shortform-path.js.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/iterate/iterate.d.ts.map +1 -1
- package/dist/iterate/iterate.js +21 -26
- package/dist/iterate/iterate.js.map +1 -1
- package/dist/lanes/bootstrap.d.ts +11 -7
- package/dist/lanes/bootstrap.d.ts.map +1 -1
- package/dist/lanes/bootstrap.js +42 -17
- package/dist/lanes/bootstrap.js.map +1 -1
- package/dist/lanes/index.d.ts +1 -0
- package/dist/lanes/index.d.ts.map +1 -1
- package/dist/lanes/index.js +6 -0
- package/dist/lanes/index.js.map +1 -1
- package/dist/lanes/loader.d.ts +33 -6
- package/dist/lanes/loader.d.ts.map +1 -1
- package/dist/lanes/loader.js +44 -11
- package/dist/lanes/loader.js.map +1 -1
- package/dist/lanes/operations/create.d.ts +11 -2
- package/dist/lanes/operations/create.d.ts.map +1 -1
- package/dist/lanes/operations/create.js +15 -4
- package/dist/lanes/operations/create.js.map +1 -1
- package/dist/lanes/operations/list.d.ts +3 -2
- package/dist/lanes/operations/list.d.ts.map +1 -1
- package/dist/lanes/operations/list.js +3 -2
- package/dist/lanes/operations/list.js.map +1 -1
- package/dist/lanes/operations/move.d.ts +29 -25
- package/dist/lanes/operations/move.d.ts.map +1 -1
- package/dist/lanes/operations/move.js +45 -242
- package/dist/lanes/operations/move.js.map +1 -1
- package/dist/lanes/operations/update.d.ts +15 -5
- package/dist/lanes/operations/update.d.ts.map +1 -1
- package/dist/lanes/operations/update.js +32 -12
- package/dist/lanes/operations/update.js.map +1 -1
- package/dist/lanes/scaffold-path.d.ts +88 -0
- package/dist/lanes/scaffold-path.d.ts.map +1 -0
- package/dist/lanes/scaffold-path.js +122 -0
- package/dist/lanes/scaffold-path.js.map +1 -0
- package/dist/lanes/types.d.ts +54 -31
- package/dist/lanes/types.d.ts.map +1 -1
- package/dist/lanes/types.js +60 -21
- package/dist/lanes/types.js.map +1 -1
- package/dist/outline-split.d.ts +2 -3
- package/dist/outline-split.d.ts.map +1 -1
- package/dist/outline-split.js +2 -3
- package/dist/outline-split.js.map +1 -1
- package/dist/paths.d.ts +14 -87
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +21 -131
- package/dist/paths.js.map +1 -1
- package/dist/remark-strip-outline.mjs +2 -3
- package/dist/rename-slug.d.ts +3 -3
- package/dist/rename-slug.d.ts.map +1 -1
- package/dist/rename-slug.js +137 -44
- package/dist/rename-slug.js.map +1 -1
- package/dist/review/handlers.d.ts +3 -3
- package/dist/review/handlers.d.ts.map +1 -1
- package/dist/review/handlers.js +18 -14
- package/dist/review/handlers.js.map +1 -1
- package/dist/review/report.d.ts +13 -2
- package/dist/review/report.d.ts.map +1 -1
- package/dist/review/report.js +48 -18
- package/dist/review/report.js.map +1 -1
- package/dist/review/start-handlers.d.ts +4 -4
- package/dist/review/start-handlers.d.ts.map +1 -1
- package/dist/review/start-handlers.js +25 -25
- package/dist/review/start-handlers.js.map +1 -1
- package/dist/review/workflow-paths.d.ts +24 -26
- package/dist/review/workflow-paths.d.ts.map +1 -1
- package/dist/review/workflow-paths.js +70 -60
- package/dist/review/workflow-paths.js.map +1 -1
- package/dist/schema/draft-annotation.d.ts +8 -8
- package/dist/schema/entry.d.ts +6 -6
- package/dist/schema/journal-events.d.ts +56 -42
- package/dist/schema/journal-events.d.ts.map +1 -1
- package/dist/schema/journal-events.js +23 -9
- package/dist/schema/journal-events.js.map +1 -1
- package/dist/sidecar/read.d.ts +8 -0
- package/dist/sidecar/read.d.ts.map +1 -1
- package/dist/sidecar/read.js +36 -9
- package/dist/sidecar/read.js.map +1 -1
- package/dist/sidecar/write.d.ts +14 -0
- package/dist/sidecar/write.d.ts.map +1 -1
- package/dist/sidecar/write.js +25 -0
- package/dist/sidecar/write.js.map +1 -1
- package/package.json +9 -9
- package/dist/body-state.d.ts +0 -27
- package/dist/body-state.d.ts.map +0 -1
- package/dist/body-state.js +0 -62
- package/dist/body-state.js.map +0 -1
- package/dist/scaffold.d.ts +0 -67
- package/dist/scaffold.d.ts.map +0 -1
- package/dist/scaffold.js +0 -122
- package/dist/scaffold.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-top-level-id-migration.js","sourceRoot":"","sources":["../../../src/doctor/rules/legacy-top-level-id-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"legacy-top-level-id-migration.js","sourceRoot":"","sources":["../../../src/doctor/rules/legacy-top-level-id-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAS9B,MAAM,OAAO,GAAG,+BAA+B,CAAC;AAEhD,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC;IACvD,KAAK;IACL,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AACH,MAAM,SAAS,GAAwB,IAAI,GAAG,CAAC;IAC7C,WAAW;IACX,cAAc;IACd,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAEH,MAAM,OAAO,GACX,iEAAiE,CAAC;AAEpE,SAAS,aAAa,CAAC,IAAY;IACjC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,oBAAoB,CAAC,GAAW;IACvC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,IAAI,EAAE,CAAC;IACX,OAAO,GAAG,CAAC;IAEX,SAAS,KAAK,CAAC,UAAkB;QAC/B,IAAI,KAAe,CAAC;QACpB,IAAI,CAAC;YACH,KAAK,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO;QACT,CAA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G,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAChE,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,qCAAqC,MAAM,EAAE;gBACtD,UAAU,EAAE,cAAc;aAC3B,CAAC;QACJ,CAAC;QACD,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI;YACb,OAAO,EACL,eAAe,QAAQ,oCAAoC;gBAC3D,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC;YACpC,OAAO,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE;SAC7C,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
|
|
30
30
|
import { extname, join, relative } from 'node:path';
|
|
31
|
-
import {
|
|
31
|
+
import { collectSidecarArtifactDirs } from '../../content-index.ts';
|
|
32
32
|
import {
|
|
33
33
|
parseFrontmatter,
|
|
34
34
|
removeFrontmatterPaths,
|
|
@@ -163,22 +163,21 @@ const rule: DoctorRule = {
|
|
|
163
163
|
label: 'Frontmatter id at top level should be under `deskwork:` namespace',
|
|
164
164
|
|
|
165
165
|
async audit(ctx: DoctorContext): Promise<Finding[]> {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
);
|
|
166
|
+
// Phase 39c (sites→lanes retirement): discovery is sidecar-driven —
|
|
167
|
+
// walk each entry's resolved artifact directory rather than a
|
|
168
|
+
// configured site `contentDir`. The sidecar is the SSOT; legacy
|
|
169
|
+
// top-level-id files live alongside the entries that reference them.
|
|
170
|
+
const roots = await collectSidecarArtifactDirs(ctx.projectRoot);
|
|
171
171
|
const calendarIds = new Set<string>();
|
|
172
172
|
for (const e of ctx.calendar.entries) {
|
|
173
173
|
if (e.id) calendarIds.add(e.id);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
} catch {
|
|
180
|
-
return [];
|
|
176
|
+
const seen = new Set<string>();
|
|
177
|
+
for (const root of roots) {
|
|
178
|
+
for (const abs of collectMarkdownFiles(root)) seen.add(abs);
|
|
181
179
|
}
|
|
180
|
+
const files = [...seen].sort();
|
|
182
181
|
|
|
183
182
|
const findings: Finding[] = [];
|
|
184
183
|
for (const abs of files) {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule: sites-to-lanes-migration (Phase 39b).
|
|
3
|
+
*
|
|
4
|
+
* Detects the pre-migration shape and migrates it under `--fix`. Per the
|
|
5
|
+
* sites→lanes retirement spec (`docs/superpowers/specs/2026-06-02-sites-
|
|
6
|
+
* to-lanes-retirement-design.md` §"Migration"):
|
|
7
|
+
*
|
|
8
|
+
* Detect (audit): `config.sites` is present (legacy shape) OR any
|
|
9
|
+
* artifact-bearing entry lacks `artifactPath`. The rule emits a
|
|
10
|
+
* detection finding describing what `--fix` will do, PLUS one
|
|
11
|
+
* `migration-ambiguous` finding per entry whose slug+stage resolves to
|
|
12
|
+
* more than one candidate file (AUDIT-20260602-03 — see the backfiller).
|
|
13
|
+
*
|
|
14
|
+
* Fix (apply): three steps, in order:
|
|
15
|
+
* 1. Lanes from sites — per legacy `site`, create/ensure a lane
|
|
16
|
+
* whose `id` is the site slug, `pipelineTemplate: editorial`,
|
|
17
|
+
* `host ← site.host` (when present), and `scaffoldDefaults` keyed
|
|
18
|
+
* at minimum by `markdown → site.contentDir`.
|
|
19
|
+
* 2. Backfill `artifactPath` — stamp every UNAMBIGUOUS artifact-
|
|
20
|
+
* bearing entry from its single on-disk candidate. Ambiguous
|
|
21
|
+
* entries are REFUSED (the backfiller's ambiguity-halt).
|
|
22
|
+
* 3. Drop `sites` — remove the `sites` / `defaultSite` block from the
|
|
23
|
+
* on-disk config.
|
|
24
|
+
*
|
|
25
|
+
* Project-scoped despite the runner's per-site loop: the runner calls
|
|
26
|
+
* each rule once per `Object.keys(config.sites)`. This rule is a
|
|
27
|
+
* whole-project operation (it rewrites the single config + every
|
|
28
|
+
* sidecar), so it acts ONLY on the runner's FIRST site pass and no-ops
|
|
29
|
+
* on the rest — guarded by `isLeadSite`. Its source of truth is the
|
|
30
|
+
* on-disk config read through the migration-only tolerant reader
|
|
31
|
+
* (`legacy-config.ts`), NOT `ctx.config`, so once `sites` is dropped a
|
|
32
|
+
* re-run sees nothing to migrate (idempotency).
|
|
33
|
+
*
|
|
34
|
+
* Sibling-relative imports per the doctor convention.
|
|
35
|
+
*/
|
|
36
|
+
import type { DoctorRule } from '../types.ts';
|
|
37
|
+
declare const rule: DoctorRule;
|
|
38
|
+
export default rule;
|
|
39
|
+
//# sourceMappingURL=sites-to-lanes-migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sites-to-lanes-migration.d.ts","sourceRoot":"","sources":["../../../src/doctor/rules/sites-to-lanes-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAmBH,OAAO,KAAK,EAEV,UAAU,EAIX,MAAM,aAAa,CAAC;AAgIrB,QAAA,MAAM,IAAI,EAAE,UAgPX,CAAC;AAqBF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule: sites-to-lanes-migration (Phase 39b).
|
|
3
|
+
*
|
|
4
|
+
* Detects the pre-migration shape and migrates it under `--fix`. Per the
|
|
5
|
+
* sites→lanes retirement spec (`docs/superpowers/specs/2026-06-02-sites-
|
|
6
|
+
* to-lanes-retirement-design.md` §"Migration"):
|
|
7
|
+
*
|
|
8
|
+
* Detect (audit): `config.sites` is present (legacy shape) OR any
|
|
9
|
+
* artifact-bearing entry lacks `artifactPath`. The rule emits a
|
|
10
|
+
* detection finding describing what `--fix` will do, PLUS one
|
|
11
|
+
* `migration-ambiguous` finding per entry whose slug+stage resolves to
|
|
12
|
+
* more than one candidate file (AUDIT-20260602-03 — see the backfiller).
|
|
13
|
+
*
|
|
14
|
+
* Fix (apply): three steps, in order:
|
|
15
|
+
* 1. Lanes from sites — per legacy `site`, create/ensure a lane
|
|
16
|
+
* whose `id` is the site slug, `pipelineTemplate: editorial`,
|
|
17
|
+
* `host ← site.host` (when present), and `scaffoldDefaults` keyed
|
|
18
|
+
* at minimum by `markdown → site.contentDir`.
|
|
19
|
+
* 2. Backfill `artifactPath` — stamp every UNAMBIGUOUS artifact-
|
|
20
|
+
* bearing entry from its single on-disk candidate. Ambiguous
|
|
21
|
+
* entries are REFUSED (the backfiller's ambiguity-halt).
|
|
22
|
+
* 3. Drop `sites` — remove the `sites` / `defaultSite` block from the
|
|
23
|
+
* on-disk config.
|
|
24
|
+
*
|
|
25
|
+
* Project-scoped despite the runner's per-site loop: the runner calls
|
|
26
|
+
* each rule once per `Object.keys(config.sites)`. This rule is a
|
|
27
|
+
* whole-project operation (it rewrites the single config + every
|
|
28
|
+
* sidecar), so it acts ONLY on the runner's FIRST site pass and no-ops
|
|
29
|
+
* on the rest — guarded by `isLeadSite`. Its source of truth is the
|
|
30
|
+
* on-disk config read through the migration-only tolerant reader
|
|
31
|
+
* (`legacy-config.ts`), NOT `ctx.config`, so once `sites` is dropped a
|
|
32
|
+
* re-run sees nothing to migrate (idempotency).
|
|
33
|
+
*
|
|
34
|
+
* Sibling-relative imports per the doctor convention.
|
|
35
|
+
*/
|
|
36
|
+
import { existsSync, mkdirSync } from 'node:fs';
|
|
37
|
+
import { appendJournalEvent } from "../../journal/append.js";
|
|
38
|
+
import { commitLaneConfig } from "../../lanes/operations/commit.js";
|
|
39
|
+
import { laneConfigPath, lanesDir, loadLaneConfig } from "../../lanes/loader.js";
|
|
40
|
+
import { LaneConfigSchema } from "../../lanes/types.js";
|
|
41
|
+
import { dropSitesBlock, readLegacySites, } from "../legacy-config.js";
|
|
42
|
+
import { backfillFromLegacySites, detectAmbiguousBackfills, } from "../sites-migration-backfill.js";
|
|
43
|
+
import { readAllSidecars } from "../../sidecar/read-all.js";
|
|
44
|
+
const RULE_ID = 'sites-to-lanes-migration';
|
|
45
|
+
const AMBIGUOUS_RULE_ID = 'migration-ambiguous';
|
|
46
|
+
const MIGRATION_PIPELINE_TEMPLATE = 'editorial';
|
|
47
|
+
/**
|
|
48
|
+
* The migration is whole-project. Phase 39c collapsed the runner's
|
|
49
|
+
* per-site loop into a single project pass (`runner.ts` `PROJECT_SCOPE`),
|
|
50
|
+
* so this rule now fires exactly once per run regardless. The guard is
|
|
51
|
+
* retained as a constant `true` (its source of truth is the on-disk
|
|
52
|
+
* config via `readLegacySites`, not `ctx.config`, so idempotency is
|
|
53
|
+
* unaffected).
|
|
54
|
+
*/
|
|
55
|
+
function isLeadSite(_ctx) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Collect the legacy bases (one per legacy site) — each site's contentDir
|
|
60
|
+
* paired with the lane id it migrates to (the site slug). These are the
|
|
61
|
+
* bases the backfiller searches; the lane id lets it stamp the migrated
|
|
62
|
+
* entry's `lane` (AUDIT-20260603-12). Returns an empty array when there
|
|
63
|
+
* are no legacy sites (post-migration).
|
|
64
|
+
*/
|
|
65
|
+
function legacyLaneBases(sites) {
|
|
66
|
+
return [...sites.entries()].map(([slug, s]) => ({
|
|
67
|
+
laneId: slug,
|
|
68
|
+
contentDir: s.contentDir,
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Whether any artifact-bearing entry still lacks `artifactPath`.
|
|
73
|
+
*
|
|
74
|
+
* Does NOT swallow read errors (AUDIT-20260603-14). A corrupt sidecar
|
|
75
|
+
* makes `readAllSidecars` throw; previously this was caught and turned
|
|
76
|
+
* into `false`, so `audit()` silently under-reported ("nothing missing")
|
|
77
|
+
* on the exact on-disk state that `apply()` rejects — an audit/apply
|
|
78
|
+
* asymmetry the project's "no swallowed exceptions" rule names as a bug
|
|
79
|
+
* factory. The throw now propagates to `audit()`, which converts it into
|
|
80
|
+
* an `error` finding (so audit and apply agree on corrupt input, and the
|
|
81
|
+
* run still completes — AUDIT-20260603-13).
|
|
82
|
+
*/
|
|
83
|
+
async function anyEntryMissingArtifactPath(projectRoot) {
|
|
84
|
+
const entries = await readAllSidecars(projectRoot);
|
|
85
|
+
return entries.some((e) => e.artifactPath === undefined || e.artifactPath === '');
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Build the per-site lane config (id = slug). Carries the site's
|
|
89
|
+
* website-publishing metadata forward when present: `host` (Decision #2)
|
|
90
|
+
* and `redirectsPath` (Decision #23 / c4) re-home onto the lane as
|
|
91
|
+
* optional siblings; each is omitted entirely when the legacy site did
|
|
92
|
+
* not declare it (no empty-string writes). `scaffoldDefaults.markdown`
|
|
93
|
+
* captures the legacy contentDir as the add-time default — never
|
|
94
|
+
* identity or resolution.
|
|
95
|
+
*/
|
|
96
|
+
function laneFromSite(slug, site) {
|
|
97
|
+
const lane = {
|
|
98
|
+
id: slug,
|
|
99
|
+
name: slug,
|
|
100
|
+
pipelineTemplate: MIGRATION_PIPELINE_TEMPLATE,
|
|
101
|
+
// Per Phase 39c the lane carries no `contentDir` — the legacy site's
|
|
102
|
+
// content directory becomes the lane's add-time `scaffoldDefaults`
|
|
103
|
+
// (the `markdown` kind, the editorial pipeline's artifact kind).
|
|
104
|
+
// Location info is the ENTRY's `artifactPath`, never the lane.
|
|
105
|
+
scaffoldDefaults: { markdown: site.contentDir },
|
|
106
|
+
...(site.host !== undefined ? { host: site.host } : {}),
|
|
107
|
+
...(site.redirectsPath !== undefined
|
|
108
|
+
? { redirectsPath: site.redirectsPath }
|
|
109
|
+
: {}),
|
|
110
|
+
};
|
|
111
|
+
return lane;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Collect the migration's detection + ambiguity findings. Extracted from
|
|
115
|
+
* `audit()` so the latter can wrap it in a single try/catch that converts
|
|
116
|
+
* any read throw into an `error` finding (AUDIT-20260603-13/-14) without
|
|
117
|
+
* the detection logic itself growing a defensive nest. May throw —
|
|
118
|
+
* `audit()` is its only caller and handles the throw.
|
|
119
|
+
*/
|
|
120
|
+
async function collectFindings(ctx) {
|
|
121
|
+
const { sites } = readLegacySites(ctx.projectRoot);
|
|
122
|
+
const sitesPresent = sites.size > 0;
|
|
123
|
+
const missingArtifactPath = await anyEntryMissingArtifactPath(ctx.projectRoot);
|
|
124
|
+
const findings = [];
|
|
125
|
+
if (sitesPresent || missingArtifactPath) {
|
|
126
|
+
const slugs = [...sites.keys()];
|
|
127
|
+
findings.push({
|
|
128
|
+
ruleId: RULE_ID,
|
|
129
|
+
site: ctx.site,
|
|
130
|
+
severity: 'warning',
|
|
131
|
+
message: `Project uses the legacy "sites" model` +
|
|
132
|
+
(sitesPresent ? ` (${slugs.length} site(s): ${slugs.join(', ')})` : '') +
|
|
133
|
+
(missingArtifactPath ? ' and has entries missing artifactPath' : '') +
|
|
134
|
+
`. --fix migrates each site to a lane (host + scaffoldDefaults), ` +
|
|
135
|
+
`backfills each unambiguous entry's artifactPath, and drops the ` +
|
|
136
|
+
`sites block. Slug-collision entries (resolving to >1 file) are ` +
|
|
137
|
+
`refused and reported as migration-ambiguous.`,
|
|
138
|
+
details: {
|
|
139
|
+
siteSlugs: slugs,
|
|
140
|
+
sitesPresent,
|
|
141
|
+
missingArtifactPath,
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
// Surface ambiguity collisions as their own findings BEFORE any fix
|
|
146
|
+
// runs (AUDIT-20260602-03). These are report-only — the migration
|
|
147
|
+
// refuses to stamp them.
|
|
148
|
+
const bases = legacyLaneBases(sites);
|
|
149
|
+
if (bases.length > 0) {
|
|
150
|
+
const ambiguous = await detectAmbiguousBackfills(ctx.projectRoot, bases);
|
|
151
|
+
for (const amb of ambiguous) {
|
|
152
|
+
findings.push(ambiguousFinding(ctx.site, amb));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return findings;
|
|
156
|
+
}
|
|
157
|
+
const rule = {
|
|
158
|
+
id: RULE_ID,
|
|
159
|
+
label: 'Migrate legacy sites to lanes (Phase 39 sites→lanes retirement)',
|
|
160
|
+
async audit(ctx) {
|
|
161
|
+
if (!isLeadSite(ctx))
|
|
162
|
+
return [];
|
|
163
|
+
// The migration's reads can throw on a broken-but-present config (a
|
|
164
|
+
// legacy site missing `contentDir` — `readLegacySites`) or a corrupt
|
|
165
|
+
// sidecar (`readAllSidecars` via `anyEntryMissingArtifactPath` /
|
|
166
|
+
// `detectAmbiguousBackfills`). An uncaught throw here aborts the WHOLE
|
|
167
|
+
// doctor run, denying the operator every other rule's output
|
|
168
|
+
// (AUDIT-20260603-13). The runner does not guard `rule.audit()`, so
|
|
169
|
+
// the rule guards itself: any throw becomes an `error`-severity
|
|
170
|
+
// finding naming the problem, and the run continues. This also keeps
|
|
171
|
+
// audit and apply consistent on corrupt sidecars (AUDIT-20260603-14):
|
|
172
|
+
// both surface the corruption loudly rather than audit silently
|
|
173
|
+
// reporting clean while apply throws.
|
|
174
|
+
try {
|
|
175
|
+
return await collectFindings(ctx);
|
|
176
|
+
}
|
|
177
|
+
catch (err) {
|
|
178
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
179
|
+
return [
|
|
180
|
+
{
|
|
181
|
+
ruleId: RULE_ID,
|
|
182
|
+
site: ctx.site,
|
|
183
|
+
severity: 'error',
|
|
184
|
+
message: `sites-to-lanes migration could not inspect the project: ${reason}. ` +
|
|
185
|
+
`Repair the offending config or sidecar and re-run doctor.`,
|
|
186
|
+
details: { error: reason },
|
|
187
|
+
},
|
|
188
|
+
];
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
async plan(_ctx, finding) {
|
|
192
|
+
if (finding.ruleId === AMBIGUOUS_RULE_ID) {
|
|
193
|
+
const rawCandidates = finding.details.candidates;
|
|
194
|
+
const candidates = Array.isArray(rawCandidates)
|
|
195
|
+
? rawCandidates.map((c) => String(c))
|
|
196
|
+
: [];
|
|
197
|
+
return {
|
|
198
|
+
kind: 'report-only',
|
|
199
|
+
finding,
|
|
200
|
+
reason: `Entry ${String(finding.details.entryUuid)} (slug=${String(finding.details.slug)}) ` +
|
|
201
|
+
`resolves to ${candidates.length} candidate files across legacy site ` +
|
|
202
|
+
`contentDirs: ${candidates.join(', ')}. The migration refuses to stamp ` +
|
|
203
|
+
`an ambiguous guess (it would launder a #394-class collision into ` +
|
|
204
|
+
`permanent data). Disambiguate manually — set the entry's artifactPath ` +
|
|
205
|
+
`explicitly, or remove the duplicate file — then re-run doctor --fix.`,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
kind: 'apply',
|
|
210
|
+
finding,
|
|
211
|
+
summary: 'migrate legacy sites → lanes: create lanes (host + scaffoldDefaults), ' +
|
|
212
|
+
'backfill unambiguous entry artifactPaths, drop the sites block',
|
|
213
|
+
payload: {},
|
|
214
|
+
};
|
|
215
|
+
},
|
|
216
|
+
async apply(ctx, plan) {
|
|
217
|
+
if (plan.kind !== 'apply') {
|
|
218
|
+
return {
|
|
219
|
+
finding: plan.finding,
|
|
220
|
+
applied: false,
|
|
221
|
+
message: 'plan is not directly appliable',
|
|
222
|
+
skipReason: 'apply-failed',
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
try {
|
|
226
|
+
const { sites } = readLegacySites(ctx.projectRoot);
|
|
227
|
+
const bases = legacyLaneBases(sites);
|
|
228
|
+
// No legacy sites to migrate, but the detection still fired — that
|
|
229
|
+
// means it fired on `missingArtifactPath` alone (AUDIT-20260603-15).
|
|
230
|
+
// Every repair action keys off legacy sites: lane creation iterates
|
|
231
|
+
// `sites`, and the backfiller only searches each legacy
|
|
232
|
+
// `site.contentDir`. With no bases there is nothing this migration
|
|
233
|
+
// can stamp, so claiming `applied: true` would advertise a
|
|
234
|
+
// successful fix for a run that changed nothing and did not converge
|
|
235
|
+
// (the next audit re-fires the same finding). Report honestly: the
|
|
236
|
+
// entries need the lane-native back-fill, not the sites→lanes path.
|
|
237
|
+
if (bases.length === 0) {
|
|
238
|
+
const stillMissing = await anyEntryMissingArtifactPath(ctx.projectRoot);
|
|
239
|
+
if (stillMissing) {
|
|
240
|
+
return {
|
|
241
|
+
finding: plan.finding,
|
|
242
|
+
applied: false,
|
|
243
|
+
message: 'sites-to-lanes: no legacy sites to migrate, but entries still ' +
|
|
244
|
+
'lack artifactPath. This migration only back-fills from legacy ' +
|
|
245
|
+
'site contentDirs, of which there are none — it cannot stamp ' +
|
|
246
|
+
'these entries. Back-fill via the lane-native path ' +
|
|
247
|
+
'(`migrateLaneMembership` / `/deskwork:lane move`) instead.',
|
|
248
|
+
skipReason: 'prerequisite-missing',
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
// No sites AND nothing missing → genuinely nothing to do.
|
|
252
|
+
return {
|
|
253
|
+
finding: plan.finding,
|
|
254
|
+
applied: false,
|
|
255
|
+
message: 'sites-to-lanes: no legacy sites and no entries missing ' +
|
|
256
|
+
'artifactPath — nothing to migrate.',
|
|
257
|
+
skipReason: 'no-action-needed',
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
// Step 1 — lanes from sites (idempotent: skip an existing lane file).
|
|
261
|
+
const lanesCreated = [];
|
|
262
|
+
if (sites.size > 0) {
|
|
263
|
+
mkdirSync(lanesDir(ctx.projectRoot), { recursive: true });
|
|
264
|
+
}
|
|
265
|
+
for (const [slug, site] of sites) {
|
|
266
|
+
const target = laneConfigPath(ctx.projectRoot, slug);
|
|
267
|
+
if (existsSync(target)) {
|
|
268
|
+
// AUDIT-20260604-10: a pre-existing lane file (re-run / partial
|
|
269
|
+
// migration) was previously skipped wholesale — then Step 3's
|
|
270
|
+
// dropSitesBlock removed the only remaining copy of the legacy
|
|
271
|
+
// `redirectsPath`, silently discarding it. Merge the legacy
|
|
272
|
+
// redirectsPath onto the existing lane when the lane lacks it.
|
|
273
|
+
//
|
|
274
|
+
// Faithfulness (AUDIT-20260604-08-followup / claude-02): reading
|
|
275
|
+
// via loadLaneConfig is faithful here because LaneConfigSchema is
|
|
276
|
+
// `.strict()` with NO `.default()` fields — a successfully-loaded
|
|
277
|
+
// lane carries exactly its on-disk valid fields ($rationale
|
|
278
|
+
// included), and an unknown key would have THROWN at load (strict),
|
|
279
|
+
// not been silently stripped. So `{ ...existing, redirectsPath }`
|
|
280
|
+
// adds one field and re-writes the rest verbatim; commitLaneConfig
|
|
281
|
+
// re-validates via the same LaneConfigSchema.safeParse gate the
|
|
282
|
+
// create branch uses below. Only the c4-introduced redirectsPath is
|
|
283
|
+
// reconciled; other fields are not re-derived (the lane already
|
|
284
|
+
// exists by operator/earlier intent).
|
|
285
|
+
if (site.redirectsPath !== undefined) {
|
|
286
|
+
const existing = loadLaneConfig(slug, ctx.projectRoot);
|
|
287
|
+
if (existing.redirectsPath === undefined) {
|
|
288
|
+
commitLaneConfig(ctx.projectRoot, slug, { ...existing, redirectsPath: site.redirectsPath }, 'merge-legacy-redirectsPath');
|
|
289
|
+
await appendJournalEvent(ctx.projectRoot, {
|
|
290
|
+
kind: 'lane-migration',
|
|
291
|
+
at: new Date().toISOString(),
|
|
292
|
+
migration: 'merge-redirectsPath-into-existing-lane',
|
|
293
|
+
source: `sites.${slug}`,
|
|
294
|
+
target: `lanes.${slug}`,
|
|
295
|
+
details: { legacySiteId: slug, redirectsPath: site.redirectsPath },
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
const lane = laneFromSite(slug, site);
|
|
302
|
+
const validated = LaneConfigSchema.safeParse(lane);
|
|
303
|
+
if (!validated.success) {
|
|
304
|
+
return {
|
|
305
|
+
finding: plan.finding,
|
|
306
|
+
applied: false,
|
|
307
|
+
message: `sites-to-lanes: lane for site "${slug}" failed schema validation: ` +
|
|
308
|
+
validated.error.message,
|
|
309
|
+
skipReason: 'apply-failed',
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
commitLaneConfig(ctx.projectRoot, slug, validated.data, 'create');
|
|
313
|
+
await appendJournalEvent(ctx.projectRoot, {
|
|
314
|
+
kind: 'lane-migration',
|
|
315
|
+
at: new Date().toISOString(),
|
|
316
|
+
migration: 'lane-from-legacy-site',
|
|
317
|
+
source: `sites.${slug}`,
|
|
318
|
+
target: `lanes.${slug}`,
|
|
319
|
+
details: {
|
|
320
|
+
legacySiteId: slug,
|
|
321
|
+
scaffoldMarkdown: site.contentDir,
|
|
322
|
+
...(site.host !== undefined ? { host: site.host } : {}),
|
|
323
|
+
...(site.redirectsPath !== undefined
|
|
324
|
+
? { redirectsPath: site.redirectsPath }
|
|
325
|
+
: {}),
|
|
326
|
+
},
|
|
327
|
+
});
|
|
328
|
+
lanesCreated.push(slug);
|
|
329
|
+
}
|
|
330
|
+
// Step 2 — backfill unambiguous entry artifactPaths (ambiguity-halt).
|
|
331
|
+
const backfill = await backfillFromLegacySites(ctx.projectRoot, bases);
|
|
332
|
+
// Step 3 — drop the sites block from the config.
|
|
333
|
+
const dropped = dropSitesBlock(ctx.projectRoot);
|
|
334
|
+
if (dropped) {
|
|
335
|
+
await appendJournalEvent(ctx.projectRoot, {
|
|
336
|
+
kind: 'lane-migration',
|
|
337
|
+
at: new Date().toISOString(),
|
|
338
|
+
migration: 'drop-sites-block',
|
|
339
|
+
source: '.deskwork/config.json#sites',
|
|
340
|
+
target: '.deskwork/config.json',
|
|
341
|
+
details: {
|
|
342
|
+
lanesCreated: lanesCreated.length,
|
|
343
|
+
entriesStamped: backfill.stamped.length,
|
|
344
|
+
entriesAmbiguous: backfill.ambiguous.length,
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
const ambiguousNote = backfill.ambiguous.length > 0
|
|
349
|
+
? ` ${backfill.ambiguous.length} entry(ies) refused as ambiguous ` +
|
|
350
|
+
`(reported separately as migration-ambiguous).`
|
|
351
|
+
: '';
|
|
352
|
+
return {
|
|
353
|
+
finding: plan.finding,
|
|
354
|
+
applied: true,
|
|
355
|
+
message: `migrated: ${lanesCreated.length} lane(s) created, ` +
|
|
356
|
+
`${backfill.stamped.length} entry artifactPath(s) backfilled, ` +
|
|
357
|
+
`sites block ${dropped ? 'dropped' : 'already absent'}.${ambiguousNote}`,
|
|
358
|
+
details: {
|
|
359
|
+
lanesCreated,
|
|
360
|
+
entriesStamped: backfill.stamped,
|
|
361
|
+
entriesAmbiguous: backfill.ambiguous.map((a) => a.entryUuid),
|
|
362
|
+
sitesDropped: dropped,
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
catch (err) {
|
|
367
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
368
|
+
return {
|
|
369
|
+
finding: plan.finding,
|
|
370
|
+
applied: false,
|
|
371
|
+
message: `sites-to-lanes migration failed: ${reason}`,
|
|
372
|
+
skipReason: 'apply-failed',
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
};
|
|
377
|
+
function ambiguousFinding(site, amb) {
|
|
378
|
+
return {
|
|
379
|
+
ruleId: AMBIGUOUS_RULE_ID,
|
|
380
|
+
site,
|
|
381
|
+
severity: 'error',
|
|
382
|
+
message: `Entry ${amb.entryUuid} (slug=${amb.slug}, stage=${amb.stage}) resolves to ` +
|
|
383
|
+
`${amb.candidates.length} candidate files across legacy site contentDirs ` +
|
|
384
|
+
`(${amb.candidates.join(', ')}). The migration refuses to stamp an ` +
|
|
385
|
+
`ambiguous artifactPath — disambiguate manually and re-run.`,
|
|
386
|
+
details: {
|
|
387
|
+
entryUuid: amb.entryUuid,
|
|
388
|
+
slug: amb.slug,
|
|
389
|
+
stage: amb.stage,
|
|
390
|
+
candidates: amb.candidates,
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
export default rule;
|
|
395
|
+
//# sourceMappingURL=sites-to-lanes-migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sites-to-lanes-migration.js","sourceRoot":"","sources":["../../../src/doctor/rules/sites-to-lanes-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAmB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,cAAc,EACd,eAAe,GAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GAGzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAS5D,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAC3C,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAChD,MAAM,2BAA2B,GAAG,WAAW,CAAC;AAEhD;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAmB;IACrC,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,KAAsC;IAC7D,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9C,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,CAAC,CAAC,UAAU;KACzB,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;;;GAWG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