|
2 | 2 |
|
3 | 3 | import type { SemanticMigration } from '../../types.js'; |
4 | 4 |
|
5 | | -// An accept-set narrowing of composition, beside a runtime fix. A |
6 | | -// composeStacks(…, { manifest: 'preserve' }) artifact's residual (top-level |
7 | | -// entries no package body claims, registered under manifest.id) now has its |
8 | | -// objectExtensions registered by the engine, where no door registered one; the |
9 | | -// composition door judges what that registration makes one package. No D2 |
10 | | -// conversion: which of two extensions or two jobs to keep is the author's call. |
| 5 | +// An accept-set narrowing of composition, beside a runtime fix. A composed |
| 6 | +// artifact that carries packages[] has a residual (top-level entries no package |
| 7 | +// body claims, registered under manifest.id); its objectExtensions are now |
| 8 | +// registered by the engine, where no door registered one, and the composition |
| 9 | +// door judges what that registration makes one package. That holds under every |
| 10 | +// manifest strategy: 'preserve' with an input that has no manifest, and |
| 11 | +// 'first' / 'last' / an index with an input that is itself a multi-package |
| 12 | +// artifact. No D2 conversion: which of two extensions or two jobs to keep is the |
| 13 | +// author's call. |
| 14 | +// |
| 15 | +// Known gap, left to the job binder and not judged at composition: a residual |
| 16 | +// job whose name a package body's job also carries (with other content) is read |
| 17 | +// as that body's copy and composes, and the boot schedules neither of the two |
| 18 | +// enabled jobs. A follow-up card carries the question. |
11 | 19 | export const entry: SemanticMigration = { |
12 | 20 | id: 'stack-residual-extension-registered-and-jobs-judged', |
13 | 21 | surface: |
14 | | - "composeStacks(…, { manifest: 'preserve' }) with inputs that carry no manifest: two of them declaring one job " |
15 | | - + 'name, or one carrying an objectExtensions entry for an object that the last input with a manifest also ' |
16 | | - + 'extends with other fields.', |
| 22 | + 'composeStacks(…) whose result carries packages[] beside top-level entries no package body claims (the residual): ' |
| 23 | + + "under manifest 'preserve' the entries of inputs that carry no manifest, and under 'first', 'last' or an index " |
| 24 | + + 'also every top-level entry an input that is itself a multi-package artifact carries of its own. Refused there ' |
| 25 | + + 'now: two residual jobs of one name; a residual objectExtensions entry for an object that the body carrying ' |
| 26 | + + 'manifest.id also extends with other fields; two residual objectExtensions entries for one object, also when a ' |
| 27 | + + 'package body extends that object too (before this release they counted as that body\'s copies and composed).', |
17 | 28 | replacement: |
18 | 29 | 'Declare each job name once in the artifact. Put a top-level extension in the package that owns it, or merge it ' |
19 | | - + "into that package's own objectExtensions entry for the same object: the residual registers under the " |
20 | | - + "artifact's manifest id, which under manifest preserve is the last input with a manifest, and one extension " |
21 | | - + 'of an object registers per package.', |
| 30 | + + "into that package's own objectExtensions entry for the same object, and merge two top-level extensions of one " |
| 31 | + + "object into one: the residual registers under the artifact's manifest id (under manifest preserve the last " |
| 32 | + + 'input with a manifest, under first / last / an index the manifest that strategy keeps), and one extension of an ' |
| 33 | + + 'object registers per package.', |
22 | 34 | reason: |
23 | 35 | 'A residual objectExtensions entry was registered by no door, so its fields were missing on the target and ' |
24 | | - + 'nothing was said; it now registers under manifest.id. That id is also a package body under manifest preserve, ' |
25 | | - + 'so a residual entry for an object that body extends too keeps only the last fields, and composition refuses ' |
26 | | - + 'the pair (STACK_CROSS_REFERENCE_INVALID) with the one-package wording, the body entry first. Two residual jobs ' |
27 | | - + 'of one name composed and the boot then scheduled neither (NOT SCHEDULED at error); composition refuses them ' |
28 | | - + 'now, and the jobs wording at every door says that none of them runs. An artifact built before this keeps ' |
29 | | - + 'loading: a residual extension pair is registered (the last one served) with an error line naming both.', |
| 36 | + + 'nothing was said; it now registers under manifest.id. A residual entry is told from a body\'s flattened copy by ' |
| 37 | + + 'value, not by target, so two residual entries for one object are one package\'s pair whatever other packages ' |
| 38 | + + 'extend, and only the last one\'s fields register. Under manifest preserve that id is also a package body, so a ' |
| 39 | + + 'residual entry for an object that body extends too keeps only the last fields. Composition refuses each pair ' |
| 40 | + + '(STACK_CROSS_REFERENCE_INVALID) with the one-package wording, a body entry first. Two residual jobs of one name ' |
| 41 | + + 'composed and the boot then scheduled neither (NOT SCHEDULED at error); composition refuses them now, and the ' |
| 42 | + + 'jobs wording at every door says that when both are enabled neither runs. The same holds under first, last or ' |
| 43 | + + 'an index once an input carries packages[]. An artifact built before this keeps loading: a residual extension ' |
| 44 | + + 'pair is registered (the last one served) with an error line naming both. One case is NOT refused: a residual ' |
| 45 | + + 'job sharing its name with a package body\'s job composes, and the binder schedules neither (a known gap).', |
30 | 46 | acceptanceCriteria: |
31 | 47 | 'objectstack validate and objectstack build load the composed stack without a STACK_CROSS_REFERENCE_INVALID ' |
32 | 48 | + 'finding "Job \'NAME\' is declared twice in jobs" or "Object extension of \'OBJECT\' is declared twice in ' |
|
0 commit comments