@orkestrel/scaffold 0.0.49 → 0.0.50
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/README.md +4 -2
- package/dist/bin/main.js +184 -72
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/orchestration.md +28 -3
- package/dist/host/claude/agents/orkestrel.md +44 -44
- package/dist/host/claude/rules/tests.md +6 -2
- package/dist/host/guides/scaffold.md +328 -96
- package/dist/host/manifest.json +6 -6
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +26 -5
- package/dist/src/core/index.cjs +1285 -80
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +200 -36
- package/dist/src/core/index.d.ts +200 -36
- package/dist/src/core/index.js +1280 -81
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +47 -15
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +42 -15
- package/dist/src/server/index.d.ts +42 -15
- package/dist/src/server/index.js +48 -17
- package/dist/src/server/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -59,27 +59,31 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
59
59
|
|
|
60
60
|
#### Interfaces
|
|
61
61
|
|
|
62
|
-
| Name
|
|
63
|
-
|
|
|
64
|
-
| `AppDefinition`
|
|
65
|
-
| `ArtifactBase`
|
|
66
|
-
| `Audit`
|
|
67
|
-
| `Blueprint`
|
|
68
|
-
| `CompileFailure`
|
|
69
|
-
| `CompileRecord`
|
|
70
|
-
| `CompilerInterface`
|
|
71
|
-
| `CompilerOptions`
|
|
72
|
-
| `ContentArtifact`
|
|
73
|
-
| `Dependency`
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
62
|
+
| Name | Kind | Summary |
|
|
63
|
+
| ----------------------- | --------- | --------------------------------------------------------------------------------------- |
|
|
64
|
+
| `AppDefinition` | interface | The configuration and runtime-entry settings one private `app` environment contributes. |
|
|
65
|
+
| `ArtifactBase` | interface | The fields every planned file carries. |
|
|
66
|
+
| `Audit` | interface | The whole comparison of a plan against a target's current content. |
|
|
67
|
+
| `Blueprint` | interface | The closed, JSON-serializable workspace specification. |
|
|
68
|
+
| `CompileFailure` | interface | The coded reason one compile stage failed. |
|
|
69
|
+
| `CompileRecord` | interface | The input and output snapshot of one compile stage. |
|
|
70
|
+
| `CompilerInterface` | interface | The compilation contract: pure, synchronous, and host-independent. |
|
|
71
|
+
| `CompilerOptions` | interface | Options for the compiler. |
|
|
72
|
+
| `ContentArtifact` | interface | A text file produced by the template or computed compilation path. |
|
|
73
|
+
| `Dependency` | interface | One runtime `@orkestrel/*` dependency of a generated workspace. |
|
|
74
|
+
| `DependencyPinSet` | interface | The runtime and development dependency sections a range writer may change. |
|
|
75
|
+
| `HostArtifact` | interface | A file byte-copied from the vendored data root, planned before its bytes are read. |
|
|
76
|
+
| `HydratedArtifact` | interface | A vendored file whose exact bytes have been read, so its content can be compared. |
|
|
77
|
+
| `ManifestDependencySet` | interface | The runtime, development, and peer declarations read from an existing manifest. |
|
|
78
|
+
| `ManifestRegionSet` | interface | The manifest regions a writing operation may change. |
|
|
79
|
+
| `ManifestScript` | interface | One manifest script a region-writing operation may replace. |
|
|
80
|
+
| `Override` | interface | One artifact override. |
|
|
81
|
+
| `Plan` | interface | The compiled, ordered artifact list and the selection it covers. |
|
|
82
|
+
| `PlanSummary` | interface | The tally of one plan by artifact origin. |
|
|
83
|
+
| `Question` | interface | One validation issue raised against a blueprint or a plan. |
|
|
84
|
+
| `Scaffolding` | interface | The replayable outcome of one compile. |
|
|
85
|
+
| `SrcDefinition` | interface | The build and export settings one published `src` environment contributes. |
|
|
86
|
+
| `ViteMachinery` | interface | Which host-specific pipelines a generated root Vite configuration carries. |
|
|
83
87
|
|
|
84
88
|
#### Constants
|
|
85
89
|
|
|
@@ -101,7 +105,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
101
105
|
| `DEFAULT_ENGINES` | const | The `engines.node` range a workspace starts with. |
|
|
102
106
|
| `DEFAULT_VERSION` | const | The version a workspace starts at. |
|
|
103
107
|
| `DEPENDENCY_NAME_PATTERN` | const | The runtime dependency name syntax: the `@orkestrel` scope and a bare name. |
|
|
104
|
-
| `DISTRIBUTION_TEST_PATH` | const | The packed-package proof
|
|
108
|
+
| `DISTRIBUTION_TEST_PATH` | const | The generated packed-package proof every publishing workspace is planned at. |
|
|
105
109
|
| `ENGINES_PATTERN` | const | The minimum-Node engine syntax a blueprint declares. |
|
|
106
110
|
| `ENVIRONMENTS` | const | The `Environment` values, frozen. |
|
|
107
111
|
| `EXECUTABLE_PATHS` | const | The vendored paths a target receives with its executable bit set, frozen. |
|
|
@@ -116,6 +120,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
116
120
|
| `HOST_INVENTORY_PATH` | const | The repository-relative path where the committed vendored-file inventory is served. |
|
|
117
121
|
| `INTEGRATION_TEST_PATH` | const | The cross-environment composition proof whose presence makes a workspace `integration`. |
|
|
118
122
|
| `INVALID_PATH_CHARACTER_PATTERN` | const | Visible characters a target-relative path and a Markdown path cell both forbid. |
|
|
123
|
+
| `MANIFEST_PATH` | const | The manifest path every compiler plan emits with birth ownership. |
|
|
119
124
|
| `MAX_ARTIFACT_BYTES` | const | Maximum bytes accepted for one artifact. |
|
|
120
125
|
| `MAX_ARTIFACT_HEX_LENGTH` | const | Maximum length of the hexadecimal string carrying one artifact's bytes. |
|
|
121
126
|
| `MAX_AUDIT_FINDINGS` | const | Maximum findings one audit can produce from a bounded plan and snapshot. |
|
|
@@ -126,6 +131,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
126
131
|
| `MAX_PATH_LENGTH` | const | Maximum length of one path, matching the longest a supported filesystem accepts. |
|
|
127
132
|
| `MAX_RANGE_LENGTH` | const | Maximum length of one declared package range. |
|
|
128
133
|
| `MAX_REGISTRY_BYTES` | const | Maximum decoded bytes accepted from one registry response. |
|
|
134
|
+
| `MAX_SCRIPT_LENGTH` | const | Maximum length of one manifest script name or command. |
|
|
129
135
|
| `MAX_TOTAL_ARTIFACT_BYTES` | const | Maximum bytes retained across one whole plan or audit. |
|
|
130
136
|
| `MAX_TOTAL_REGISTRY_BYTES` | const | Maximum decoded bytes accepted across one registry-reading call. |
|
|
131
137
|
| `MINIMUM_NODE_VERSION` | const | The oldest Node version the generated toolchain supports. |
|
|
@@ -134,6 +140,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
134
140
|
| `ORCHESTRATION_PATH_PREFIXES` | const | The path prefixes whose contents instruct or wire an agent, frozen. |
|
|
135
141
|
| `ORKESTREL_RANGE_PATTERN` | const | The exact caret-pinned pre-1.0 range accepted for an `@orkestrel/*` runtime dependency. |
|
|
136
142
|
| `PRINT_WIDTH` | const | Columns one emitted line may occupy, matching `printWidth` in `.oxfmtrc.json`. |
|
|
143
|
+
| `RELEASE_PROOF_COMMAND` | const | The `prepublishOnly` row that runs the packed-package proof against a real registry. |
|
|
137
144
|
| `SERVICE_SCRIPT_PATH` | const | The provisioner skeleton a workspace with declared service vendors is given once. |
|
|
138
145
|
| `SERVICE_SETUP_PATH` | const | The live-service readiness module whose presence makes a workspace `service`. |
|
|
139
146
|
| `SERVICE_TEST_INCLUDE` | const | The include the live-service project covers, which is a directory rather than one proof. |
|
|
@@ -164,6 +171,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
164
171
|
| `isGroup` | const | Narrow a value to one `Group` a plan selects over. |
|
|
165
172
|
| `isGroups` | const | Narrow a value to a bounded group selection. |
|
|
166
173
|
| `isHex` | const | Narrow a value to exact lowercase hexadecimal bytes within one artifact's limit. |
|
|
174
|
+
| `isManifestScript` | const | Narrow a value to a `ManifestScript`. |
|
|
167
175
|
| `isMirror` | const | Narrow a value to a `Mirror`. |
|
|
168
176
|
| `isOverride` | const | Narrow a value to an `Override`. |
|
|
169
177
|
| `isPath` | function | Narrow a value to a logical target-relative path. |
|
|
@@ -198,7 +206,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
198
206
|
| `inferDrift` | function | Infer how one target path compares to the artifact planned for it. |
|
|
199
207
|
| `inferGroup` | function | Infer the `Group` a path belongs to. |
|
|
200
208
|
| `isDeferredPath` | function | Test whether another surface owns the vendored bytes at a path. |
|
|
201
|
-
| `manifestToDependencies` | function | Project a
|
|
209
|
+
| `manifestToDependencies` | function | Project a manifest's `@orkestrel/*` declarations into separate section lists. |
|
|
202
210
|
| `manifestToName` | function | Project a package manifest's text to its own name. |
|
|
203
211
|
| `matchesDriftReachability` | function | Test whether `inferDrift` could have produced a finding for an ownership. |
|
|
204
212
|
| `matchesEngines` | function | Test whether a declared engines floor is at or above the supported minimum. |
|
|
@@ -232,14 +240,16 @@ Exported from `@orkestrel/scaffold`, and reachable from
|
|
|
232
240
|
| `blueprintToScripts` | function | Project a blueprint into the scripts its manifest declares. |
|
|
233
241
|
| `blueprintToSourceArtifacts` | function | Compile every artifact in the `source` group. |
|
|
234
242
|
| `blueprintToTestArtifacts` | function | Compile every artifact in the `tests` group that is not vendored from the host. |
|
|
243
|
+
| `blueprintToWritableScripts` | function | Project a blueprint into the manifest scripts a region write may replace. |
|
|
235
244
|
| `dependenciesToQuestions` | function | Measure one declared package list against the name and range syntax it accepts. |
|
|
236
245
|
| `nameToHostArtifacts` | function | Compile the vendored host artifacts a named workspace plans. |
|
|
237
246
|
| `overridesToQuestions` | function | Measure a blueprint's overrides against the artifacts drafted for it. |
|
|
238
247
|
| `pathToCondition` | function | Build one `exports` condition block for a built environment. |
|
|
239
248
|
| `planToFindings` | function | Compare a plan against a target's current content. |
|
|
240
249
|
| `planToHash` | function | Compute a plan's content identity. |
|
|
241
|
-
| `replaceManifestRanges` | function | Replace
|
|
242
|
-
| `
|
|
250
|
+
| `replaceManifestRanges` | function | Replace runtime and development ranges without reading or writing peer fields. |
|
|
251
|
+
| `replaceManifestScripts` | function | Replace named script values, refusing a value the region does not accept. |
|
|
252
|
+
| `replacePlanRanges` | function | Replace writable ranges in a plan's manifest and recompute its identity. |
|
|
243
253
|
| `srcToEntry` | function | Project a published selection into the manifest's entry fields. |
|
|
244
254
|
| `srcToExports` | function | Project a published selection into the manifest's `exports` map. |
|
|
245
255
|
| `srcToRoot` | function | Select the single published environment a package root points at. |
|
|
@@ -321,6 +331,7 @@ Exported from `@orkestrel/scaffold/server`, and reachable from
|
|
|
321
331
|
| `isHostManifest` | const | Narrow a value to one `HostManifest`. |
|
|
322
332
|
| `isInventory` | function | Narrow a value to a working-tree inventory within the limit one target may report. |
|
|
323
333
|
| `isManifestEntry` | const | Narrow a value to one `ManifestEntry`. |
|
|
334
|
+
| `isManifestRegionSet` | const | Narrow a value to one `ManifestRegionSet`. |
|
|
324
335
|
| `isMaterializerHooks` | const | Narrow a value to the materializer's initial listener record. |
|
|
325
336
|
| `isMaterializerOptions` | const | Narrow a value to `MaterializerOptions`. |
|
|
326
337
|
| `isMirrors` | const | Narrow a value to a bounded list of fetched guide mirrors. |
|
|
@@ -400,7 +411,7 @@ no interface and is documented directly.
|
|
|
400
411
|
| `repair` | Write a plan into an existing target, guided by an audit of it. |
|
|
401
412
|
| `mirror` | Write fetched dependency guides to their local mirrors. |
|
|
402
413
|
| `catalog` | Rewrite the marker-bounded package table in the target's catalog agent file. |
|
|
403
|
-
| `declare` | Rewrite the
|
|
414
|
+
| `declare` | Rewrite the manifest regions the caller names: the ranges and the scripts. |
|
|
404
415
|
| `remove` | Re-derive and delete the tracked files the plan does not own. |
|
|
405
416
|
| `destroy` | Tear the materializer down. Every later call throws, and teardown is idempotent. |
|
|
406
417
|
|
|
@@ -430,13 +441,13 @@ no interface and is documented directly.
|
|
|
430
441
|
Authority is the verb's: every verb except `audit` writes when it is typed, and no
|
|
431
442
|
option grants a write.
|
|
432
443
|
|
|
433
|
-
| Verb | Writes
|
|
434
|
-
| ----------- |
|
|
435
|
-
| `new` | A whole workspace, into a target that holds nothing the plan would collide with
|
|
436
|
-
| `audit` | Nothing
|
|
437
|
-
| `repair` | Each planned path the target is missing or has let drift, and the
|
|
438
|
-
| `catalog` | The package table, the guide mirrors, and the
|
|
439
|
-
| `overwrite` | Everything `repair` and `catalog` write, plus deletions
|
|
444
|
+
| Verb | Writes |
|
|
445
|
+
| ----------- | ------------------------------------------------------------------------------------------ |
|
|
446
|
+
| `new` | A whole workspace, into a target that holds nothing the plan would collide with |
|
|
447
|
+
| `audit` | Nothing |
|
|
448
|
+
| `repair` | Each planned path the target is missing or has let drift, and the range and script regions |
|
|
449
|
+
| `catalog` | The package table, the guide mirrors, and the range region |
|
|
450
|
+
| `overwrite` | Everything `repair` and `catalog` write, plus deletions |
|
|
440
451
|
|
|
441
452
|
### Baselines
|
|
442
453
|
|
|
@@ -517,14 +528,17 @@ answers a read and grant no verb write authority that it did not already have.
|
|
|
517
528
|
|
|
518
529
|
`new --bin` creates the executable entry, its test, and its scoped Vite and TypeScript wrappers. The
|
|
519
530
|
other structural facts do not need creation flags. Add a root `tests/setup*.test.ts` proof for
|
|
520
|
-
`setup`, `tests/guides.test.ts` for `guides`,
|
|
521
|
-
`tests/distribution.test.ts` for `distribution`, `tests/integration.test.ts` for `integration`,
|
|
531
|
+
`setup`, `tests/guides.test.ts` for `guides`, `tests/integration.test.ts` for `integration`,
|
|
522
532
|
`tests/conformance.test.ts` for `conformance`, `tests/setupService.ts` for `service`,
|
|
523
533
|
`tests/setupGlobal.ts` for `global`, and `configs/app/vite.showcase.config.ts` for `showcase`;
|
|
524
534
|
reading verbs detect each exact-case file and register its fixed machinery. Add `scripts/service.sh`
|
|
525
535
|
for `vendors`. Reading verbs preserve and protect that birth-owned script, but do not infer its
|
|
526
536
|
vendor list from edited text.
|
|
527
537
|
|
|
538
|
+
`distribution` is not on that list. Publishing at least one `src` environment is its whole
|
|
539
|
+
condition, and scaffold writes `tests/distribution.test.ts` itself rather than waiting for you to.
|
|
540
|
+
Limits states what makes that one proof generable when the others are not.
|
|
541
|
+
|
|
528
542
|
### Reading a target
|
|
529
543
|
|
|
530
544
|
`audit`, `repair`, `catalog`, and `overwrite` derive the blueprint from the target itself. The name
|
|
@@ -532,11 +546,11 @@ and the declared `@orkestrel/*` packages come from `package.json`. The environme
|
|
|
532
546
|
from the directories the target actually ships, because a directory is the fact and a declaration
|
|
533
547
|
beside it could disagree. The remaining facts come from exact-case files: `src/bin/main.ts` selects
|
|
534
548
|
`bin`, each root `tests/setup*.test.ts` match selects `setup`, `tests/guides.test.ts` selects
|
|
535
|
-
`guides`, `tests/
|
|
536
|
-
`tests/integration.test.ts` selects `integration`, `tests/conformance.test.ts` selects
|
|
549
|
+
`guides`, `tests/integration.test.ts` selects `integration`, `tests/conformance.test.ts` selects
|
|
537
550
|
`conformance`, `tests/setupService.ts` selects `service`, `tests/setupGlobal.ts` selects `global`,
|
|
538
551
|
and `configs/app/vite.showcase.config.ts` selects `showcase`. A containing directory does not select
|
|
539
|
-
the fact by itself.
|
|
552
|
+
the fact by itself. `tests/distribution.test.ts` selects nothing: the published `src` axis the
|
|
553
|
+
target ships already decides the `distribution` project, and the file is planned from that.
|
|
540
554
|
|
|
541
555
|
`vendors` is not reconstructed. Its only artifact, `scripts/service.sh`, is birth-owned, so edited
|
|
542
556
|
script text is not a trustworthy declaration of a vendor list. A present script remains in the
|
|
@@ -568,16 +582,34 @@ question instead of licensing a write. The classifier is deliberately bounded to
|
|
|
568
582
|
text that names `vitest`; an external wrapper whose name does not identify its runner supplies no
|
|
569
583
|
static Vitest fact to infer.
|
|
570
584
|
|
|
571
|
-
`audit` still completes the comparison and reports one non-blocking `projects` question
|
|
585
|
+
`audit` still completes the comparison and reports one non-blocking `projects` question when its
|
|
586
|
+
selection includes `configs`. A scoped audit that excludes `configs` omits that question. For a
|
|
572
587
|
literal absent project, its advisory tells the developer to register the project or remove the
|
|
573
588
|
script. For a planned project absent from the gate chains, the advisory checks the direct
|
|
574
589
|
`test:<project>` script. When the script is absent, the advisory gives the exact line to add to
|
|
575
590
|
`package.json`. When the script is declared but ungated, the advisory names the script and the gate
|
|
576
|
-
chain that must invoke it, without repeating a script line. `
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
591
|
+
chain that must invoke it, without repeating a script line. When `configs` is selected, `repair` and
|
|
592
|
+
`overwrite` refuse either mismatch before writing. Their refusal names the `configs` group, the
|
|
593
|
+
manifest and planned `vite.config.ts` conflict, and the option to exclude `configs` from
|
|
594
|
+
`--groups`. A selection that excludes `configs` proceeds. An advisory alone does not make an aligned
|
|
595
|
+
target drift.
|
|
596
|
+
|
|
597
|
+
Scaffold writes one part of the manifest rather than advising on it: the script region a publishing
|
|
598
|
+
workspace needs for the generated distribution proof. `repair` and `overwrite` write
|
|
599
|
+
`test:distribution` and `prepublishOnly` there. A declared value is overwritten only when it is
|
|
600
|
+
already the value being written, or, for `prepublishOnly`, the one predecessor the region accepts —
|
|
601
|
+
the same gate chain without the release row. The overwrite happens in place, so every byte outside
|
|
602
|
+
the replaced ranges survives, and a description, a keyword, a key order, and a script the workspace
|
|
603
|
+
added are untouched. A script the manifest does not declare is appended after the last declared one,
|
|
604
|
+
copying that section's indentation. `catalog` writes no script region; it names the ranges alone.
|
|
605
|
+
|
|
606
|
+
A value matching neither is a chain the workspace author wrote. The region is then refused whole,
|
|
607
|
+
without a byte moving, and the range region is still written. The `projects` advisory reads the
|
|
608
|
+
manifest as a write would leave it, so a region scaffold writes for itself raises no question, while
|
|
609
|
+
a refused region leaves the target's own text standing and the advisory reports whichever half is
|
|
610
|
+
outstanding: the exact `test:distribution` line to paste, or the gate chain that must invoke a
|
|
611
|
+
script the manifest already declares. The refusal covers the region rather than one script, so a
|
|
612
|
+
manifest never holds one written value beside one refused one.
|
|
581
613
|
|
|
582
614
|
The same plan-reading verbs compare the tooling set the derived blueprint plans against
|
|
583
615
|
`dependencies` and `devDependencies` together. A missing planned package produces one non-blocking
|
|
@@ -585,9 +617,42 @@ The same plan-reading verbs compare the tooling set the derived blueprint plans
|
|
|
585
617
|
order. The comparison measures membership: a workspace-owned extra is outside it, a planned tool may
|
|
586
618
|
live in either section, and how current a declared range is belongs to the registry evidence
|
|
587
619
|
Dependency floors describes rather than to this question. A present section that is not an object
|
|
588
|
-
produces a question instead of a crash.
|
|
589
|
-
|
|
590
|
-
|
|
620
|
+
produces a question instead of a crash. This question belongs to `configs` and `tests`. `audit`
|
|
621
|
+
reports it only when its selection includes either group, without changing its exit semantics.
|
|
622
|
+
`repair` and `overwrite` refuse before writing a selected `configs` or `tests` group. A selection
|
|
623
|
+
that excludes those groups proceeds, and no verb adds the declaration for you: `package.json` is
|
|
624
|
+
birth-owned, and the range and script regions are the only parts of it a verb rewrites.
|
|
625
|
+
|
|
626
|
+
`audit` reports one further non-blocking question, on the `setup` field, and it alone reports it.
|
|
627
|
+
The question fires when the target carries a filled root `tests/setup*.ts` module that is neither a
|
|
628
|
+
proof itself nor one of the vendored modules every target receives, while no proof of the same stem
|
|
629
|
+
covers it. A module counts as filled when its text differs from the seed this blueprint plans at
|
|
630
|
+
that same path.
|
|
631
|
+
|
|
632
|
+
The comparison reads the module and the seed trimmed, so surrounding whitespace decides nothing: a
|
|
633
|
+
trailing newline is not authorship, and a module holding whitespace alone reads as empty rather than
|
|
634
|
+
as filled. It is seed-relative rather than a test for emptiness, because the seeds differ by path:
|
|
635
|
+
`tests/setup.ts` is seeded with the empty string and `tests/setupGlobal.ts` is seeded with a `setup`
|
|
636
|
+
function body. A test for emptiness therefore raises the question against a freshly materialized
|
|
637
|
+
workspace. Holding each module to the seed the same blueprint plans at its own path reports what a
|
|
638
|
+
maintainer wrote rather than what scaffold seeded.
|
|
639
|
+
|
|
640
|
+
That reading carries a release-skew limit. A seeded setup module is birth-owned, so `repair` reports
|
|
641
|
+
it aligned and never rewrites it. A target keeps the seed of the release that materialized it. When
|
|
642
|
+
a release moves a planned seed, scaffold raises the question on every target materialized before it,
|
|
643
|
+
against a module scaffold wrote and no maintainer touched.
|
|
644
|
+
`tests/setupGlobal.ts` is the module that can meet it, because it is the one seeded with more than
|
|
645
|
+
the empty string. A maintainer meeting that question closes it by writing the proof it asks for, or
|
|
646
|
+
by taking the seed the installed release plans.
|
|
647
|
+
|
|
648
|
+
Coverage is read per module: `tests/<name>.ts` is covered by `tests/<name>.test.ts` and by nothing
|
|
649
|
+
else, which is the pairing the vendored policy proof resolves. Writing one proof retires that module
|
|
650
|
+
and leaves every other uncovered module named, and the message pairs each module it names with the
|
|
651
|
+
proof that module wants. The question belongs to the `tests` group, so a scoped audit that excludes
|
|
652
|
+
`tests` omits it. Scaffold does not write the proof it asks for, and no writing verb raises the
|
|
653
|
+
question: a writing verb refuses the advisories it reports, and refusing `repair` over this one
|
|
654
|
+
would block every write on a gap no write can close. Run across a fleet, the question is the list of
|
|
655
|
+
packages carrying a filled setup module that no proof covers.
|
|
591
656
|
|
|
592
657
|
### Exit codes
|
|
593
658
|
|
|
@@ -678,10 +743,10 @@ because the shape is chosen once and read afterwards: `new` refuses the advisory
|
|
|
678
743
|
`repair` need the plan to describe and restore a target that already has that shape. A library
|
|
679
744
|
caller creating a workspace holds the same refusal, and the Compile section below states it.
|
|
680
745
|
|
|
681
|
-
`bin`, `setup`, `guides`, `
|
|
682
|
-
`
|
|
683
|
-
|
|
684
|
-
|
|
746
|
+
`bin`, `setup`, `guides`, `integration`, `conformance`, `service`, `vendors`, `global`, and
|
|
747
|
+
`showcase` are structural facts. Each is set only when the workspace physically ships the directory
|
|
748
|
+
or exact-case file that defines it, never because of the workspace's name and never because a
|
|
749
|
+
sibling fact is set.
|
|
685
750
|
|
|
686
751
|
`setup` registers every root `tests/setup*.test.ts` proof in one Node project that loads
|
|
687
752
|
`tests/setup.ts`. A nested or wrong-case match does not set the fact. The generated manifest emits
|
|
@@ -702,9 +767,12 @@ Adding a structural proof is therefore these steps, in order: write the file; de
|
|
|
702
767
|
regenerates the root configuration and registers the project. `audit` reports whichever piece is
|
|
703
768
|
still outstanding at each step.
|
|
704
769
|
|
|
705
|
-
`distribution`
|
|
706
|
-
|
|
707
|
-
|
|
770
|
+
`distribution` is not a field at all. A published `src` environment is its whole condition, read
|
|
771
|
+
from the `src` axis the blueprint already carries. The proof packs and installs the published
|
|
772
|
+
artifact, so a workspace publishing none has nothing for it to read and gets no project, no
|
|
773
|
+
`test:distribution` script, and no gate entry. A workspace publishing any gets the project, the
|
|
774
|
+
script, the `prepublishOnly` entry, and `tests/distribution.test.ts` itself. Limits states why this
|
|
775
|
+
is the one proof scaffold generates from the workspace's own shape.
|
|
708
776
|
|
|
709
777
|
`service` says the workspace runs a live-service Vitest project over `tests/service`, and it alone
|
|
710
778
|
registers that project, its `test:service` script, and the `tests/setupService.ts` readiness module
|
|
@@ -786,7 +854,8 @@ place, and the caller that picked the shape is the one holding it.
|
|
|
786
854
|
Off-contract input is different. A value that is not the exact shape raises `ScaffoldError` coded
|
|
787
855
|
`INVALID`, because it is not a question anyone can answer. Each entry point snapshots the caller's
|
|
788
856
|
value first and then guards the snapshot, so a property backed by an accessor is refused rather than
|
|
789
|
-
read.
|
|
857
|
+
read. `isPlan` refuses an artifact at `package.json` unless it carries `birth` ownership, because a
|
|
858
|
+
plan claiming `content` or `presence` there contradicts the compiler-produced plan.
|
|
790
859
|
|
|
791
860
|
Overrides replace a drafted artifact's content whole. The gate checks each override against the
|
|
792
861
|
blueprint's full draft before a group selection narrows the returned plan, so an override outside a
|
|
@@ -828,10 +897,23 @@ content is produced. `Ownership` says what scaffold claims at the path.
|
|
|
828
897
|
|
|
829
898
|
Presence ownership has separate mechanisms, and a reader needs to know which applies:
|
|
830
899
|
|
|
831
|
-
| Mechanism | Paths | Bytes belong to
|
|
832
|
-
| --------------- | ------------------------------------------------- |
|
|
833
|
-
| Verb-owned | `CATALOG_AGENT_PATH` and dependency guide mirrors | `catalog` or `mirror`
|
|
834
|
-
| Workspace-owned | `WORKSPACE_OWNED_PATHS`, which holds `.gitignore` | The target workspace
|
|
900
|
+
| Mechanism | Paths | Bytes belong to | Cost |
|
|
901
|
+
| --------------- | ------------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------- |
|
|
902
|
+
| Verb-owned | `CATALOG_AGENT_PATH` and dependency guide mirrors | `catalog` or `mirror` | The owning verb is the only route for a later update. |
|
|
903
|
+
| Workspace-owned | `WORKSPACE_OWNED_PATHS`, which holds `.gitignore` | The target workspace | Present bytes receive no later canonical ignore update. |
|
|
904
|
+
| Plan-owned | `DISTRIBUTION_TEST_PATH` | The plan, until the workspace writes its own | A deleted file is restored from the plan on the next write. |
|
|
905
|
+
| Unhydrated | Every vendored path a core-compiled plan carries | Scaffold, after a hydrating face reads them | Hydration restores the byte claim the core plan omits. |
|
|
906
|
+
|
|
907
|
+
The unhydrated row is the one a core-only caller meets most, and reading it as a claim about the
|
|
908
|
+
path is the mistake it invites. `Compiler` runs in the pure core face, which cannot read the
|
|
909
|
+
vendored data root, so every host artifact it plans carries `presence`: a claim over bytes nobody
|
|
910
|
+
has read is a claim no comparison could check. A `src: ['core']` plan therefore reports `presence`
|
|
911
|
+
for `AGENTS.md`, `.claude/settings.json`, `tests/policy.test.ts`, and every other vendored path, and
|
|
912
|
+
a consumer concluding from that reading that scaffold never replaces those bytes is wrong.
|
|
913
|
+
`Materializer` hydrates the plan before it audits or writes: hydration reads the vendored root and
|
|
914
|
+
turns each path scaffold owns the bytes of into a content-owned artifact, leaving `presence` on the
|
|
915
|
+
workspace-owned paths and the mirror pointers the preceding rows name. What a verb claims at a
|
|
916
|
+
vendored path is the hydrated ownership, and `HostArtifact` carries the same narrowing on the type.
|
|
835
917
|
|
|
836
918
|
Birth ownership is what makes a generated workspace the consumer's. `materialize` writes a
|
|
837
919
|
birth-owned path into a vacant target. A later `repair` or `overwrite` call treats that path as
|
|
@@ -842,16 +924,29 @@ You own `tests/setup.ts`, the selected `tests/setupBrowser.ts`, `tests/setupServ
|
|
|
842
924
|
`tests/setupService.ts`, and `tests/setupGlobal.ts` modules, each root `tests/setup*.test.ts` proof,
|
|
843
925
|
the selected environment entry tests under `tests/src` and `tests/app`, the
|
|
844
926
|
`tests/src/bin/main.test.ts` file, and the `tests/integration.test.ts` seed. Scaffold writes those
|
|
845
|
-
planned files only during materialize and leaves later edits or deletions alone. You also own the
|
|
846
|
-
`tests/
|
|
847
|
-
|
|
927
|
+
planned files only during materialize and leaves later edits or deletions alone. You also own the
|
|
928
|
+
`tests/guides.test.ts`, `tests/conformance.test.ts`, and `tests/service/**/*.test.ts` proof files,
|
|
929
|
+
each of which selects its project by being written. Scaffold content-owns `tests/setupPolicy.ts`,
|
|
848
930
|
`tests/policy.test.ts`, and `tests/config.test.ts`; `repair` and `overwrite` restore those files when
|
|
849
931
|
their bytes drift or the files are missing.
|
|
850
932
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
`
|
|
854
|
-
|
|
933
|
+
`tests/distribution.test.ts` is the one proof scaffold generates, and the one test artifact it
|
|
934
|
+
claims by presence. Generation is the line, not writing: scaffold writes the vendored
|
|
935
|
+
`tests/policy.test.ts` and `tests/config.test.ts` proofs too, and restores them, but those are the
|
|
936
|
+
shared file set's own bytes copied into the target. The distribution proof is derived from the
|
|
937
|
+
workspace's own shape instead, which is why it is the one proof a generated file can be. A
|
|
938
|
+
publishing workspace missing that file reports `missing` drift, and `repair` or `overwrite` writes
|
|
939
|
+
the generated proof there. A workspace that replaced the generated proof with a better one keeps its
|
|
940
|
+
own bytes exactly: presence compares existence, so no verb reads what is already at the path, none
|
|
941
|
+
replaces it, and none ever reports it stale. Deleting the file is how you ask for the generated
|
|
942
|
+
proof back; editing it is how you keep your own. Limits states what makes this proof generable when
|
|
943
|
+
the others are not.
|
|
944
|
+
|
|
945
|
+
Content ownership does not preserve an arbitrary custom Vitest project. The optional proof projects
|
|
946
|
+
are fixed: `guides`, `integration`, `conformance`, and `service` are selected by their defining
|
|
947
|
+
paths, and `distribution` by a published `src` environment. A workspace that needs other local
|
|
948
|
+
configuration must keep those edits outside a content-owned file; `repair` restores that file to the
|
|
949
|
+
canonical project set.
|
|
855
950
|
|
|
856
951
|
An audit reports one `Finding` per planned path, followed by any foreign path beneath the groups
|
|
857
952
|
the plan covers. Every planned finding carries its artifact's `ownership`. A foreign finding has
|
|
@@ -938,12 +1033,18 @@ lookup verdict records why the registry row could not enter a layer.
|
|
|
938
1033
|
|
|
939
1034
|
## Dependency floors
|
|
940
1035
|
|
|
941
|
-
Every scaffold-owned
|
|
1036
|
+
Every scaffold-owned runtime or development range is a floor: a caret over a whole
|
|
942
1037
|
`major.minor.patch` version. The triple is the newest release the registry served when that floor
|
|
943
1038
|
was last raised, so a workspace generated with no network still receives the latest floor scaffold
|
|
944
|
-
knew rather than a bare `major.0.0`.
|
|
945
|
-
|
|
946
|
-
`
|
|
1039
|
+
knew rather than a bare `major.0.0`. A `Blueprint.peers` row is written during creation into a
|
|
1040
|
+
vacant target. After creation, peer declarations and `peerDependenciesMeta` are caller-owned:
|
|
1041
|
+
`audit`, `repair`, `catalog`, and `overwrite` do not invent, rewrite, insert, or remove them. Caller
|
|
1042
|
+
extras also pass through unchanged. Extras follow `EXTRA_RANGE_PATTERN`; fleet peers follow
|
|
1043
|
+
`ORKESTREL_RANGE_PATTERN`; foreign peers follow `FLOOR_RANGE_PATTERN`.
|
|
1044
|
+
|
|
1045
|
+
The distribution project packs a caller-owned peer beside a co-peer witness that requires an exact
|
|
1046
|
+
version. The real npm resolver accepts the preserved range. Its narrowed-range control reports
|
|
1047
|
+
`ERESOLVE`.
|
|
947
1048
|
|
|
948
1049
|
The floors live in scaffold's own `package.json`. `BASE_DEV_DEPENDENCIES` and the tables beside it
|
|
949
1050
|
derive each row scaffold installs from that manifest, and the self-pin from its `version` field, so
|
|
@@ -1107,6 +1208,12 @@ except the manifest.
|
|
|
1107
1208
|
integration selection also emits a birth-owned `tests/integration.test.ts` seed that imports each
|
|
1108
1209
|
selected public barrel and records its initial empty exports for the consumer to replace with an
|
|
1109
1210
|
observable cross-environment flow.
|
|
1211
|
+
- One template artifact, `tests/distribution.test.ts`, for a workspace publishing any `src`
|
|
1212
|
+
environment. It is the packed-package proof, and it is claimed by presence rather than birth, so a
|
|
1213
|
+
workspace that replaces it keeps its replacement. A published browser environment adds the
|
|
1214
|
+
real-browser stage to it: the stage bundles the installed package with the workspace's own
|
|
1215
|
+
`configs/browsers.ts` resolution, serves the bundle over a loopback server, and drives it in
|
|
1216
|
+
Playwright Chromium.
|
|
1110
1217
|
- One template artifact each for `README.md` and `guides/README.md`.
|
|
1111
1218
|
- One host artifact per vendored path the workspace selects. A vendored directory is one planned
|
|
1112
1219
|
path that expands into the files the data root stores beneath it.
|
|
@@ -1317,32 +1424,157 @@ nothing. This is deliberate: a generated sample entity is repeatedly mistaken fo
|
|
|
1317
1424
|
implementation. What a consumer does first is write the module's `types.ts`, then the
|
|
1318
1425
|
implementation that conforms to it, then export both from the barrel — the order `AGENTS.md` fixes.
|
|
1319
1426
|
|
|
1320
|
-
**
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1427
|
+
**Scaffold generates the distribution proof and refuses to generate every other one.** The subject
|
|
1428
|
+
is what separates them, and it is the whole rule. Generating a file is not the same as writing one:
|
|
1429
|
+
scaffold also writes `tests/policy.test.ts` and `tests/config.test.ts` into a target, byte for byte
|
|
1430
|
+
from the shared file set, and the distribution proof is the one it derives from the workspace it is
|
|
1431
|
+
writing into.
|
|
1432
|
+
|
|
1433
|
+
A distribution proof's every assertion derives from the artifact the workspace installs: the
|
|
1434
|
+
`exports` map the packed tarball declares, the built declarations beside it, and the module objects
|
|
1435
|
+
a Node import, a CommonJS require, and a real browser hand back from that installed tree. Nothing
|
|
1436
|
+
there has to be named, so one generated file measures every publishing workspace, and it stays true
|
|
1437
|
+
as that workspace's published surface moves.
|
|
1438
|
+
|
|
1439
|
+
A guide, conformance, live-service, or setup proof asserts something scaffold cannot read: the API a
|
|
1440
|
+
guide fence claims, the official runner a conformance check measures against, the service a live
|
|
1441
|
+
proof drives, and what a setup module does. That subject is what no generated file can reach, and
|
|
1442
|
+
the claim here is about the subject rather than about every property those files have. A structural
|
|
1443
|
+
property of the same files can be derivable — whether each root `tests/setup*.ts` module is
|
|
1444
|
+
reachable from the root configuration is one — and a file asserting it would still leave the
|
|
1445
|
+
module's behavior unmeasured. A generated file there would read as a proof while measuring nothing,
|
|
1446
|
+
which is worse than an absent one. So the file a consumer writes is what selects each of those
|
|
1447
|
+
projects, and `tests/distribution.test.ts` is the one proof scaffold generates for you.
|
|
1448
|
+
|
|
1449
|
+
Registration follows the same split. Scaffold registers `conformance` and `service` when their
|
|
1450
|
+
structural facts are set, and registers `distribution` whenever the workspace publishes at least one
|
|
1451
|
+
`src` environment. In a publishing workspace, `distribution` and `service` run from `prepublishOnly`
|
|
1452
|
+
and `conformance` stays in `test`. In a `private: true` workspace, `distribution` is absent,
|
|
1453
|
+
`service` runs from `test`, and there is no `prepublishOnly` at all. One gap the project set cannot
|
|
1454
|
+
show, `audit` reports directly: a filled `tests/setup*.ts` module that no `tests/setup*.test.ts`
|
|
1455
|
+
proof covers raises the non-blocking `setup` question, which names the modules and the proof to add.
|
|
1456
|
+
Scaffold generates nothing there either, because what that proof asserts is those modules' own
|
|
1457
|
+
behavior, which only the workspace that wrote them can state.
|
|
1458
|
+
|
|
1459
|
+
The generated proof partitions the installed `exports` map rather than sampling it. Every published
|
|
1460
|
+
subpath lands in exactly one of driven, undeclared, or excluded, and a totality assertion holds that
|
|
1461
|
+
partition against the map's own subpath list, so a subpath the proof classifies into none of them
|
|
1462
|
+
reddens instead of disappearing. Another assertion beside it names every driven subpath whose entry
|
|
1463
|
+
resolves no Node target and no browser target: each drive retires itself for such a subpath, so
|
|
1464
|
+
membership of the partition alone would leave one measured by nothing. Together they hold that every
|
|
1465
|
+
published subpath is driven, or is named where the proof cannot drive it.
|
|
1466
|
+
|
|
1467
|
+
A subpath is driven when its entry resolves a declaration, and each measurement resolves that entry
|
|
1468
|
+
under the conditions of the driver taking it rather than under one shared set. The Node ESM runtime
|
|
1469
|
+
resolves `node-addons`, `node`, `import`, and `module-sync`; the Node CommonJS runtime resolves
|
|
1470
|
+
`node-addons`, `node`, `require`, and `module-sync`; Vite's production client build resolves
|
|
1471
|
+
`module`, `browser`, `production`, and `import`. A subpath whose Vite resolution lands under
|
|
1472
|
+
`dist/src/browser/` is driven in a real browser and the Node drives retire for it; every other
|
|
1473
|
+
subpath is imported where the Node ESM set resolves a target and required where the Node CommonJS
|
|
1474
|
+
set resolves one.
|
|
1475
|
+
|
|
1476
|
+
The CommonJS compile probe resolves the declaration under `types`, `node`, and `require`, then reads
|
|
1477
|
+
that declaration's format. TypeScript accepts an existing declaration target directly. Otherwise it
|
|
1478
|
+
substitutes beside the resolved JavaScript target: `.cjs` maps to `.d.cts`, `.mjs` maps to `.d.mts`,
|
|
1479
|
+
and `.js` maps to `.d.ts`. A missing target under `types` leaves that condition unresolved, so the
|
|
1480
|
+
walk continues through the remaining conditions or fallback members. A `.d.cts` declaration admits
|
|
1481
|
+
the subpath. A `.d.mts` declaration refuses it. A `.d.ts` declaration takes the nearest enclosing
|
|
1482
|
+
physical `package.json` file from its own directory: a `"type": "module"` field refuses, while
|
|
1483
|
+
`"type": "commonjs"`, an omitted field, or a manifest that cannot supply a readable field admits.
|
|
1484
|
+
A directory named `package.json` starts no scope, so the walk continues outward. The runtime target
|
|
1485
|
+
does not decide compile membership. The runtime drive separately resolves under `node-addons`,
|
|
1486
|
+
`node`, `require`, and `module-sync`, then loads the subpath whatever declaration format the compile
|
|
1487
|
+
probe found. An invalid non-list target beside a valid CommonJS declaration therefore reaches Node's
|
|
1488
|
+
`ERR_INVALID_PACKAGE_TARGET` failure instead of being dropped during classification.
|
|
1489
|
+
|
|
1490
|
+
The mirror assertion reports a CommonJS typing defect only when the entry's own mapping declares an
|
|
1491
|
+
explicit `require` condition, the Node `require` resolver reaches the entry, and the selected
|
|
1492
|
+
declaration refuses a CommonJS consumer. A `default` branch that merely resolves under the require
|
|
1493
|
+
condition set makes no CommonJS claim.
|
|
1494
|
+
|
|
1495
|
+
Each drive compares against the declaration its own consumer reads, resolved under the conditions
|
|
1496
|
+
TypeScript applies for that resolution and importing format: `types` first and the format's own
|
|
1497
|
+
condition after it, with `node` between them for the `node16` and `nodenext` resolutions and left
|
|
1498
|
+
out for `bundler`, which is the set the browser drive compares against. The import declaration and
|
|
1499
|
+
the require declaration are resolved independently and kept separately on the entry, so a dual
|
|
1500
|
+
subpath is compiled against the declaration each consumer format reads rather than against whichever
|
|
1501
|
+
one answered first. That is what drives a `require`-only subpath declaring its types inside
|
|
1502
|
+
`require`, and what admits a conventional subpath that publishes no `types` condition but ships the
|
|
1503
|
+
adjacent declaration TypeScript substitutes from its runtime target.
|
|
1504
|
+
|
|
1505
|
+
A subpath is undeclared when it resolves no declaration and names a runtime target, which is a
|
|
1506
|
+
defect, because a consumer importing it compiles against nothing under `node16`. A target is a
|
|
1507
|
+
runtime target when its own file name carries no extension at all, or carries `.js`, `.mjs`,
|
|
1508
|
+
`.cjs`, or `.node`. An extensionless target loads, because `require` reads such a file through its
|
|
1509
|
+
JavaScript handler; a `.wasm` target does not, because it carries an extension that is not a
|
|
1510
|
+
JavaScript one. A
|
|
1511
|
+
`.node` target is named beside them because `require` loads a native addon through its own handler
|
|
1512
|
+
rather than the JavaScript one, and the addon publishes names to whatever loads it. The test is the
|
|
1513
|
+
extension the name carries rather than a denylist of asset extensions. Reading the
|
|
1514
|
+
file name rather than the whole path is load-bearing: `./dist/bundle.js/feature` and
|
|
1515
|
+
`./dist/v1.2/index` are modules, and reading the path gets each of them wrong. What the rule
|
|
1516
|
+
excludes is stated where the proof is emitted: an extensionless file published for a reader, such as
|
|
1517
|
+
a `LICENSE` at a subpath, reports undeclared until it is given an extension or a declaration. That
|
|
1518
|
+
is the safe direction: the proof names a subpath it cannot vouch for rather than passing one it
|
|
1519
|
+
never measured.
|
|
1520
|
+
|
|
1521
|
+
A subpath is excluded when it resolves no declaration and names no runtime target: the
|
|
1522
|
+
`./package.json` pointer, a published stylesheet, and a WebAssembly binary are read rather than
|
|
1523
|
+
imported, and the proof names them where it excludes them.
|
|
1524
|
+
|
|
1525
|
+
Classification reads every target the entry names under every condition, and the members of a
|
|
1526
|
+
fallback list with them: Node reads an array in an exports entry as a list of fallbacks, and a
|
|
1527
|
+
reader taking a later member takes a file the installed tree still owes. Node's package-target rules
|
|
1528
|
+
apply inside that list, so a member naming a path outside the package or carrying a `.`, `..`, or
|
|
1529
|
+
`node_modules` segment is skipped rather than resolved or collected: Node falls through to the next
|
|
1530
|
+
member, and no reader can take the one it passed. A standalone target Node rejects the same way is
|
|
1531
|
+
still read and reported, because Node throws on one rather than falling through to anything. So a
|
|
1532
|
+
`require`-only CommonJS subpath carrying no declaration reddens too, and a `.d.ts` or `.d.cts`
|
|
1533
|
+
target never satisfies the runtime-target test, so a types-only condition cannot stand in for a
|
|
1534
|
+
missing declaration.
|
|
1535
|
+
|
|
1536
|
+
A `./*` subpath pattern is read as an ordinary subpath, with no expansion of the `*`, so a pattern
|
|
1537
|
+
naming a runtime target reddens rather than landing in excluded. That is deliberate: excluding the
|
|
1538
|
+
pattern would account for a whole family of published subpaths and measure none of them, which is
|
|
1539
|
+
the silence this partition exists to close. Measuring the family means expanding the pattern against
|
|
1540
|
+
the installed tree and driving each match, which this proof does not do. A maintainer meeting that
|
|
1541
|
+
red is reading the honest answer — the proof does not measure that family — rather than a defect in
|
|
1542
|
+
the proof.
|
|
1543
|
+
|
|
1544
|
+
The proof generated for a workspace publishing no browser face asserts that no browser face exists.
|
|
1545
|
+
That variant drives a Node import and a Node require and carries no browser branch, because the
|
|
1546
|
+
branch follows a published browser face on the `src` axis: the browser drive measures the packed
|
|
1547
|
+
artifact, and only a published face is packed. A workspace that selects `browser` on its `app` axis
|
|
1548
|
+
alone declares `playwright` and `@vitest/browser-playwright` and gets `configs/browsers.ts` emitted,
|
|
1549
|
+
and its proof still carries no branch: the selector reads the `src` axis, and a generated manifest
|
|
1550
|
+
packs `dist/src`, so an application face is neither selected nor packed. The imports the branch
|
|
1551
|
+
needs are declared by either axis, so they do not select the branch. The `vite` import selects
|
|
1552
|
+
nothing either: every workspace declares `vite`, whatever it publishes. In a core-only workspace,
|
|
1553
|
+
those imports resolve to nothing, and emitting the branch there would fail its own `check` and
|
|
1554
|
+
`lint:check` gates. Its Node cases retire themselves for a browser face, so a face published after
|
|
1555
|
+
the file was written would leave nothing measuring it. The assertion reddens instead, and names the
|
|
1556
|
+
subpath a browser branch is owed for. The remedy it carries is to delete the file and run `repair`,
|
|
1557
|
+
which writes the variant that carries the branch — the same route presence ownership already gives
|
|
1558
|
+
you for asking for the generated proof back.
|
|
1559
|
+
|
|
1560
|
+
The generated distribution proof takes its release contract from the outside. The generated
|
|
1561
|
+
`prepublishOnly` invokes it as `npm run test:distribution -- --mode release`, and the proof reads
|
|
1562
|
+
`import.meta.env.MODE === 'release'` and **fails** on an unreachable registry rather than skipping.
|
|
1563
|
+
An ordinary local run skips that case, because a developer offline is not a defect; a release run
|
|
1564
|
+
does not, because skipping there passes the publish gate without ever proving the artifact installs.
|
|
1565
|
+
A workspace that replaces the generated proof takes that contract with it: presence ownership leaves
|
|
1566
|
+
a replacement alone, so a replacement that ignores the flag reports green on exactly the runs that
|
|
1567
|
+
matter.
|
|
1568
|
+
|
|
1569
|
+
The consequence is one empty-project case per refused proof. A blueprint carrying `conformance` with
|
|
1570
|
+
no `tests/conformance.test.ts` registers a project whose include resolves to nothing, and Vitest
|
|
1571
|
+
exits non-zero on it. A blueprint carrying `service` gets `tests/setupService.ts` — the root
|
|
1572
|
+
configuration names that module by path, so an absent one fails the project's load rather than its
|
|
1573
|
+
run — and still no suite beneath `tests/service`, so `test:service` reports no test files until the
|
|
1574
|
+
consumer writes the first one. The `distribution` project no longer has that case: `new` writes the
|
|
1575
|
+
proof into the workspace it registers the project in, and a target that later lost the file reports
|
|
1576
|
+
drift that `repair` closes. Every remaining case is visible the first time the script runs, which is
|
|
1577
|
+
why none is silent.
|
|
1346
1578
|
|
|
1347
1579
|
None of those folds into `integration`, which measures a different axis rather than a smaller
|
|
1348
1580
|
one: the workspace's selected environments compose through their public barrels. The generated seed
|