@wildshard/shard-format 0.67.0 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/package.json +7 -19
  2. package/src/cli/corpus-deprecations.ts +41 -0
  3. package/src/cli/corpus.ts +300 -0
  4. package/src/cli/main.ts +32 -0
  5. package/src/format/cook-preparation.ts +22 -6
  6. package/src/format/deprecations.ts +132 -0
  7. package/src/format/empty-shardfile.json +56 -0
  8. package/src/format/empty-shardfile.ts +43 -0
  9. package/src/format/format-migrate-inventory.ts +142 -0
  10. package/src/format/format-migrate-rebuild.ts +269 -0
  11. package/src/format/format-migrate.ts +290 -0
  12. package/src/format/format-migration-journal.ts +129 -0
  13. package/src/format/format-migration-ops.ts +230 -0
  14. package/src/format/format-migration-prune.ts +106 -0
  15. package/src/format/format-migrations.ts +124 -0
  16. package/src/format/issue-codes.ts +3 -1
  17. package/src/format/journal-glyphs.json +12 -0
  18. package/src/format/memory-armed.json +1 -39
  19. package/src/format/memory-armed.ts +41 -8
  20. package/src/format/memory-epoch.ts +2 -2
  21. package/src/format/memory-line.ts +4 -3
  22. package/src/format/memoryAdmission.ts +1 -1
  23. package/src/format/policy-verdict.ts +95 -0
  24. package/src/format/runtime-tier.ts +3 -3
  25. package/src/format/shardSections.ts +11 -1
  26. package/src/format/shardfile-assets.ts +12 -8
  27. package/src/format/shardfile-stream-admit.ts +41 -16
  28. package/src/format/shardfile-stream-rows.ts +3 -1
  29. package/src/format/shardfile-stream.ts +12 -9
  30. package/src/format/shardfileValidation.ts +30 -18
  31. package/src/format/stateLineage.ts +1 -1
  32. package/src/format/version.ts +11 -13
  33. package/src/format/baked-terrain.golden.json +0 -2760
  34. package/src/format/colliders.golden.json +0 -1619
  35. package/src/format/forest-placement.golden.json +0 -4588
  36. package/src/format/geometry-layout.golden.json +0 -180
  37. package/src/format/interact-table.golden.json +0 -340
  38. package/src/format/item-catalogue.golden.json +0 -2310
  39. package/src/format/memory-ratchet.ts +0 -107
  40. package/src/format/small-laws.golden.json +0 -57
  41. package/src/format/terrain-field.golden.json +0 -3998
