@wildshard/shard-format 0.74.1 → 0.76.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/package.json +2 -1
- package/src/format/clientNative.ts +0 -87
- package/src/format/clientOwnership.ts +3 -3
- package/src/format/clientPlan.ts +4 -4
- package/src/format/clientTrails.ts +9 -25
- package/src/format/cook-data.ts +5 -23
- package/src/format/deprecations.ts +9 -3
- package/src/format/engine-floor.ts +68 -0
- package/src/format/feature-sides.ts +0 -1
- package/src/format/format-migration-envelope.ts +17 -0
- package/src/format/format-migration-homes.ts +103 -0
- package/src/format/format-migration-manifest.ts +183 -0
- package/src/format/format-migration-prune.ts +1 -1
- package/src/format/format-migrations.ts +12 -0
- package/src/format/headless-sections.ts +2 -0
- package/src/format/manifest-deprecations.ts +174 -6
- package/src/format/memory-armed.json +1 -203
- package/src/format/memory-armed.ts +4 -25
- package/src/format/memory-epoch.ts +1 -1
- package/src/format/memory-line.ts +12 -3
- package/src/format/outputIndex.ts +19 -2
- package/src/format/policy-verdict.ts +1 -1
- package/src/format/primitive-table.ts +0 -1
- package/src/format/shardSections.ts +5 -1
- package/src/format/shardfile-stream-rows.ts +13 -1
- package/src/format/shardfile-stream.ts +3 -2
- package/src/format/shardfileValidation.ts +3 -2
- package/src/format/version.ts +51 -15
- package/src/tools/runtime-hosts.json +0 -4
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// oxlint-disable typescript/prefer-readonly-parameter-types -- a step edits the shard it is handed, in place
|
|
2
|
+
/** FORMAT-PRUNE FP34 (J486; ONE-FORMAT OF9b5a): format 0.1.0.6 takes the moved words out of the level manifest. The
|
|
3
|
+
* page-start words move into their sections as `liftLevelStart` moves them at the door (a section's own value wins):
|
|
4
|
+
* `spawn` into `world/spawn` when the shard never set one, `loadout` into `combat/items`' `loadout.level`, `audio` into
|
|
5
|
+
* `audio/audio`'s `level`. `weapon` has no reader (`combat/items` arms the player) and leaves. The herd fields
|
|
6
|
+
* (`species`, `spawns`, `faunaTuning`) became declared rows in the build (OF9b4), which a copy of the file can't redo, so
|
|
7
|
+
* they leave too: a file that still needs them is rebuilt on SDK 0.4.25 or later. */
|
|
8
|
+
import { DEFAULT_SPAWN } from './level-start.ts'
|
|
9
|
+
import {
|
|
10
|
+
LEVEL_WORDS,
|
|
11
|
+
NO_LEVEL_WORDS,
|
|
12
|
+
isDiscoveryMount,
|
|
13
|
+
} from './manifest-deprecations.ts'
|
|
14
|
+
|
|
15
|
+
import type { FormatMigration, MigratingShard } from './format-migrations.ts'
|
|
16
|
+
|
|
17
|
+
type JsonRecord = Record<string, unknown>
|
|
18
|
+
|
|
19
|
+
const MANIFEST_WORDS_GONE = '0.1.0.6'
|
|
20
|
+
const MOVED_WORDS: readonly string[] = [
|
|
21
|
+
'spawn',
|
|
22
|
+
'loadout',
|
|
23
|
+
'audio',
|
|
24
|
+
'weapon',
|
|
25
|
+
'species',
|
|
26
|
+
'spawns',
|
|
27
|
+
'faunaTuning',
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
function isRecord(value: unknown): value is JsonRecord {
|
|
31
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** `field` of section `name`, when both are objects. */
|
|
35
|
+
function sectionField(
|
|
36
|
+
shard: Readonly<MigratingShard>,
|
|
37
|
+
name: string,
|
|
38
|
+
field: string,
|
|
39
|
+
): JsonRecord | undefined {
|
|
40
|
+
const section = shard.sections.get(name)
|
|
41
|
+
const value = isRecord(section) ? section[field] : undefined
|
|
42
|
+
return isRecord(value) ? value : undefined
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Whether a world spawn is the default one, a shard that never set `world/spawn`. */
|
|
46
|
+
function defaultSpawn(spawn: Readonly<JsonRecord>): boolean {
|
|
47
|
+
return (
|
|
48
|
+
spawn['x'] === DEFAULT_SPAWN.x &&
|
|
49
|
+
spawn['y'] === DEFAULT_SPAWN.y &&
|
|
50
|
+
spawn['z'] === DEFAULT_SPAWN.z &&
|
|
51
|
+
spawn['yaw'] === DEFAULT_SPAWN.yaw
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** The manifest's spawn stands the world spawn, keeping the section's height when it has none (a page on terrain). */
|
|
56
|
+
function liftSpawn(
|
|
57
|
+
shard: MigratingShard,
|
|
58
|
+
manifest: Readonly<JsonRecord>,
|
|
59
|
+
): void {
|
|
60
|
+
const spawn = sectionField(shard, 'world/spawn', 'spawn')
|
|
61
|
+
const from = manifest['spawn']
|
|
62
|
+
if (spawn === undefined || !isRecord(from) || !defaultSpawn(spawn)) {
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
// oxlint-disable-next-line eslint/id-length -- world/spawn names its height y
|
|
66
|
+
Object.assign(spawn, { ...from, y: from['y'] ?? spawn['y'] })
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** The manifest's loadout and audio fill their sections' empty `level`. */
|
|
70
|
+
function liftLevels(
|
|
71
|
+
shard: MigratingShard,
|
|
72
|
+
manifest: Readonly<JsonRecord>,
|
|
73
|
+
): void {
|
|
74
|
+
const items = sectionField(shard, 'combat/items', 'items')
|
|
75
|
+
const loadout = isRecord(items) ? items['loadout'] : undefined
|
|
76
|
+
if (
|
|
77
|
+
isRecord(loadout) &&
|
|
78
|
+
loadout['level'] === undefined &&
|
|
79
|
+
manifest['loadout'] !== undefined
|
|
80
|
+
) {
|
|
81
|
+
loadout['level'] = manifest['loadout']
|
|
82
|
+
}
|
|
83
|
+
const audio = sectionField(shard, 'audio/audio', 'audio')
|
|
84
|
+
if (
|
|
85
|
+
audio !== undefined &&
|
|
86
|
+
audio['level'] === undefined &&
|
|
87
|
+
manifest['audio'] !== undefined
|
|
88
|
+
) {
|
|
89
|
+
audio['level'] = manifest['audio']
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Lift a manifest-shaped object's start words into their sections, then drop every moved word and the old pointer. */
|
|
94
|
+
function liftAndDrop(shard: MigratingShard, manifest: JsonRecord): void {
|
|
95
|
+
liftSpawn(shard, manifest)
|
|
96
|
+
liftLevels(shard, manifest)
|
|
97
|
+
for (const word of [...MOVED_WORDS, 'gridShardfile']) {
|
|
98
|
+
Reflect.deleteProperty(manifest, word)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** FORMAT-PRUNE FP34: the level manifest carries none of the moved words. */
|
|
103
|
+
const manifestMovedWords: FormatMigration = {
|
|
104
|
+
id: 'fp34-manifest-moved-words',
|
|
105
|
+
to: MANIFEST_WORDS_GONE,
|
|
106
|
+
touches: 'data',
|
|
107
|
+
affects: [],
|
|
108
|
+
apply: (shard: MigratingShard): void => {
|
|
109
|
+
const manifest = sectionField(shard, 'ui/level', 'manifest')
|
|
110
|
+
if (manifest === undefined) {
|
|
111
|
+
return
|
|
112
|
+
}
|
|
113
|
+
liftAndDrop(shard, manifest)
|
|
114
|
+
// FORMAT-PRUNE FP47c: the map image leaves too, as `liftLevelStart` drops it at the door (look/map draws the map)
|
|
115
|
+
const map = manifest['minimap']
|
|
116
|
+
if (isRecord(map)) {
|
|
117
|
+
Reflect.deleteProperty(map, 'image')
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** FORMAT-PRUNE FP36: the discovery mount's `data` repeats the level manifest; it carries none of the moved words either.
|
|
123
|
+
* Runs after FP34's step, so a section the level manifest already filled keeps its value. */
|
|
124
|
+
const discoveryMovedWords: FormatMigration = {
|
|
125
|
+
id: 'fp36-discovery-moved-words',
|
|
126
|
+
to: MANIFEST_WORDS_GONE,
|
|
127
|
+
touches: 'data',
|
|
128
|
+
affects: [],
|
|
129
|
+
apply: (shard: MigratingShard): void => {
|
|
130
|
+
for (const [path, mount] of shard.mounts) {
|
|
131
|
+
const data = isRecord(mount) ? mount['data'] : undefined
|
|
132
|
+
if (isDiscoveryMount(path) && isRecord(data)) {
|
|
133
|
+
liftAndDrop(shard, data)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** FORMAT-PRUNE FP47b: a manifest-shaped object's level look (sky, atmosphere and grade, and a horizon when it paints
|
|
140
|
+
* one) fills `look/look`'s empty `level`, as `liftLevelLook` does at the door; the look's own wins. Then the four words
|
|
141
|
+
* leave the object. A partial look (no sky, atmosphere or grade) has no level to give and only leaves. */
|
|
142
|
+
function liftLevelWords(shard: MigratingShard, manifest: JsonRecord): void {
|
|
143
|
+
const look = sectionField(shard, 'look/look', 'look')
|
|
144
|
+
const { sky, atmosphere, grade, horizon } = manifest
|
|
145
|
+
if (
|
|
146
|
+
look !== undefined &&
|
|
147
|
+
look['level'] === undefined &&
|
|
148
|
+
sky !== undefined &&
|
|
149
|
+
atmosphere !== undefined &&
|
|
150
|
+
grade !== undefined
|
|
151
|
+
) {
|
|
152
|
+
look['level'] =
|
|
153
|
+
horizon === undefined
|
|
154
|
+
? { sky, atmosphere, grade }
|
|
155
|
+
: { sky, atmosphere, grade, horizon }
|
|
156
|
+
}
|
|
157
|
+
for (const word of LEVEL_WORDS) {
|
|
158
|
+
Reflect.deleteProperty(manifest, word)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** FORMAT-PRUNE FP47b: format 0.1.0.6 takes the level look out of the level manifest and the discovery mount; it lives
|
|
163
|
+
* in `look/look`'s `level` (ONE-FORMAT OF9b2). The level manifest gives first, then each discovery mount. */
|
|
164
|
+
const levelLook: FormatMigration = {
|
|
165
|
+
id: 'fp47b-level-look',
|
|
166
|
+
to: NO_LEVEL_WORDS,
|
|
167
|
+
touches: 'data',
|
|
168
|
+
affects: [],
|
|
169
|
+
apply: (shard: MigratingShard): void => {
|
|
170
|
+
const manifest = sectionField(shard, 'ui/level', 'manifest')
|
|
171
|
+
if (manifest !== undefined) {
|
|
172
|
+
liftLevelWords(shard, manifest)
|
|
173
|
+
}
|
|
174
|
+
for (const [path, mount] of shard.mounts) {
|
|
175
|
+
const data = isRecord(mount) ? mount['data'] : undefined
|
|
176
|
+
if (isDiscoveryMount(path) && isRecord(data)) {
|
|
177
|
+
liftLevelWords(shard, data)
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export { MOVED_WORDS, discoveryMovedWords, levelLook, manifestMovedWords }
|
|
@@ -5,11 +5,18 @@
|
|
|
5
5
|
import {
|
|
6
6
|
dropEmptyIndexFields,
|
|
7
7
|
dropRequiresCapabilities,
|
|
8
|
+
dropRequiresSdk,
|
|
8
9
|
formatVersionField,
|
|
9
10
|
preparationMarker,
|
|
10
11
|
saveRevisionName,
|
|
11
12
|
} from './format-migration-envelope.ts'
|
|
13
|
+
import { homesToMembers } from './format-migration-homes.ts'
|
|
12
14
|
import { journalGlyphImages } from './format-migration-journal.ts'
|
|
15
|
+
import {
|
|
16
|
+
discoveryMovedWords,
|
|
17
|
+
levelLook,
|
|
18
|
+
manifestMovedWords,
|
|
19
|
+
} from './format-migration-manifest.ts'
|
|
13
20
|
import {
|
|
14
21
|
dropRuntimeTrust,
|
|
15
22
|
schemaSource,
|
|
@@ -82,6 +89,11 @@ const FORMAT_MIGRATIONS: readonly FormatMigration[] = [
|
|
|
82
89
|
saveRevisionName,
|
|
83
90
|
schemaSource,
|
|
84
91
|
dropRequiresCapabilities,
|
|
92
|
+
dropRequiresSdk,
|
|
93
|
+
homesToMembers,
|
|
94
|
+
manifestMovedWords,
|
|
95
|
+
discoveryMovedWords,
|
|
96
|
+
levelLook,
|
|
85
97
|
]
|
|
86
98
|
|
|
87
99
|
/** Whether a file at `version` still needs a step that writes `to`. The legacy two-part spelling sits just below its
|
|
@@ -18,6 +18,8 @@ export const HEADLESS_CONTEXT_SECTIONS = [
|
|
|
18
18
|
'sim/bodies',
|
|
19
19
|
// The offline simulation reads the ordinary portal ride from this plan.
|
|
20
20
|
'client/plan',
|
|
21
|
+
// SHARD-COMPAT HS6: the server reads its feature rows (the portal ride among them) from its own plan only.
|
|
22
|
+
'server/plan',
|
|
21
23
|
] as const
|
|
22
24
|
|
|
23
25
|
/** Explicit admitted decision/move context crossing the worker boundary; no ABI is inferred from bytes. */
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/** ONE-FORMAT OF9b5 under J486: the level manifest's moved words. SDK 0.4.25 builds write none of them (OF9b3b moved
|
|
2
2
|
* the page-start words to their sections, OF9b4 the herd fields to declared rows), but every product built before it
|
|
3
|
-
* still carries some in `ui/level`. FE7 counts each one's kept users
|
|
4
|
-
* `ManifestMetadataSchema` at
|
|
5
|
-
*
|
|
3
|
+
* still carries some in `ui/level`. FE7 counts each one's kept users. FORMAT-PRUNE FP34 deletes them from
|
|
4
|
+
* `ManifestMetadataSchema` at format 0.1.0.6, and its chain step (`fp34-manifest-moved-words`) lifts the start words into
|
|
5
|
+
* their sections and drops the rest: the herd fields became declared rows in the build, which a copy can't redo. */
|
|
6
|
+
|
|
7
|
+
import { OLD_POINTER } from './format-migration-prune.ts'
|
|
8
|
+
import { compareShardfileVersions } from './version.ts'
|
|
6
9
|
|
|
7
10
|
/** The registry's row shape (`deprecations.ts`). */
|
|
8
11
|
interface ManifestDeprecation {
|
|
@@ -10,7 +13,7 @@ interface ManifestDeprecation {
|
|
|
10
13
|
readonly path: string
|
|
11
14
|
readonly since: string
|
|
12
15
|
readonly replacement: string
|
|
13
|
-
readonly migration:
|
|
16
|
+
readonly migration: string
|
|
14
17
|
readonly uses: (
|
|
15
18
|
shard: Readonly<{ sections: ReadonlyMap<string, unknown> }>,
|
|
16
19
|
) => boolean
|
|
@@ -40,7 +43,7 @@ const MANIFEST_MOVED_DEPRECATIONS: readonly ManifestDeprecation[] = MOVED.map(
|
|
|
40
43
|
path: `sections/ui/level manifest.${word} (ONE-FORMAT OF9b5)`,
|
|
41
44
|
since: '0.1.0.4',
|
|
42
45
|
replacement,
|
|
43
|
-
migration:
|
|
46
|
+
migration: 'fp34-manifest-moved-words',
|
|
44
47
|
uses: (
|
|
45
48
|
shard: Readonly<{ sections: ReadonlyMap<string, unknown> }>,
|
|
46
49
|
): boolean => {
|
|
@@ -54,4 +57,169 @@ const MANIFEST_MOVED_DEPRECATIONS: readonly ManifestDeprecation[] = MOVED.map(
|
|
|
54
57
|
}),
|
|
55
58
|
)
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
/** FORMAT-PRUNE FP47b: each level look word the manifest carried before OF9b2, and the chain step that lifts it. */
|
|
61
|
+
const LEVEL_DEPRECATIONS: readonly ManifestDeprecation[] = [
|
|
62
|
+
'sky',
|
|
63
|
+
'atmosphere',
|
|
64
|
+
'grade',
|
|
65
|
+
'horizon',
|
|
66
|
+
].map((word: string): ManifestDeprecation => ({
|
|
67
|
+
id: `manifest.${word}`,
|
|
68
|
+
path: `sections/ui/level manifest.${word} (and the discovery mount; ONE-FORMAT OF9b2)`,
|
|
69
|
+
since: '0.1.0.4',
|
|
70
|
+
replacement: `look/look's level.${word} (OF9b2)`,
|
|
71
|
+
migration: 'fp47b-level-look',
|
|
72
|
+
uses: (
|
|
73
|
+
shard: Readonly<{ sections: ReadonlyMap<string, unknown> }>,
|
|
74
|
+
): boolean => {
|
|
75
|
+
const manifest = manifestOf(shard.sections)
|
|
76
|
+
return (
|
|
77
|
+
typeof manifest === 'object' &&
|
|
78
|
+
manifest !== null &&
|
|
79
|
+
Object.hasOwn(manifest, word)
|
|
80
|
+
)
|
|
81
|
+
},
|
|
82
|
+
}))
|
|
83
|
+
/** FORMAT-PRUNE FP34: the first format whose level manifest carries none of the moved words, nor the old pointer. */
|
|
84
|
+
// 0.75.0 shipped format 0.1.0.5 without FP34 and FP36, so they ride 0.1.0.6 with FP47b.
|
|
85
|
+
const NO_MOVED_WORDS = '0.1.0.6'
|
|
86
|
+
const NONE = 0
|
|
87
|
+
// The old pointer's spelling is FP8's chain step's (format's one-way `format.grid-pointer-references` counts each one).
|
|
88
|
+
const GONE_WORDS: readonly string[] = [
|
|
89
|
+
OLD_POINTER,
|
|
90
|
+
...MOVED.map(([word]: readonly [string, string]): string => word),
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
/** FORMAT-PRUNE FP47b: the first format whose level manifest and discovery data carry no level look (OF9b2 moved it
|
|
94
|
+
* to `look/look`'s `level`), and the four words. */
|
|
95
|
+
const NO_LEVEL_WORDS = '0.1.0.6'
|
|
96
|
+
const LEVEL_WORDS: readonly string[] = ['sky', 'atmosphere', 'grade', 'horizon']
|
|
97
|
+
/** FORMAT-PRUNE FP36: the discovery mount, which repeats the level manifest as its `data`. */
|
|
98
|
+
const DISCOVERY_MOUNT =
|
|
99
|
+
/^mounts\/shardfiles\/(?:_[a-z]+|[a-z][a-z0-9-]*)\/discovery\.json$/u
|
|
100
|
+
|
|
101
|
+
/** Whether a format version is one that carries none of the gone words. */
|
|
102
|
+
function gated(version: unknown): version is string {
|
|
103
|
+
return (
|
|
104
|
+
typeof version === 'string' &&
|
|
105
|
+
compareShardfileVersions(version, NO_MOVED_WORDS) >= NONE
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** The gone words a manifest-shaped object still carries at `version`: the moved words and the level look's
|
|
110
|
+
* from 0.1.0.6 (FP47b). */
|
|
111
|
+
function keptWords(version: string, manifest: unknown): readonly string[] {
|
|
112
|
+
if (typeof manifest !== 'object' || manifest === null) {
|
|
113
|
+
return []
|
|
114
|
+
}
|
|
115
|
+
const gone =
|
|
116
|
+
compareShardfileVersions(version, NO_LEVEL_WORDS) >= NONE
|
|
117
|
+
? [...GONE_WORDS, ...LEVEL_WORDS]
|
|
118
|
+
: GONE_WORDS
|
|
119
|
+
return gone.filter((word: string): boolean => Object.hasOwn(manifest, word))
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** FORMAT-PRUNE FP47c: a level manifest's map image, which `look/map` replaced (OF9b3); gone with the moved words. */
|
|
123
|
+
function keptMapImage(manifest: unknown): readonly string[] {
|
|
124
|
+
const map: unknown =
|
|
125
|
+
typeof manifest === 'object' && manifest !== null
|
|
126
|
+
? Reflect.get(manifest, 'minimap')
|
|
127
|
+
: undefined
|
|
128
|
+
return typeof map === 'object' && map !== null && Object.hasOwn(map, 'image')
|
|
129
|
+
? ['minimap.image']
|
|
130
|
+
: []
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** FORMAT-PRUNE FP47c: the level manifest's map image (OF9b3 moved the map to `look/map`); FP34's step drops it. */
|
|
134
|
+
const MAP_IMAGE_DEPRECATION: ManifestDeprecation = {
|
|
135
|
+
id: 'manifest.minimap.image',
|
|
136
|
+
path: 'sections/ui/level manifest.minimap.image (ONE-FORMAT OF9b3)',
|
|
137
|
+
since: '0.1.0.4',
|
|
138
|
+
replacement: 'look/map (OF9b3)',
|
|
139
|
+
migration: 'fp34-manifest-moved-words',
|
|
140
|
+
uses: (
|
|
141
|
+
shard: Readonly<{ sections: ReadonlyMap<string, unknown> }>,
|
|
142
|
+
): boolean => keptMapImage(manifestOf(shard.sections)).length > NONE,
|
|
143
|
+
}
|
|
144
|
+
/** The row that refuses the kept words: FP47b when they are all the level look's, else the moved words' row. */
|
|
145
|
+
function prune(kept: readonly string[], moved = 'FP36'): string {
|
|
146
|
+
return kept.every((word: string): boolean => LEVEL_WORDS.includes(word))
|
|
147
|
+
? 'FP47b'
|
|
148
|
+
: moved
|
|
149
|
+
}
|
|
150
|
+
/** Parsed JSON, or nothing for bytes that are none (another check's refusal). */
|
|
151
|
+
function jsonOf(bytes: Readonly<Uint8Array>): unknown {
|
|
152
|
+
try {
|
|
153
|
+
return JSON.parse(new TextDecoder().decode(bytes))
|
|
154
|
+
} catch {
|
|
155
|
+
return undefined
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Whether a product path is a shard's discovery mount. */
|
|
160
|
+
function isDiscoveryMount(path: string): boolean {
|
|
161
|
+
return DISCOVERY_MOUNT.test(path)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** A mount or pack the stream validator checks as it passes and does not hold; the discovery mount it holds (FP36). */
|
|
165
|
+
function unheldMount(path: string): boolean {
|
|
166
|
+
return (
|
|
167
|
+
path.startsWith('packs/') ||
|
|
168
|
+
(path.startsWith('mounts/') && !isDiscoveryMount(path))
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** FORMAT-PRUNE FP36 (the FP33 pattern): format 0.1.0.6 on refuses a discovery mount whose `data` carries a moved word or
|
|
173
|
+
* the old pointer; an older file keeps them as written, and the chain step (`fp36-discovery-moved-words`) lifts them.
|
|
174
|
+
* Bytes that are no JSON object are another check's refusal. Answers the bytes it checked. */
|
|
175
|
+
function checkDiscoveryMount(
|
|
176
|
+
version: unknown,
|
|
177
|
+
path: string,
|
|
178
|
+
bytes: Readonly<Uint8Array>,
|
|
179
|
+
): Readonly<Uint8Array> {
|
|
180
|
+
if (!isDiscoveryMount(path) || !gated(version)) {
|
|
181
|
+
return bytes
|
|
182
|
+
}
|
|
183
|
+
const parsed = jsonOf(bytes)
|
|
184
|
+
const data: unknown =
|
|
185
|
+
typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)
|
|
186
|
+
? Reflect.get(parsed, 'data')
|
|
187
|
+
: undefined
|
|
188
|
+
const kept = keptWords(version, data)
|
|
189
|
+
if (kept.length > NONE) {
|
|
190
|
+
throw new Error(
|
|
191
|
+
`Format ${version} carries no ${kept.map((word: string): string => `data.${word}`).join(', ')} (${path}; FORMAT-PRUNE ${prune(kept)})`,
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
return bytes
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** FORMAT-PRUNE FP34 (the FP33 pattern): format 0.1.0.6 on refuses a level manifest carrying a moved word or the old
|
|
198
|
+
* pointer; an older file keeps them as written, so its source hash still matches, and the chain step
|
|
199
|
+
* (`fp34-manifest-moved-words`) lifts them. */
|
|
200
|
+
function checkNoMovedWords(version: unknown, level: unknown): void {
|
|
201
|
+
if (!gated(version)) {
|
|
202
|
+
return
|
|
203
|
+
}
|
|
204
|
+
const manifest = manifestOf(new Map([['ui/level', level]]))
|
|
205
|
+
const kept = [...keptWords(version, manifest), ...keptMapImage(manifest)]
|
|
206
|
+
if (kept.length > NONE) {
|
|
207
|
+
throw new Error(
|
|
208
|
+
`Format ${version} carries no ${kept.map((word: string): string => `manifest.${word}`).join(', ')} (sections/ui/level; FORMAT-PRUNE ${prune(kept, 'FP34')})`,
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export {
|
|
214
|
+
GONE_WORDS,
|
|
215
|
+
LEVEL_DEPRECATIONS,
|
|
216
|
+
LEVEL_WORDS,
|
|
217
|
+
MANIFEST_MOVED_DEPRECATIONS,
|
|
218
|
+
MAP_IMAGE_DEPRECATION,
|
|
219
|
+
NO_LEVEL_WORDS,
|
|
220
|
+
NO_MOVED_WORDS,
|
|
221
|
+
checkDiscoveryMount,
|
|
222
|
+
checkNoMovedWords,
|
|
223
|
+
isDiscoveryMount,
|
|
224
|
+
unheldMount,
|
|
225
|
+
}
|
|
@@ -1,209 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$doc": "J426 (Jake, 2026-11-18): the
|
|
2
|
+
"$doc": "J426 (Jake, 2026-11-18): the J410 memory lines every memory gate judges an armed shard by. Which shards are armed is the API catalogue's word (FORMAT-PRUNE FP27, `/api/catalogue` `armed`, its `memory_armed` table seeded from this file's former `zones`): admission passes it to the format (FP27b), and since FP27c the format keeps no list of its own, so a gate given no catalogue word reports only (J424). An armed shard's offline estimate refuses over lines.loadingBytes (J445); playing and runtime overages report. Decimal bytes.",
|
|
3
3
|
"lines": {
|
|
4
4
|
"playingBytes": 1000000000,
|
|
5
5
|
"loadingBytes": 1500000000
|
|
6
|
-
},
|
|
7
|
-
"zones": {
|
|
8
|
-
"brasscap-mesa": {
|
|
9
|
-
"armed": "2026-11-18",
|
|
10
|
-
"by": "mini-pinemem5",
|
|
11
|
-
"epoch": 8,
|
|
12
|
-
"playingBytes": 679221837,
|
|
13
|
-
"loadingBytes": 984731013,
|
|
14
|
-
"evidence": "engine-pinned product revision 6 (tar f42fe0449a93), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
15
|
-
},
|
|
16
|
-
"far-reach": {
|
|
17
|
-
"armed": "2026-11-18",
|
|
18
|
-
"by": "mini-pinemem5",
|
|
19
|
-
"epoch": 8,
|
|
20
|
-
"playingBytes": 999952196,
|
|
21
|
-
"loadingBytes": 1415754105,
|
|
22
|
-
"evidence": "engine-pinned product revision 4 (tar 5bc5adcf764a), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
23
|
-
},
|
|
24
|
-
"ink-cel-valley": {
|
|
25
|
-
"armed": "2026-11-18",
|
|
26
|
-
"by": "mini-pinemem5",
|
|
27
|
-
"epoch": 8,
|
|
28
|
-
"playingBytes": 636979847,
|
|
29
|
-
"loadingBytes": 925290035,
|
|
30
|
-
"evidence": "engine-pinned product revision 1 (tar 5764c86a258a), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
31
|
-
},
|
|
32
|
-
"open-plot-alien-plain": {
|
|
33
|
-
"armed": "2026-11-18",
|
|
34
|
-
"by": "mini-pinemem5",
|
|
35
|
-
"epoch": 8,
|
|
36
|
-
"playingBytes": 665173554,
|
|
37
|
-
"loadingBytes": 967392441,
|
|
38
|
-
"evidence": "engine-pinned product revision 1 (tar c32cd9fb9229), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
39
|
-
},
|
|
40
|
-
"open-plot-clockwork-canyon": {
|
|
41
|
-
"armed": "2026-11-18",
|
|
42
|
-
"by": "mini-pinemem5",
|
|
43
|
-
"epoch": 8,
|
|
44
|
-
"playingBytes": 675751489,
|
|
45
|
-
"loadingBytes": 982935896,
|
|
46
|
-
"evidence": "engine-pinned product revision 1 (tar 3b322eccd99e), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
47
|
-
},
|
|
48
|
-
"open-plot-coral-drift": {
|
|
49
|
-
"armed": "2026-11-18",
|
|
50
|
-
"by": "mini-pinemem5",
|
|
51
|
-
"epoch": 8,
|
|
52
|
-
"playingBytes": 681768940,
|
|
53
|
-
"loadingBytes": 992453778,
|
|
54
|
-
"evidence": "engine-pinned product revision 1 (tar 87841749dc3f), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
55
|
-
},
|
|
56
|
-
"open-plot-desert-ruin": {
|
|
57
|
-
"armed": "2026-11-18",
|
|
58
|
-
"by": "mini-pinemem5",
|
|
59
|
-
"epoch": 8,
|
|
60
|
-
"playingBytes": 686478807,
|
|
61
|
-
"loadingBytes": 997958716,
|
|
62
|
-
"evidence": "engine-pinned product revision 1 (tar 3b65bfef7275), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
63
|
-
},
|
|
64
|
-
"open-plot-ember-forge": {
|
|
65
|
-
"armed": "2026-11-18",
|
|
66
|
-
"by": "mini-pinemem5",
|
|
67
|
-
"epoch": 8,
|
|
68
|
-
"playingBytes": 679682616,
|
|
69
|
-
"loadingBytes": 987005255,
|
|
70
|
-
"evidence": "engine-pinned product revision 1 (tar e1a3a9325e8e), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
71
|
-
},
|
|
72
|
-
"open-plot-fossil-badlands": {
|
|
73
|
-
"armed": "2026-11-18",
|
|
74
|
-
"by": "mini-pinemem5",
|
|
75
|
-
"epoch": 8,
|
|
76
|
-
"playingBytes": 671308241,
|
|
77
|
-
"loadingBytes": 976533532,
|
|
78
|
-
"evidence": "engine-pinned product revision 1 (tar 5bbdd51b8db9), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
79
|
-
},
|
|
80
|
-
"open-plot-frostline-peaks": {
|
|
81
|
-
"armed": "2026-11-18",
|
|
82
|
-
"by": "mini-pinemem5",
|
|
83
|
-
"epoch": 8,
|
|
84
|
-
"playingBytes": 694731191,
|
|
85
|
-
"loadingBytes": 1007041500,
|
|
86
|
-
"evidence": "engine-pinned product revision 1 (tar ec7b8879a343), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
87
|
-
},
|
|
88
|
-
"open-plot-jungle-ziggurat": {
|
|
89
|
-
"armed": "2026-11-18",
|
|
90
|
-
"by": "mini-pinemem5",
|
|
91
|
-
"epoch": 8,
|
|
92
|
-
"playingBytes": 683128342,
|
|
93
|
-
"loadingBytes": 992540003,
|
|
94
|
-
"evidence": "engine-pinned product revision 1 (tar 62fdb3cc7e41), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
95
|
-
},
|
|
96
|
-
"open-plot-lantern-bayou": {
|
|
97
|
-
"armed": "2026-11-18",
|
|
98
|
-
"by": "mini-pinemem5",
|
|
99
|
-
"epoch": 8,
|
|
100
|
-
"playingBytes": 679945285,
|
|
101
|
-
"loadingBytes": 989938627,
|
|
102
|
-
"evidence": "engine-pinned product revision 1 (tar 1f9fb1cba098), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
103
|
-
},
|
|
104
|
-
"open-plot-mosslight-ruins": {
|
|
105
|
-
"armed": "2026-11-18",
|
|
106
|
-
"by": "mini-pinemem5",
|
|
107
|
-
"epoch": 8,
|
|
108
|
-
"playingBytes": 693006386,
|
|
109
|
-
"loadingBytes": 1006944516,
|
|
110
|
-
"evidence": "engine-pinned product revision 1 (tar 19840339238b), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
111
|
-
},
|
|
112
|
-
"open-plot-night-market": {
|
|
113
|
-
"armed": "2026-11-18",
|
|
114
|
-
"by": "mini-pinemem5",
|
|
115
|
-
"epoch": 8,
|
|
116
|
-
"playingBytes": 709180040,
|
|
117
|
-
"loadingBytes": 1028237840,
|
|
118
|
-
"evidence": "engine-pinned product revision 1 (tar d8fe11c2db67), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
119
|
-
},
|
|
120
|
-
"open-plot-patchwork-fairground": {
|
|
121
|
-
"armed": "2026-11-18",
|
|
122
|
-
"by": "mini-pinemem5",
|
|
123
|
-
"epoch": 8,
|
|
124
|
-
"playingBytes": 670516626,
|
|
125
|
-
"loadingBytes": 974863462,
|
|
126
|
-
"evidence": "engine-pinned product revision 1 (tar e517f4814ef6), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
127
|
-
},
|
|
128
|
-
"open-plot-saltwind-lighthouse": {
|
|
129
|
-
"armed": "2026-11-18",
|
|
130
|
-
"by": "mini-pinemem5",
|
|
131
|
-
"epoch": 8,
|
|
132
|
-
"playingBytes": 657567209,
|
|
133
|
-
"loadingBytes": 956173411,
|
|
134
|
-
"evidence": "engine-pinned product revision 1 (tar 2e37a04b0c9e), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
135
|
-
},
|
|
136
|
-
"open-plot-sky-harbor": {
|
|
137
|
-
"armed": "2026-11-18",
|
|
138
|
-
"by": "mini-pinemem5",
|
|
139
|
-
"epoch": 8,
|
|
140
|
-
"playingBytes": 671985118,
|
|
141
|
-
"loadingBytes": 977835231,
|
|
142
|
-
"evidence": "engine-pinned product revision 1 (tar 9aa4a9839015), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
143
|
-
},
|
|
144
|
-
"open-plot-sky-race": {
|
|
145
|
-
"armed": "2026-11-18",
|
|
146
|
-
"by": "mini-pinemem5",
|
|
147
|
-
"epoch": 8,
|
|
148
|
-
"playingBytes": 671490214,
|
|
149
|
-
"loadingBytes": 977159704,
|
|
150
|
-
"evidence": "engine-pinned product revision 1 (tar a5633d8eee7f), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
151
|
-
},
|
|
152
|
-
"open-plot-starfall-observatory": {
|
|
153
|
-
"armed": "2026-11-18",
|
|
154
|
-
"by": "mini-pinemem5",
|
|
155
|
-
"epoch": 8,
|
|
156
|
-
"playingBytes": 674717033,
|
|
157
|
-
"loadingBytes": 981241332,
|
|
158
|
-
"evidence": "engine-pinned product revision 1 (tar 25331b613be1), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
159
|
-
},
|
|
160
|
-
"open-plot-thin-ice": {
|
|
161
|
-
"armed": "2026-11-18",
|
|
162
|
-
"by": "mini-pinemem5",
|
|
163
|
-
"epoch": 8,
|
|
164
|
-
"playingBytes": 657896658,
|
|
165
|
-
"loadingBytes": 957357794,
|
|
166
|
-
"evidence": "engine-pinned product revision 1 (tar 4546f70ddac2), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
167
|
-
},
|
|
168
|
-
"pastel-plain": {
|
|
169
|
-
"armed": "2026-11-18",
|
|
170
|
-
"by": "mini-pinemem5",
|
|
171
|
-
"epoch": 8,
|
|
172
|
-
"playingBytes": 636958876,
|
|
173
|
-
"loadingBytes": 925256481,
|
|
174
|
-
"evidence": "engine-pinned product revision 1 (tar e42e2f5f5793), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
175
|
-
},
|
|
176
|
-
"sunscar-dunes": {
|
|
177
|
-
"armed": "2026-11-18",
|
|
178
|
-
"by": "mini-pinemem5",
|
|
179
|
-
"epoch": 8,
|
|
180
|
-
"playingBytes": 772000529,
|
|
181
|
-
"loadingBytes": 1108011593,
|
|
182
|
-
"evidence": "engine-pinned product revision 2 (tar f4a1d611cccc), a shard with no runtime reading; epoch-8 golden estimate; mini-resweep reads every light zone under both J410 lines standalone"
|
|
183
|
-
},
|
|
184
|
-
"driftwood-isle": {
|
|
185
|
-
"armed": "2026-11-18",
|
|
186
|
-
"by": "mini-pinemem5",
|
|
187
|
-
"epoch": 8,
|
|
188
|
-
"playingBytes": 820905616,
|
|
189
|
-
"loadingBytes": 1157545785,
|
|
190
|
-
"evidence": "shard-driftwood e736730 built with format 0.37 (epoch 8); codex-nalati locked pairs on the EM11 upper read 990.5 / 1,344.7 MB (meta MEMORY-GATES); re-armed 2026-11-21 by SHARD-COMPAT CP10 (J486): engine pins and cooks validate judged stored, so an older pinned product is never re-judged"
|
|
191
|
-
},
|
|
192
|
-
"nalati-grasslands": {
|
|
193
|
-
"armed": "2026-11-18",
|
|
194
|
-
"by": "mini-pinemem5",
|
|
195
|
-
"epoch": 8,
|
|
196
|
-
"playingBytes": 945736154,
|
|
197
|
-
"loadingBytes": 1328901899,
|
|
198
|
-
"evidence": "shard-nalati 1d5014e8 built with format 0.37 (epoch 8); mini-resweep EM11 upper on the J420 stand-in: playing 0.940 GB less the worker, loading 1.470 GB (meta MEMORY-GATES); re-armed 2026-11-21 by SHARD-COMPAT CP10 (J486): engine pins and cooks validate judged stored, so an older pinned product is never re-judged"
|
|
199
|
-
},
|
|
200
|
-
"pine-hollow": {
|
|
201
|
-
"armed": "2026-11-18",
|
|
202
|
-
"by": "mini-pinemem5",
|
|
203
|
-
"epoch": 8,
|
|
204
|
-
"playingBytes": 920666659,
|
|
205
|
-
"loadingBytes": 1298769921,
|
|
206
|
-
"evidence": "shard-pine-hollow 400ed4b7 built with format 0.37 (epoch 8); mini-pinemem6 prepared online boot on engine f0a96518, 9 pairs: playing upper 0.969 GB, loading upper 1.407 GB (meta 118a2b13); re-armed 2026-11-21 by SHARD-COMPAT CP10 (J486): engine pins and cooks validate judged stored, so an older pinned product is never re-judged"
|
|
207
|
-
}
|
|
208
6
|
}
|
|
209
7
|
}
|