@@ -1,107 +0,0 @@
1
- import { zoneArmed } from './memory-armed.ts'
2
-
3
- /**
4
- * J411 / J412 (Jake, 2026-11-18): memory gates are ratchets. "With these new gates we should definitely be landing
5
- * improvements even if they don't meet the new high standards." The J408 phone line (1.5 GB playing and loading), the
6
- * OF10c1a runtime tier and the MG5 stale-reading check refuse a zone only when it is worse than its baseline here;
7
- * at or under the baseline they report. A zone with no row keeps every refusing gate.
8
- *
9
- * Each baseline is the zone's reading on 2026-11-18 under memory epoch 8 (MEMORY-GATES MG10, mini-pinemem5; epoch 7
10
- * mini-mg8): the largest of the engine-pinned product's estimates (admission and performance report) and the current
11
- * source's, in decimal bytes. Nine's and Pine's loading rows are engine's full-check performance report of the pinned
12
- * product (the offline estimate reads 1,667 and 1,697 MB); Pine's playing row is its declared admission. A cut ratchets
13
- * the row down; a zone
14
- * that passes a line loses that field. J424 / J426 (2026-11-18): the baselines only report now; a zone refuses only once
15
- * it is armed (`memory-armed.ts`), and then over the line itself. `staleRevision` is the pinned product's
16
- * `identity.revision`: it admits that revision's pre-epoch-3 runtime reading; any later revision must carry a current one.
17
- */
18
- interface MemoryBaseline {
19
- readonly playing?: number
20
- readonly loading?: number
21
- readonly runtime?: number
22
- readonly staleRevision?: number
23
- }
24
-
25
- const MEMORY_RATCHET: Readonly<Record<string, MemoryBaseline>> = Object.freeze({
26
- 'driftwood-isle': {
27
- runtime: 538_863_164,
28
- staleRevision: 2,
29
- },
30
- 'nalati-grasslands': {
31
- loading: 1_582_259_503,
32
- runtime: 700_846_587,
33
- staleRevision: 1,
34
- },
35
- 'nine-dragon-stack': {
36
- loading: 1_687_945_650,
37
- runtime: 547_365_098,
38
- staleRevision: 1,
39
- },
40
- 'pine-hollow': {
41
- playing: 1_627_187_329,
42
- loading: 1_806_997_225,
43
- runtime: 550_909_717,
44
- staleRevision: 1,
45
- },
46
- })
47
-
48
- /** The estimate's run-to-run noise is zero (it is computed, not sampled); the allowance covers byte drift from a
49
- * rebuild of the same source (compression, packing order). */
50
- const RATCHET_ALLOWANCE = 0.005
51
-
52
- type RatchetMetric = 'playing' | 'loading' | 'runtime'
53
-
54
- /** J445: only the common loading ceiling can refuse an armed shard.
55
- * Playing and runtime tier overages are reported. */
56
- function ratchetLimit(
57
- slug: string | undefined,
58
- metric: RatchetMetric,
59
- line: number,
60
- ): number {
61
- return metric === 'loading' && zoneArmed(slug)
62
- ? line
63
- : Number.POSITIVE_INFINITY
64
- }
65
-
66
- /** Describe the offline decision for a measured overage. */
67
- function ratchetSeverity(
68
- slug: string | undefined,
69
- metric: RatchetMetric,
70
- reading: Readonly<{ line: number; actual: number }>,
71
- ): 'refusal' | 'warning' {
72
- return reading.actual > ratchetLimit(slug, metric, reading.line)
73
- ? 'refusal'
74
- : 'warning'
75
- }
76
-
77
- /** The words a reported (not refused) issue carries: why it only reports, and the zone's J412 baseline if it has one. */
78
- function ratchetNote(slug: string | undefined, metric: RatchetMetric): string {
79
- if (zoneArmed(slug)) {
80
- return ''
81
- }
82
- const baseline =
83
- slug === undefined ? undefined : MEMORY_RATCHET[slug]?.[metric]
84
- const zone = slug ?? 'this shard'
85
- return baseline === undefined
86
- ? ` (report-only, J424: ${zone} is not armed)`
87
- : ` (report-only, J424: ${zone} is not armed; J412 baseline ${String(baseline)})`
88
- }
89
-
90
- /** True when a stale runtime reading only reports: J424, every zone not armed (J426). */
91
- function staleReadingAdmitted(
92
- slug: string | undefined,
93
- _revision: number | undefined,
94
- ): boolean {
95
- return !zoneArmed(slug)
96
- }
97
-
98
- export {
99
- MEMORY_RATCHET,
100
- RATCHET_ALLOWANCE,
101
- type MemoryBaseline,
102
- type RatchetMetric,
103
- ratchetLimit,
104
- ratchetNote,
105
- ratchetSeverity,
106
- staleReadingAdmitted,
107
- }
@@ -1,57 +0,0 @@
1
- {
2
- "about": "SDK-SPLIT SP4f1: engine host/headlessSections.ts, grid/frameModel.ts ROAD_SKY, grid/farView.ts FAR_CLIFF_FLOOR and plugin/clientChannelView.ts moverChannelValues over small-laws.golden-specs.ts",
3
- "sectionNames": [
4
- "actors/species-programs",
5
- "view/modules",
6
- "sim/scripts",
7
- "actors/spawn-scripts",
8
- "actors/return-scripts",
9
- "actors/moves",
10
- "actors/strikes",
11
- "world/targets",
12
- "sim/runtime-plan",
13
- "sim/bodies"
14
- ],
15
- "sections": [
16
- [{ "ok": [] }, { "ok": [] }],
17
- [
18
- { "ok": [["world/targets", { "targets": [], "spots": [] }]] },
19
- { "ok": [["world/targets", { "targets": [], "spots": [] }]] }
20
- ],
21
- [
22
- { "error": "Invalid type: Expected Object but received \"nope\"" },
23
- { "error": "Invalid type: Expected Object but received \"nope\"" }
24
- ]
25
- ],
26
- "roadSky": {
27
- "air": [0.95, 0.56, 0.44],
28
- "mid": [0.58, 0.46, 0.8],
29
- "zenith": [0.1, 0.24, 0.72],
30
- "line": [0.25, 1.1, 1.4],
31
- "grid": [0.3, 0.85, 1.1],
32
- "gridStrength": 0.3,
33
- "void": [0.17, 0.17, 0.27],
34
- "sun": {
35
- "azimuth": 70,
36
- "elevation": 13,
37
- "colour": [1, 0.8, 0.66],
38
- "intensity": 2.4,
39
- "glow": [1, 0.62, 0.42]
40
- },
41
- "hemi": {
42
- "sky": [0.6, 0.62, 0.86],
43
- "ground": [0.42, 0.36, 0.34],
44
- "intensity": 1.1
45
- },
46
- "env": 0.7,
47
- "fogSun": [1, 0.72, 0.56]
48
- },
49
- "farCliffFloor": 0.8,
50
- "mover": [
51
- { "ok": [1, 1.5, -2, 3.25, 0.1, -0.2, 0.3] },
52
- { "ok": [0.5, -7, 0] },
53
- { "error": "Missing copied mover field" },
54
- { "error": "Missing copied mover field" },
55
- { "error": "Missing copied mover field" }
56
- ]
57
- }