@kudzujs/core 0.8.62 → 0.9.1
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/MIGRATION_ROADMAP.md +36 -1
- package/PERFORMANCE.md +79 -1
- package/README.md +2 -2
- package/RELEASES.md +54 -0
- package/bin/kudzu.mjs +10 -1
- package/docs/next-architecture/0.9-baseline.md +1199 -0
- package/docs/next-architecture/0.9-benchmark-contracts.md +507 -0
- package/docs/next-architecture/0.9-component-property-contract.md +89 -0
- package/docs/next-architecture/0.9-compression-ledger.md +227 -0
- package/docs/next-architecture/0.9-final-proof-audit.md +176 -0
- package/docs/next-architecture/0.9-implementation-plan.md +1819 -0
- package/docs/next-architecture/0.9-resource-lifecycle.md +118 -0
- package/docs/next-architecture/0.9-semantic-compression.md +384 -0
- package/docs/next-architecture/README.md +16 -12
- package/docs/next-architecture/compiler-current-architecture.md +7 -7
- package/docs/next-architecture/large-application-ai-native-roadmap.md +5 -3
- package/docs/next-architecture/versioning.md +1 -1
- package/framework/README.md +2 -0
- package/framework/binding-runtime.js +4 -4
- package/framework/build.mjs +135 -30
- package/framework/compiler/ast-helpers.mjs +5 -0
- package/framework/compiler/browser-signal-passes.mjs +2 -7
- package/framework/compiler/collection-analysis.mjs +4 -0
- package/framework/compiler/descriptor-session.mjs +36 -12
- package/framework/compiler/effect-analysis.mjs +28 -8
- package/framework/compiler/effect-codegen.mjs +79 -36
- package/framework/compiler/effect-private-ref-pass.mjs +4 -8
- package/framework/compiler/handler-lowering.mjs +12 -7
- package/framework/compiler/ir/module-ir.mjs +26 -4
- package/framework/compiler/list-runtime-codegen.mjs +4 -2
- package/framework/compiler/optimize/command-specialization.mjs +4 -7
- package/framework/compiler/route-artifact-report.mjs +4 -3
- package/framework/compiler/route-build-record.mjs +12 -0
- package/framework/compiler/route-capability-planner.mjs +3 -3
- package/framework/compiler/route-ir.mjs +27 -11
- package/framework/compiler/runtime-codegen.mjs +2 -2
- package/framework/compiler/source-compiler.mjs +359 -78
- package/framework/core.d.ts +1 -0
- package/framework/core.mjs +22 -7
- package/framework/dependency-runtime.js +1 -1
- package/framework/effect-runtime.js +2 -2
- package/framework/list-runtime.js +70 -26
- package/framework/native-runtime.js +12 -9
- package/framework/runtime.js +1 -1
- package/framework/serialization.js +13 -6
- package/framework/shared-runtime.js +14 -12
- package/package.json +1 -1
|
@@ -0,0 +1,1819 @@
|
|
|
1
|
+
# Kudzu 0.9.0 Detailed Implementation Plan
|
|
2
|
+
|
|
3
|
+
## Document Role
|
|
4
|
+
|
|
5
|
+
This document is the detailed delivery plan for [`0.9-semantic-compression.md`](./0.9-semantic-compression.md). The Semantic Compression document defines direction, work order, and release gates. This document decomposes that work into executable sessions, artifacts, tests, measurements, reviews, and stop conditions.
|
|
6
|
+
|
|
7
|
+
This plan does not mark `0.9.0` as released. The current package version remains the version recorded in `package.json`. Package metadata, release notes, public support claims, and generator ranges change only during the final release procedure after every gate passes.
|
|
8
|
+
|
|
9
|
+
Use this document to answer:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
What is the next exact task?
|
|
13
|
+
What evidence authorizes it?
|
|
14
|
+
Which producer and consumer boundary may change?
|
|
15
|
+
Which files are expected to change?
|
|
16
|
+
What must remain unchanged?
|
|
17
|
+
Which positive and negative checks prove the boundary?
|
|
18
|
+
Which measurements are required?
|
|
19
|
+
When must work stop for architecture review?
|
|
20
|
+
What evidence closes the task?
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Required Reading Order
|
|
24
|
+
|
|
25
|
+
Every 0.9 implementation session reads these documents in order:
|
|
26
|
+
|
|
27
|
+
1. [`MIGRATION_ROADMAP.md`](../../MIGRATION_ROADMAP.md)
|
|
28
|
+
2. [`0.9-semantic-compression.md`](./0.9-semantic-compression.md)
|
|
29
|
+
3. This implementation plan
|
|
30
|
+
4. [`compiler-current-architecture.md`](./compiler-current-architecture.md)
|
|
31
|
+
5. [`performance-gates.md`](./performance-gates.md)
|
|
32
|
+
6. [`large-application-ai-native-roadmap.md`](./large-application-ai-native-roadmap.md)
|
|
33
|
+
|
|
34
|
+
The first three documents define product authority, active work order, and execution detail. The remaining documents provide current implementation facts, measurement rules, completed foundation, and deferred work.
|
|
35
|
+
|
|
36
|
+
## Release Thesis
|
|
37
|
+
|
|
38
|
+
Kudzu `0.9.0` has two inseparable outcomes.
|
|
39
|
+
|
|
40
|
+
### Semantic Outcome
|
|
41
|
+
|
|
42
|
+
More realistic React-shaped applications reduce to the existing Semantic Kernel while compiler and browser complexity remain nearly flat.
|
|
43
|
+
|
|
44
|
+
### Competitive Outcome
|
|
45
|
+
|
|
46
|
+
For matched applications, Kudzu proves lower browser cost and equal-or-better user-facing performance than React + Vite and representative Vue, Svelte, Astro, and capability-appropriate production framework baselines.
|
|
47
|
+
|
|
48
|
+
Internal architecture work without competitive proof cannot release as `0.9.0`. A favorable benchmark produced by omitted behavior, weaker accessibility, different content, different hosting assumptions, or unreported failures also cannot release as `0.9.0`.
|
|
49
|
+
|
|
50
|
+
## Program Principles
|
|
51
|
+
|
|
52
|
+
1. Performance is an invariant, not a cleanup phase.
|
|
53
|
+
2. A real failing application fixture authorizes semantic work.
|
|
54
|
+
3. Native browser behavior wins before compiler behavior is added.
|
|
55
|
+
4. Existing semantics win before normalization is added.
|
|
56
|
+
5. Normalization wins before an internal adapter is added.
|
|
57
|
+
6. An internal adapter wins before a semantic primitive is considered.
|
|
58
|
+
7. Three unrelated real fixtures permit architecture review but do not authorize a primitive.
|
|
59
|
+
8. Package-specific source knowledge cannot reach generic IR consumers or browser runtime code.
|
|
60
|
+
9. Browser JavaScript remains proportional to route capabilities.
|
|
61
|
+
10. Static siblings remain complete HTML with zero JavaScript.
|
|
62
|
+
11. Every unsupported neighboring form remains explicit and source-located.
|
|
63
|
+
12. No benchmark result counts until behavior and accessibility checks pass.
|
|
64
|
+
13. No task is complete without complexity and browser-byte accounting.
|
|
65
|
+
14. No later work item starts while an earlier item is incomplete or lacks an explicit evidence-based closure.
|
|
66
|
+
|
|
67
|
+
## Program Dependency Graph
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
0.9.0-01 Baseline and benchmark restoration
|
|
71
|
+
|
|
|
72
|
+
+--> 0.9.0-02 Stronger Derived
|
|
73
|
+
|
|
|
74
|
+
+--> 0.9.0-03 Shared State and Actions
|
|
75
|
+
|
|
|
76
|
+
+--> 0.9.0-04 Resource Ownership Review
|
|
77
|
+
|
|
|
78
|
+
+--> 0.9.0-05 Component Ownership and Dependencies
|
|
79
|
+
|
|
|
80
|
+
+--> 0.9.0-06 Duplication Removal
|
|
81
|
+
|
|
|
82
|
+
+--> 0.9.0-07 Final Cross-Framework Proof
|
|
83
|
+
|
|
|
84
|
+
+--> 0.9.0 Release Candidate
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Cross-framework harness restoration begins during 0.9.0-01 and runs continuously. The final proof occurs only after semantic and simplification work is complete.
|
|
88
|
+
|
|
89
|
+
## Current Factual Baseline
|
|
90
|
+
|
|
91
|
+
The following facts describe the current `0.8.62` tree. The completed dated architecture and complexity measurements are recorded in [`0.9-baseline.md`](./0.9-baseline.md).
|
|
92
|
+
|
|
93
|
+
### Current Semantic Records
|
|
94
|
+
|
|
95
|
+
| Record | Current authority | Known 0.9 pressure |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| `SymbolRef` | Source-local lexical identities | Preserve lexical identity outside AST-bearing analysis. |
|
|
98
|
+
| `SignalIR` | Local and package-neutral state references | Preserve ownership and direct state semantics. |
|
|
99
|
+
| `HandlerIR` | Commands, native handlers, effects, captures, imports, and actions | Equivalent source operations still enter through several syntax-specific paths. |
|
|
100
|
+
| `BindingIR` | Reactive text, attributes, conditions, and evaluator exports | Derived identity is not authoritative for every binding calculation. |
|
|
101
|
+
| `DerivedIR` | Tagged effect dependencies and keyed collection selectors | Reactive bindings and imported calculation fields use the same purity language but separate identity paths. |
|
|
102
|
+
| `EffectIR` | Setup, cleanup, dependencies, subscriptions, owners, keyed membership, and Worker edges | Lifecycle proof is distributed across focused syntax passes. |
|
|
103
|
+
| `SharedStateIR` | Reduced Zustand state identity and initial field value | Context action state does not currently lower through this record. |
|
|
104
|
+
| `SharedActionIR` | Reduced Zustand action identity | Action implementation still retains adapter-specific transient metadata. |
|
|
105
|
+
| `KeyedBlockIR` | Collection, selector, key, parent/child, row hooks, and ownership | Keep current identity and release semantics. |
|
|
106
|
+
| `ImportIR` | Validated source/package import references used by browser modules | Keep import ownership structural and route-specific. |
|
|
107
|
+
| ComponentAnalysis v2 | Owners, specializations, states, props, refs, IDs, and signal links | Several source-shape discovery loops surround one specialization core. |
|
|
108
|
+
| RouteIR v1 | Concrete route state, event, effect, binding, condition, list, and ownership plan | Preserve complete HTML and concrete ownership. |
|
|
109
|
+
| CapabilityIR v1 | Exact runtime capability projection | Preserve zero-cost exclusion and runtime-family isolation. |
|
|
110
|
+
|
|
111
|
+
### Current Ordered Normalization Inventory
|
|
112
|
+
|
|
113
|
+
The page compilation path contains fifteen ordered entries. Imported declaration normalization omits the conditional imported-static-collection entry and therefore contains fourteen. The dated baseline verifies this against `normalizeCompilerSource()`.
|
|
114
|
+
|
|
115
|
+
| Order | Entry | Owner | Canonical result |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| 1 | Imported static collections | `source-compiler.mjs` | Build-known array literals |
|
|
118
|
+
| 2 | React Router | `router-pass.mjs` | Native navigation and route signals |
|
|
119
|
+
| 3 | `clsx` | `source-compiler.mjs` | Primitive conditional concatenation |
|
|
120
|
+
| 4 | Static media query store | `browser-signal-passes.mjs` | Ordinary state plus owned effect |
|
|
121
|
+
| 5 | React migration syntax | `react-migration-pass.mjs` | Supported React source normalized for later no-React compilation validation |
|
|
122
|
+
| 6 | Navigator capability condition | `browser-signal-passes.mjs` | False state plus mount effect |
|
|
123
|
+
| 7 | Parameterized debounce hook | `source-compiler.mjs` | Ordinary state plus dependency effect |
|
|
124
|
+
| 8 | Outside-click hook | `outside-click-pass.mjs` | Canonical callback value/dependencies for an authored owned listener effect |
|
|
125
|
+
| 9 | Effect-private refs | `effect-private-ref-pass.mjs` | Invocation-private effect closure values |
|
|
126
|
+
| 10 | Custom-hook timer refs | `custom-hook-timer-pass.mjs` | Hidden state plus existing effect ownership |
|
|
127
|
+
| 11 | `useId` validation | `react-migration-pass.mjs` | Diagnostic-only boundary |
|
|
128
|
+
| 12 | Lazy state/reducer initializers | `source-compiler.mjs` | Direct serializable initial literals |
|
|
129
|
+
| 13 | Zustand | `zustand-pass.mjs` | Package-neutral shared-state creation marker |
|
|
130
|
+
| 14 | Render control flow | `render-control-pass.mjs` | Canonical conditions and immutable assignments |
|
|
131
|
+
| 15 | Worker ordinary-import validation | `worker-compiler.mjs` | Diagnostic-only boundary |
|
|
132
|
+
|
|
133
|
+
The baseline records structural transforms and diagnostic-only entries separately. Pass count must not be reduced by relabeling a pass or moving identical work into `source-compiler.mjs`.
|
|
134
|
+
|
|
135
|
+
### Current Test And Benchmark Entry Points
|
|
136
|
+
|
|
137
|
+
| Command | Current role |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `npm run check` | TypeScript checks plus production build of the repository site |
|
|
140
|
+
| `npm test` | 233 current Node tests; Chrome work is optional unless explicitly required |
|
|
141
|
+
| `KUDZU_REQUIRE_CHROME=1 CHROME_BIN="..." npm test` | Required browser journey execution |
|
|
142
|
+
| `npm run test:package` | Packed-package installation and smoke validation |
|
|
143
|
+
| `npm run benchmark` | Seven clean Worker/effect fixture builds and artifact sizes |
|
|
144
|
+
| `RUNS=7 CHROME_BIN="..." npm run benchmark:keyed` | 2,000-row keyed build/browser ownership benchmark |
|
|
145
|
+
| `npm run benchmark:source-scale` | Generated source graph compile/build/RSS benchmark |
|
|
146
|
+
| `npm run benchmark:commerce` | Paired Kudzu revision benchmark against `kudzu-based-bench` |
|
|
147
|
+
| `npm run benchmark:module-cache` | Historical 100-importer cache seam benchmark |
|
|
148
|
+
| `npm run benchmark:native` | Historical native-handler ownership comparison |
|
|
149
|
+
|
|
150
|
+
### Current Evidence Strengths
|
|
151
|
+
|
|
152
|
+
- Static routes and static siblings repeatedly prove zero JavaScript.
|
|
153
|
+
- Effect dependency replacement, cleanup order, and stale setter invalidation are covered.
|
|
154
|
+
- Worker navigation and repeated mount/dispose ownership have strong browser coverage.
|
|
155
|
+
- Context CRUD and Zustand layout persistence have browser journeys.
|
|
156
|
+
- Component callback/ref propagation, repeated state, and conditional remount are covered.
|
|
157
|
+
- Keyed identity, SVG ownership, nested lists, and row release are extensively covered.
|
|
158
|
+
- Source-scale and 1,000-product build measurements exist.
|
|
159
|
+
|
|
160
|
+
### Current Evidence Gaps
|
|
161
|
+
|
|
162
|
+
- No authorizing real fixture proves one reusable multi-state `DerivedIR` identity across binding, effect, and list consumers.
|
|
163
|
+
- Context does not currently prove the same package-neutral shared-state/action records as Zustand.
|
|
164
|
+
- No current resource fixture exceeds existing `EffectIR` plus effect-private closure semantics.
|
|
165
|
+
- WorkLedger revision `3d8bf2130ec1d7698bff07fb00726b2bb94d20d4` now proves general immutable object-property propagation through an ordinary component boundary fails at a selected effect dependency shared with a keyed-list consumer.
|
|
166
|
+
- No maintained 100/1,000/10,000-route cross-framework gate is recorded in this repository.
|
|
167
|
+
- The documented runtime matrix is not currently reproducible from a tracked harness in this checkout.
|
|
168
|
+
- The six-route commerce browser comparison timed out before cross-target sampling.
|
|
169
|
+
- Browser CPU, heap, disabled-JS, delayed-JS, and missing-chunk release gates are not maintained in this checkout.
|
|
170
|
+
- Astro is absent from the maintained stateful runtime matrix; Vue and Svelte are absent from the production commerce matrix.
|
|
171
|
+
|
|
172
|
+
## Measurement Taxonomy
|
|
173
|
+
|
|
174
|
+
All 0.9 reports use the same categories so one improvement cannot hide a loss elsewhere.
|
|
175
|
+
|
|
176
|
+
### Compiler Complexity
|
|
177
|
+
|
|
178
|
+
| Metric | Meaning |
|
|
179
|
+
|---|---|
|
|
180
|
+
| Semantic concepts | Conceptual kernel additions, not merely type names |
|
|
181
|
+
| ModuleIR record kinds | New serialized semantic contracts |
|
|
182
|
+
| Core semantic passes | Analysis stages that introduce or transform semantic meaning |
|
|
183
|
+
| Ordered normalization entries | Source transforms and validators invoked by the pipeline |
|
|
184
|
+
| Core compiler LOC | Maintained semantic analysis and IR file set |
|
|
185
|
+
| Compatibility LOC | React, Router, Zustand, and migration-specific normalizers/adapters |
|
|
186
|
+
| Runtime concepts | Browser-level state, scheduler, graph, registry, or lifecycle machinery |
|
|
187
|
+
| Diagnostics | Added stable boundary messages and negative forms |
|
|
188
|
+
|
|
189
|
+
### Browser Cost
|
|
190
|
+
|
|
191
|
+
| Metric | Required view |
|
|
192
|
+
|---|---|
|
|
193
|
+
| Initial JavaScript | Raw, gzip, and actual browser-transferred bytes |
|
|
194
|
+
| Route JavaScript | Capability and handler/effect graph by route |
|
|
195
|
+
| Session JavaScript | Unique bytes fetched across the complete journey |
|
|
196
|
+
| Parse/execute CPU | Browser trace or equivalent reproducible measurement |
|
|
197
|
+
| Heap | Initial, post-journey, and after repeated navigation/disposal |
|
|
198
|
+
| Interaction readiness | Content visible to action safely accepted |
|
|
199
|
+
| Event latency | Event to next paint or verified DOM completion |
|
|
200
|
+
| Navigation latency | Trigger to destination content/action readiness |
|
|
201
|
+
| Failure resilience | Disabled, delayed, and missing JavaScript behavior |
|
|
202
|
+
|
|
203
|
+
### Build Cost
|
|
204
|
+
|
|
205
|
+
| Metric | Required view |
|
|
206
|
+
|---|---|
|
|
207
|
+
| Cold build | Fresh output and scratch removal |
|
|
208
|
+
| Warm/replacement build | Existing output where supported |
|
|
209
|
+
| Incremental development build | Changed module to ready output |
|
|
210
|
+
| Source read | Filesystem/source indexing phase |
|
|
211
|
+
| Graph | Reachability and symbol graph phase |
|
|
212
|
+
| Compile | Semantic source compilation phase |
|
|
213
|
+
| Render/emission | Route rendering, bundling, and output phase where available |
|
|
214
|
+
| Peak RSS | Fresh-process maximum resident set |
|
|
215
|
+
| Output | Files, pages, bytes, hashes, and artifact classes |
|
|
216
|
+
|
|
217
|
+
## Baseline File Sets
|
|
218
|
+
|
|
219
|
+
0.9.0-01 records LOC for stable, explicit file sets. Changing a category requires updating both baseline and candidate calculations and explaining the reason.
|
|
220
|
+
|
|
221
|
+
### Core Semantic Compiler
|
|
222
|
+
|
|
223
|
+
```text
|
|
224
|
+
framework/compiler/source-compiler.mjs
|
|
225
|
+
framework/compiler/descriptor-session.mjs
|
|
226
|
+
framework/compiler/handler-lowering.mjs
|
|
227
|
+
framework/compiler/effect-analysis.mjs
|
|
228
|
+
framework/compiler/collection-analysis.mjs
|
|
229
|
+
framework/compiler/normalization-pipeline.mjs
|
|
230
|
+
framework/compiler/analysis/binding-index.mjs
|
|
231
|
+
framework/compiler/analysis/component-analysis.mjs
|
|
232
|
+
framework/compiler/ir/module-ir.mjs
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Compatibility And Focused Normalization
|
|
236
|
+
|
|
237
|
+
```text
|
|
238
|
+
framework/compiler/react-migration-pass.mjs
|
|
239
|
+
framework/compiler/router-pass.mjs
|
|
240
|
+
framework/compiler/zustand-pass.mjs
|
|
241
|
+
framework/compiler/browser-signal-passes.mjs
|
|
242
|
+
framework/compiler/effect-private-ref-pass.mjs
|
|
243
|
+
framework/compiler/custom-hook-timer-pass.mjs
|
|
244
|
+
framework/compiler/outside-click-pass.mjs
|
|
245
|
+
framework/compiler/render-control-pass.mjs
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Semantic Code Generation And Browser Evaluation
|
|
249
|
+
|
|
250
|
+
```text
|
|
251
|
+
framework/compiler/handler-codegen.mjs
|
|
252
|
+
framework/compiler/effect-codegen.mjs
|
|
253
|
+
framework/compiler/list-runtime-codegen.mjs
|
|
254
|
+
framework/compiler/runtime-codegen.mjs
|
|
255
|
+
framework/compiler/codegen/command-codegen.mjs
|
|
256
|
+
framework/collection-selector.js
|
|
257
|
+
framework/effect-runtime.js
|
|
258
|
+
framework/native-runtime.js
|
|
259
|
+
framework/list-runtime.js
|
|
260
|
+
framework/shared-runtime.js
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Use tracked source only. Blank lines and comments remain included because the purpose is reproducible trend accounting, not language-normalized complexity theory.
|
|
264
|
+
|
|
265
|
+
Example command shape:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
wc -l <explicit-file-list>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
The completed baseline must record the expanded command rather than relying on shell history.
|
|
272
|
+
|
|
273
|
+
## Work Item 0.9.0-01: Freeze And Restore The Baseline
|
|
274
|
+
|
|
275
|
+
### Objective
|
|
276
|
+
|
|
277
|
+
Create the reproducible architectural, correctness, output, build, browser, and cross-framework baseline against which every 0.9 change is judged.
|
|
278
|
+
|
|
279
|
+
### Prohibited Work
|
|
280
|
+
|
|
281
|
+
- No semantic support expansion.
|
|
282
|
+
- No production compiler optimization.
|
|
283
|
+
- No runtime change.
|
|
284
|
+
- No fixture rewrite intended to make Kudzu look better.
|
|
285
|
+
- No package version or release-note change.
|
|
286
|
+
- No benchmark claim based on historical versions presented as current.
|
|
287
|
+
|
|
288
|
+
### Session 01A: Architecture And Complexity Ledger
|
|
289
|
+
|
|
290
|
+
**Inputs:** current tree, current architecture document, current ModuleIR validator, normalization pipeline.
|
|
291
|
+
|
|
292
|
+
**Tasks:**
|
|
293
|
+
|
|
294
|
+
1. Verify the current package version and exact Git revision.
|
|
295
|
+
2. Verify the fifteen-entry normalization order from code.
|
|
296
|
+
3. Classify every entry as transform, validator, adapter, or mixed proof/transform.
|
|
297
|
+
4. Map each entry to Semantic Kernel concepts produced or validated.
|
|
298
|
+
5. Record every ModuleIR record kind and structural reference.
|
|
299
|
+
6. Record every browser runtime concept and emitted module family.
|
|
300
|
+
7. Run the explicit LOC commands for the three baseline file sets.
|
|
301
|
+
8. Record `source-compiler.mjs` separately because it is the principal residual coupling point.
|
|
302
|
+
9. Record current test count and Chrome-required test count.
|
|
303
|
+
10. Add a dated baseline ledger to `0.9-semantic-compression.md` or a linked results document.
|
|
304
|
+
|
|
305
|
+
**Expected files:** documentation only.
|
|
306
|
+
|
|
307
|
+
**Done evidence:** exact commands, exact revision, counts, file sets, and no production diff.
|
|
308
|
+
|
|
309
|
+
### Session 01B: Output And Capability Baseline
|
|
310
|
+
|
|
311
|
+
**Tasks:**
|
|
312
|
+
|
|
313
|
+
1. Run `npm run check` from a clean output state.
|
|
314
|
+
2. Record emitted page count and interactive/static route count.
|
|
315
|
+
3. Record representative static, command, binding, list, effect, Worker, runtime-parameter, navigation, and package-effect routes.
|
|
316
|
+
4. Record complete emitted file lists for representative fixtures.
|
|
317
|
+
5. Record raw/gzip bytes by runtime, handler, effect, Worker, CSS, and HTML class.
|
|
318
|
+
6. Verify React, React Router, and supported erased package references do not survive where forbidden.
|
|
319
|
+
7. Verify static siblings contain no module scripts, state markers, or indirect capability preload.
|
|
320
|
+
8. Record deterministic hashes for maintained representative output.
|
|
321
|
+
|
|
322
|
+
**Stop condition:** any nondeterministic output must be investigated before performance sampling.
|
|
323
|
+
|
|
324
|
+
### Session 01C: Correctness And Browser Baseline
|
|
325
|
+
|
|
326
|
+
**Tasks:**
|
|
327
|
+
|
|
328
|
+
1. Run `npm test` and record all tests.
|
|
329
|
+
2. Run `KUDZU_REQUIRE_CHROME=1 CHROME_BIN="..." npm test` and record browser version.
|
|
330
|
+
3. Run `npm run test:package`.
|
|
331
|
+
4. Record currently exercised browser journeys by semantic category.
|
|
332
|
+
5. Record disabled-JS, delayed-JS, missing-chunk, slow-network, and slow-CPU gaps explicitly.
|
|
333
|
+
6. Record unresolved terminal/WebSocket browser coverage gaps.
|
|
334
|
+
7. Record the existing commerce navigation timeout as a failure, not an omitted result.
|
|
335
|
+
|
|
336
|
+
**Done evidence:** all available checks pass or each existing failure has an owner and blocker entry.
|
|
337
|
+
|
|
338
|
+
### Session 01D: Kudzu-Only Performance Baseline
|
|
339
|
+
|
|
340
|
+
**Tasks:**
|
|
341
|
+
|
|
342
|
+
1. Run `npm run benchmark`.
|
|
343
|
+
2. Run the keyed benchmark with at least seven fresh Chrome profiles.
|
|
344
|
+
3. Run source-scale at the maintained default.
|
|
345
|
+
4. Run source-scale at 100 routes.
|
|
346
|
+
5. Attempt source-scale at 1,000 routes.
|
|
347
|
+
6. Attempt source-scale at 10,000 routes only after estimating disk/time requirements from the lower scales.
|
|
348
|
+
7. Record unavailable or impractical sizes honestly rather than reducing semantic content silently.
|
|
349
|
+
8. Record fresh-process peak RSS, raw arrays, medians, min/max, output digest, and environment.
|
|
350
|
+
|
|
351
|
+
**Commands:**
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
npm run benchmark
|
|
355
|
+
RUNS=7 CHROME_BIN="/path/to/chrome" npm run benchmark:keyed
|
|
356
|
+
ROUTES=100 WARMUPS=1 RUNS=7 npm run benchmark:source-scale
|
|
357
|
+
ROUTES=1000 WARMUPS=1 RUNS=7 npm run benchmark:source-scale
|
|
358
|
+
ROUTES=10000 WARMUPS=1 RUNS=7 npm run benchmark:source-scale
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
The generated source-scale fixture is a compiler diagnostic. It cannot replace matched cross-framework application scaling.
|
|
362
|
+
|
|
363
|
+
### Session 01E: Restore The Maintained Cross-Framework Harness
|
|
364
|
+
|
|
365
|
+
**Objective:** make current comparison claims reproducible from a pinned public benchmark revision and tracked Kudzu instructions.
|
|
366
|
+
|
|
367
|
+
**Current external reference:** `SimYunSup/kudzu-based-bench` revision `f2d5be1a516c539e30f7125f6870d42b1dd02ecd` is the historical pinned baseline. A new revision may replace it only after review of fixture parity and lockfile changes.
|
|
368
|
+
|
|
369
|
+
**Tasks:**
|
|
370
|
+
|
|
371
|
+
1. Clone and detach the pinned external revision.
|
|
372
|
+
2. Verify comparator package versions from the lockfile.
|
|
373
|
+
3. Run the existing commerce build and artifact commands without modification.
|
|
374
|
+
4. Reproduce the existing 1,000-product Kudzu result.
|
|
375
|
+
5. Reproduce or characterize the commerce browser timeout.
|
|
376
|
+
6. Decide whether the harness remains external or a tracked minimal orchestrator belongs in Kudzu.
|
|
377
|
+
7. Do not duplicate the benchmark applications into the compiler repository unless reproducibility cannot otherwise be guaranteed.
|
|
378
|
+
8. Ensure Kudzu documentation points to a real command and tracked or public immutable input.
|
|
379
|
+
9. Pin browser, Node, package manager, OS/hardware, CPU throttle, network profile, and cache policy.
|
|
380
|
+
10. Record all comparator failures.
|
|
381
|
+
|
|
382
|
+
**Historical reproduction shape:**
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
git clone https://github.com/SimYunSup/kudzu-based-bench.git /tmp/kudzu-based-bench
|
|
386
|
+
git -C /tmp/kudzu-based-bench checkout --detach f2d5be1a516c539e30f7125f6870d42b1dd02ecd
|
|
387
|
+
pnpm --dir /tmp/kudzu-based-bench install --force
|
|
388
|
+
pnpm --dir /tmp/kudzu-based-bench run build:commerce
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
**Available external scenarios to verify:**
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
pnpm --dir /tmp/kudzu-based-bench run build:shop
|
|
395
|
+
pnpm --dir /tmp/kudzu-based-bench shop:scale -- --sizes 100,1000,10000 --runs 3
|
|
396
|
+
pnpm --dir /tmp/kudzu-based-bench shop:assets
|
|
397
|
+
pnpm --dir /tmp/kudzu-based-bench shop:bench -- --variant shop-kudzu --runs 7 --cpu 4 --net slow4g
|
|
398
|
+
pnpm --dir /tmp/kudzu-based-bench shop:report
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
Three sequential scale samples are insufficient for the final Kudzu gate. The accepted harness must use rotating/interleaved target order, one warm-up, at least seven samples, and more samples when ranges overlap.
|
|
402
|
+
|
|
403
|
+
### Session 01F: Cross-Framework Contract
|
|
404
|
+
|
|
405
|
+
Create one checked contract for every compared scenario.
|
|
406
|
+
|
|
407
|
+
| Contract field | Required content |
|
|
408
|
+
|---|---|
|
|
409
|
+
| Scenario ID | Stable readable name |
|
|
410
|
+
| Application class | Content or stateful interactive |
|
|
411
|
+
| Routes | Exact route set and emitted page count |
|
|
412
|
+
| Data | Same deterministic input and generation seed |
|
|
413
|
+
| Behavior | User-visible action and expected result list |
|
|
414
|
+
| Accessibility | Roles, names, keyboard behavior, focus, status, and errors |
|
|
415
|
+
| Progressive enhancement | Disabled, delayed, and missing-JS expectation |
|
|
416
|
+
| Hosting | Static server, compression, cache, and navigation assumptions |
|
|
417
|
+
| Browser | Exact version and launch flags |
|
|
418
|
+
| Framework | Exact package and lockfile versions |
|
|
419
|
+
| Success gate | Automated behavior checks that run before timing |
|
|
420
|
+
| Measurements | Bytes, readiness, events, navigation, CPU, heap, resilience, build |
|
|
421
|
+
|
|
422
|
+
**Anti-gaming rule:** framework variants may use idiomatic production configuration, but may not remove required behavior, accessibility, data, routes, or error handling.
|
|
423
|
+
|
|
424
|
+
### Session 01G: Baseline Sign-Off
|
|
425
|
+
|
|
426
|
+
0.9.0-01 completes only when:
|
|
427
|
+
|
|
428
|
+
- architecture and LOC ledgers are dated and reproducible;
|
|
429
|
+
- output manifests and capability bytes are recorded;
|
|
430
|
+
- Node and required Chrome tests pass;
|
|
431
|
+
- package smoke passes;
|
|
432
|
+
- Kudzu-only performance baselines are recorded;
|
|
433
|
+
- the external benchmark revision and comparator versions are pinned;
|
|
434
|
+
- known harness gaps and failures are explicit;
|
|
435
|
+
- no production source or deploy output changed solely to establish the baseline.
|
|
436
|
+
|
|
437
|
+
## Work Item 0.9.0-02: Strengthen Derived
|
|
438
|
+
|
|
439
|
+
### Objective
|
|
440
|
+
|
|
441
|
+
Make realistic pure multi-state calculations first-class semantic values whose dependencies and selected outputs can feed direct bindings, effects, and keyed collections without syntax-specific browser behavior.
|
|
442
|
+
|
|
443
|
+
### Authorization Gate
|
|
444
|
+
|
|
445
|
+
Work cannot start until:
|
|
446
|
+
|
|
447
|
+
- 0.9.0-01 is complete;
|
|
448
|
+
- a real upstream application or public benchmark scenario is pinned;
|
|
449
|
+
- the first unsupported source location is reproduced with current Kudzu;
|
|
450
|
+
- the reduced fixture retains the upstream semantic shape;
|
|
451
|
+
- the reduction cannot be solved by native behavior or existing source restructuring that would remain ordinary React authoring.
|
|
452
|
+
|
|
453
|
+
### Candidate Fixture Classes
|
|
454
|
+
|
|
455
|
+
These are investigation candidates, not authorization by themselves:
|
|
456
|
+
|
|
457
|
+
| Candidate | Required semantic pressure |
|
|
458
|
+
|---|---|
|
|
459
|
+
| Commerce variant selection | Color, size, and static variants derive price, stock, image, and availability |
|
|
460
|
+
| Financial projection | Multiple inputs derive totals, status fields, and a chart collection |
|
|
461
|
+
| Filtered availability | Search, category, inventory, and static catalog derive summary plus keyed results |
|
|
462
|
+
|
|
463
|
+
The first fixture must record upstream URL, commit, license, acquisition hash, original source, and reduced source. The second unrelated fixture must prove the same semantic representation before 0.9 closes.
|
|
464
|
+
|
|
465
|
+
### Target Semantic Contract
|
|
466
|
+
|
|
467
|
+
```text
|
|
468
|
+
Derived
|
|
469
|
+
identity: stable source-local slot
|
|
470
|
+
dependencies:
|
|
471
|
+
direct SignalIR references
|
|
472
|
+
serializable static captures
|
|
473
|
+
computation:
|
|
474
|
+
existing tagged pure expression/selector vocabulary
|
|
475
|
+
result:
|
|
476
|
+
deterministic JSON-safe primitive, object, or array
|
|
477
|
+
consumers:
|
|
478
|
+
selected BindingIR field
|
|
479
|
+
selected EffectIR dependency
|
|
480
|
+
selected KeyedBlockIR collection
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
The target contract does not require a new public API or browser graph. It should reuse `collection-analysis.mjs` and `collection-selector.js` unless a fixture proves those contracts insufficient.
|
|
484
|
+
|
|
485
|
+
### Current Producer/Consumer Seam
|
|
486
|
+
|
|
487
|
+
| Concern | Current owner | Required convergence |
|
|
488
|
+
|---|---|---|
|
|
489
|
+
| Pure expression parsing | `collection-analysis.mjs` | Remain canonical |
|
|
490
|
+
| Derived registration | `descriptor-session.mjs` | Own explicit state/static dependencies |
|
|
491
|
+
| Effect dependency | `effect-analysis.mjs` | Reference selected derived semantics |
|
|
492
|
+
| Keyed selector | `source-compiler.mjs` | Continue using existing selector records |
|
|
493
|
+
| Reactive binding | `source-compiler.mjs` | Stop bypassing semantic identity where fixture requires reuse |
|
|
494
|
+
| Imported calculation | `source-compiler.mjs` | Reuse the same deterministic result contract |
|
|
495
|
+
| IR validation | `module-ir.mjs` | Validate every selected consumer edge |
|
|
496
|
+
| Browser evaluation | `collection-selector.js` | Remain the only general tagged evaluator |
|
|
497
|
+
|
|
498
|
+
### Session 02A: Fixture Intake And Failure Census
|
|
499
|
+
|
|
500
|
+
1. Pin the real fixture source.
|
|
501
|
+
2. Build it unchanged where feasible.
|
|
502
|
+
3. Record every unsupported site but select only the first Derived blocker.
|
|
503
|
+
4. Reduce the blocker without changing state dependencies or result behavior.
|
|
504
|
+
5. Add one static sibling.
|
|
505
|
+
6. Add one build test that fails before compiler changes.
|
|
506
|
+
7. Add no semantic implementation in this session.
|
|
507
|
+
|
|
508
|
+
**Result:** complete on 2026-08-18.
|
|
509
|
+
|
|
510
|
+
- Authorizing source: Medusa's MIT-licensed `ProductActions` at revision `9818886f06e493cb2249733d114d339aa216ef00`.
|
|
511
|
+
- Evidence and hashes: [`test/fixtures/derived-medusa-product-actions/README.md`](../../test/fixtures/derived-medusa-product-actions/README.md).
|
|
512
|
+
- Reduced fixture: [`test/fixtures/derived-medusa-product-actions`](../../test/fixtures/derived-medusa-product-actions).
|
|
513
|
+
- Preserved pressure: two selected option values, immutable variants, deterministic selected object, selected price/availability bindings, and a selected-ID effect dependency.
|
|
514
|
+
- First unsupported site: `src/pages/index.tsx:11:7`, where `[selected.id]` reports `useEffect() dependencies must be direct state or runtime parameter identifiers or property reads`.
|
|
515
|
+
- Failure census: the reduced fixture has one observed Derived blocker. Removing only the effect makes both routes build, proving the imported calculation and selected binding fields are already supported. The unreduced Next.js application has unrelated framework/package boundaries and is not used to authorize them.
|
|
516
|
+
- Static sibling: `src/pages/static.tsx`; it remains non-interactive, though the current red build stops before deploy emission.
|
|
517
|
+
- Semantic implementation: none.
|
|
518
|
+
- Accounting: zero semantic primitives, ModuleIR kinds, core passes, core/compatibility LOC, runtime concepts, and browser bytes added; one fixture and one expected-red focused test added; no benchmark delta exists because production source is unchanged.
|
|
519
|
+
- Verification: `npm run check` passes; the full suite reports 233 pass and the one authorizing test failure out of 234 tests.
|
|
520
|
+
|
|
521
|
+
Session 02B input:
|
|
522
|
+
|
|
523
|
+
```text
|
|
524
|
+
Authorizing fixture: Medusa ProductActions reduction
|
|
525
|
+
First unsupported source location: src/pages/index.tsx:11:7, selected.id effect dependency
|
|
526
|
+
Canonical semantic reduction: pending 02B; prefer one existing tagged Derived identity with explicit color/size signal dependencies and static variant capture
|
|
527
|
+
Existing IR producer: imported calculation and binding analysis in source-compiler.mjs
|
|
528
|
+
Existing IR consumers: BindingIR succeeds; EffectIR does not accept the selected calculation field
|
|
529
|
+
Owner and release boundary: page-owned dependency effect with existing invalidation and cleanup rules
|
|
530
|
+
Nearby rejected forms: whole-result dependencies, dynamic fields, mutation, cycles, opaque captures, and nondeterministic results
|
|
531
|
+
Expected browser capability delta: none; reuse the existing effect and tagged evaluator capabilities
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
### Session 02B: Semantic Reduction Design
|
|
535
|
+
|
|
536
|
+
Complete the per-slice contract:
|
|
537
|
+
|
|
538
|
+
```text
|
|
539
|
+
Authorizing fixture:
|
|
540
|
+
First unsupported source location:
|
|
541
|
+
Canonical semantic reduction:
|
|
542
|
+
Existing IR producer:
|
|
543
|
+
Existing IR consumers:
|
|
544
|
+
Owner and release boundary:
|
|
545
|
+
Nearby rejected forms:
|
|
546
|
+
Expected browser capability delta:
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
Review questions:
|
|
550
|
+
|
|
551
|
+
1. Can the fixture use an existing tagged expression?
|
|
552
|
+
2. Are all state dependencies explicit by lexical identity?
|
|
553
|
+
3. Are static captures JSON-safe and immutable?
|
|
554
|
+
4. Is the result deterministic on every path?
|
|
555
|
+
5. Can every consumer select a static property?
|
|
556
|
+
6. Can existing route state subscriptions schedule evaluation?
|
|
557
|
+
7. Can `Object.is` suppress unchanged selected effect values?
|
|
558
|
+
8. Does list evaluation preserve retained keyed identity?
|
|
559
|
+
9. Does the design change three unrelated core subsystems?
|
|
560
|
+
|
|
561
|
+
If question 9 is yes, stop for architecture review before implementation.
|
|
562
|
+
|
|
563
|
+
### Session 02C: Minimal Producer Slice
|
|
564
|
+
|
|
565
|
+
Expected files are limited to the authorizing fixture, focused compiler test, and the smallest producer boundary among:
|
|
566
|
+
|
|
567
|
+
```text
|
|
568
|
+
framework/compiler/collection-analysis.mjs
|
|
569
|
+
framework/compiler/descriptor-session.mjs
|
|
570
|
+
framework/compiler/source-compiler.mjs
|
|
571
|
+
framework/compiler/ir/module-ir.mjs
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
Required checks:
|
|
575
|
+
|
|
576
|
+
- deterministic JSON round-trip;
|
|
577
|
+
- stable signal dependency order;
|
|
578
|
+
- no AST in finalized IR;
|
|
579
|
+
- no arbitrary call support;
|
|
580
|
+
- no browser-byte change before a consumer uses the result;
|
|
581
|
+
- malformed references fail before codegen.
|
|
582
|
+
|
|
583
|
+
### Session 02D: Binding Consumer
|
|
584
|
+
|
|
585
|
+
Add the smallest direct text/attribute consumer required by the fixture.
|
|
586
|
+
|
|
587
|
+
Required behavior:
|
|
588
|
+
|
|
589
|
+
- build-known initial result appears in complete HTML;
|
|
590
|
+
- only source states are subscribed;
|
|
591
|
+
- direct known DOM targets update;
|
|
592
|
+
- component functions do not execute in the browser;
|
|
593
|
+
- no second expression evaluator is emitted;
|
|
594
|
+
- an unrelated static sibling remains zero JavaScript.
|
|
595
|
+
|
|
596
|
+
### Session 02E: Selected Effect Dependency
|
|
597
|
+
|
|
598
|
+
Add only if the authorizing fixture requires it.
|
|
599
|
+
|
|
600
|
+
Required behavior:
|
|
601
|
+
|
|
602
|
+
- dependency scheduling follows source state commits;
|
|
603
|
+
- selected field evaluation happens through existing semantics;
|
|
604
|
+
- `Object.is` prevents rerun when the selected field is unchanged;
|
|
605
|
+
- cleanup runs before replacement setup;
|
|
606
|
+
- invalidation prevents stale writes;
|
|
607
|
+
- whole-result and dynamic-field dependencies remain rejected unless independently justified.
|
|
608
|
+
|
|
609
|
+
**Sessions 02B-02E result:** complete on 2026-08-18.
|
|
610
|
+
|
|
611
|
+
- Semantic reduction: one calculation `DerivedIR` owns explicit `color` and `size` `SignalIR` dependencies, one existing generated `BindingIR` evaluator, and static result fields `id`, `price`, and `available`.
|
|
612
|
+
- Binding consumers: price text and availability attribute `BindingIR` records reference the same calculation identity and retain their existing direct DOM evaluators.
|
|
613
|
+
- Effect consumer: `EffectIR` selects static field `id`, subscribes only to the two source signals, and evaluates through the generated handler module before unchanged `Object.is` comparison.
|
|
614
|
+
- Browser behavior: initial `black-m`, same-value suppression, `ivory-m`, and `ivory-s` price/availability transitions pass in required Chrome.
|
|
615
|
+
- Static exclusion: `/static` emits complete HTML and zero JavaScript; no `kudzu-collection-selector.js` or calculation-specific runtime is emitted.
|
|
616
|
+
- ModuleIR: no new record kind; the existing tagged `DerivedIR`, `BindingIR`, and `EffectIR` records gain validated calculation/evaluator/field edges.
|
|
617
|
+
- Production delta: 151 added and 24 removed lines across the existing producer, IR validation, RouteIR projection, effect codegen, build projection, and core route-render boundary. Core semantic file-set delta is +101 net lines. No normalization entry or compiler pass was added.
|
|
618
|
+
- Fixture JavaScript: 14,098 raw / 6,242 gzip bytes across seven existing capability artifact classes; the effect entry is 2,411 raw / 1,043 gzip bytes and the shared handler module is 816 raw / 344 gzip bytes.
|
|
619
|
+
- Verification: `npm run check`, 234/234 Node tests, 234/234 required-Chrome tests, focused ModuleIR malformed-edge checks, and local Markdown links pass.
|
|
620
|
+
|
|
621
|
+
Session 02F is skipped for this fixture because the calculation has no array field. This does not close the keyed-collection consumer generally.
|
|
622
|
+
|
|
623
|
+
### Session 02F: Keyed Collection Consumer
|
|
624
|
+
|
|
625
|
+
Add only if the same semantic result includes a required array field.
|
|
626
|
+
|
|
627
|
+
Required behavior:
|
|
628
|
+
|
|
629
|
+
- retained keys preserve DOM, state, effect, and ref identity;
|
|
630
|
+
- removed keys release ownership exactly once;
|
|
631
|
+
- re-added keys receive fresh state;
|
|
632
|
+
- latest item data reaches handlers;
|
|
633
|
+
- SVG namespace remains correct where applicable;
|
|
634
|
+
- non-array result at runtime fails safely and explicitly.
|
|
635
|
+
|
|
636
|
+
### Session 02G: Negative Boundary
|
|
637
|
+
|
|
638
|
+
Required negative fixtures:
|
|
639
|
+
|
|
640
|
+
- dynamic result property;
|
|
641
|
+
- mutation;
|
|
642
|
+
- cyclic derived locals;
|
|
643
|
+
- nondeterministic call;
|
|
644
|
+
- opaque or nonserializable capture;
|
|
645
|
+
- package import in generic derived computation;
|
|
646
|
+
- fallthrough or inconsistent result shape;
|
|
647
|
+
- async helper;
|
|
648
|
+
- dynamic dependency discovery;
|
|
649
|
+
- unsupported whole-object effect dependency.
|
|
650
|
+
|
|
651
|
+
Diagnostics must identify the authored source, semantic reason, supported forms, and safe migration direction.
|
|
652
|
+
|
|
653
|
+
**Result:** complete on 2026-08-18.
|
|
654
|
+
|
|
655
|
+
- One focused source-index test covers computed fields, whole-result dependencies, composed arguments, mutation, local cycles, nondeterministic calls, opaque relative captures, package imports, inconsistent fields, fallthrough, and async helpers.
|
|
656
|
+
- Validation runs only for imported calculation fields selected by an effect. Existing reactive imported calculations that do not enter this boundary retain their prior behavior and diagnostics.
|
|
657
|
+
- Every failure reports the authored page or helper source. No generated path, fallback evaluator, runtime, normalization pass, or adapter was added.
|
|
658
|
+
|
|
659
|
+
### Session 02H: Second Unrelated Fixture
|
|
660
|
+
|
|
661
|
+
The second fixture must use the same representation without adding another semantic record or evaluator. If it requires a second syntax-specific implementation, the first abstraction is not yet proven.
|
|
662
|
+
|
|
663
|
+
**Result:** complete on 2026-08-18.
|
|
664
|
+
|
|
665
|
+
- Second source: Mercury Agent's MIT-licensed Profit Sharing page at revision `829b1713740c5d551155540df712de9243c9e415`.
|
|
666
|
+
- Evidence and hashes: [`test/fixtures/derived-mercury-profit-sharing/README.md`](../../test/fixtures/derived-mercury-profit-sharing/README.md).
|
|
667
|
+
- Preserved pressure: four primitive financial inputs derive cumulative scalar summaries and an adjustable keyed yearly projection.
|
|
668
|
+
- The fixture reuses the Medusa calculation `DerivedIR`, generated binding evaluator, source-signal ordering, scalar `BindingIR`, selected `EffectIR`, and calculated keyed-list path without production compiler changes.
|
|
669
|
+
- Chrome proves scalar updates, retained year-one/year-two DOM identity, year-three insertion/removal, fresh year-three re-entry, and static-sibling zero-JavaScript output.
|
|
670
|
+
- Session 02F therefore closes through Mercury's direct `rows` field. Existing keyed ownership supplies reconciliation and release; no selector runtime or calculation-specific list runtime is emitted.
|
|
671
|
+
|
|
672
|
+
### Session 02I: Derived Closure Report
|
|
673
|
+
|
|
674
|
+
Report:
|
|
675
|
+
|
|
676
|
+
```text
|
|
677
|
+
Semantic primitives added:
|
|
678
|
+
Core passes added/removed:
|
|
679
|
+
Core compiler LOC delta:
|
|
680
|
+
Runtime concepts added:
|
|
681
|
+
Browser raw/gzip delta by fixture:
|
|
682
|
+
Normalization rules added/removed:
|
|
683
|
+
Fixtures added:
|
|
684
|
+
Build delta:
|
|
685
|
+
Event/effect/list delta:
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
Expected result: zero semantic primitives, zero runtime concepts, one existing evaluator, and no JavaScript on build-folded/static siblings.
|
|
689
|
+
|
|
690
|
+
**Result:** complete on 2026-08-18.
|
|
691
|
+
|
|
692
|
+
```text
|
|
693
|
+
Semantic primitives added: 0
|
|
694
|
+
ModuleIR record kinds added: 0
|
|
695
|
+
Core passes added/removed: 0 / 0
|
|
696
|
+
Core compiler LOC delta: +180 (4,961 -> 5,141)
|
|
697
|
+
Production source net delta: +206 lines
|
|
698
|
+
Runtime concepts added: 0
|
|
699
|
+
Normalization rules added: 0
|
|
700
|
+
Adapter rules added: 0
|
|
701
|
+
Positive fixtures added: 2
|
|
702
|
+
Negative boundary forms added: 10 in one focused corpus test
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
Browser and output accounting:
|
|
706
|
+
|
|
707
|
+
| Fixture | Interactive JS raw/gzip | Static sibling JS | Calculation/selector runtime |
|
|
708
|
+
|---|---:|---:|---|
|
|
709
|
+
| Medusa Product Actions | 14,098 / 6,242 B | 0 B | None |
|
|
710
|
+
| Mercury Profit Sharing | 30,698 / 11,439 B | 0 B | Existing keyed-list runtime only |
|
|
711
|
+
|
|
712
|
+
- Medusa deploy digest: `147a2bffd2085a540799aabb92655362607d170f251d4d41272d20cde7911fa3`.
|
|
713
|
+
- Mercury deploy digest: `24e100996f23068634d4ebab72c5f8a9c39e8f7b6d4c05c10dee3fcdca032daf`.
|
|
714
|
+
- Both fixture graphs omit `kudzu-collection-selector.js`; static siblings contain no script or state marker.
|
|
715
|
+
- The maintained Worker/effect benchmark remains 907 raw / 477 gzip B for the Worker graph and 13,786 raw / 5,931 gzip B for the window graph. Its seven-run build median is 169.7 ms versus the 177.4 ms baseline, a non-material directional change of approximately -4.3% with identical artifact bytes.
|
|
716
|
+
- Final verification passes on Node 24.14.0 and Google Chrome 151.0.7922.138: `npm run check` builds 174 pages with 2 interactive pages, the required-Chrome suite passes 236/236 tests, and `npm run test:package` installs 4 packages and builds 1 static page with 0 interactive pages.
|
|
717
|
+
- The core LOC increase is explicit debt for Work Item 0.9.0-06. Final release still requires core LOC to return to baseline or an architecture review; this closure does not waive that gate.
|
|
718
|
+
|
|
719
|
+
## Work Item 0.9.0-03: Unify Shared State And Actions
|
|
720
|
+
|
|
721
|
+
### Objective
|
|
722
|
+
|
|
723
|
+
Make package-neutral shared state, actions, operations, dependencies, and ownership authoritative after compatibility analysis, while preserving Context and Zustand source diagnostics.
|
|
724
|
+
|
|
725
|
+
### Scope Boundary
|
|
726
|
+
|
|
727
|
+
This item concerns reduced Context action specialization and reduced Zustand stores. Ordinary static build-time Context does not need to become shared browser state and must not be forced through `SharedStateIR`.
|
|
728
|
+
|
|
729
|
+
### Current Duplication To Prove
|
|
730
|
+
|
|
731
|
+
| Behavior | Context path | Zustand path |
|
|
732
|
+
|---|---|---|
|
|
733
|
+
| State-pair discovery | `resolveContextHook()` | `analyzeZustandStores()` |
|
|
734
|
+
| Action capture validation | Context action analysis | Zustand action analysis |
|
|
735
|
+
| State dependency discovery | `contextAction` descriptors | `sharedAction` descriptors |
|
|
736
|
+
| Handler dispatch | Context AST clone/inlining | `sharedActionDispatch()` |
|
|
737
|
+
| Concrete state ownership | Provider symbol ownership | Shared layout store identity |
|
|
738
|
+
| Generic IR | Ordinary state/handler records | `SharedStateIR` and `SharedActionIR` |
|
|
739
|
+
|
|
740
|
+
### Authorization Gate
|
|
741
|
+
|
|
742
|
+
- 0.9.0-02 is complete.
|
|
743
|
+
- A real fixture demonstrates duplicated source-model behavior.
|
|
744
|
+
- The fixture requires shared action semantics, not ordinary static Context.
|
|
745
|
+
- Current diagnostics and layout/route lifetime are recorded.
|
|
746
|
+
|
|
747
|
+
### Session 03A: Equivalence Fixture And IR Snapshots
|
|
748
|
+
|
|
749
|
+
1. Add equivalent Context and Zustand source variants for one behavior.
|
|
750
|
+
2. Assert existing browser behavior before unification.
|
|
751
|
+
3. Snapshot current ModuleIR differences.
|
|
752
|
+
4. Add a static sibling to the Zustand fixture.
|
|
753
|
+
5. Record layout, route, navigation, same-turn update, and effect behavior.
|
|
754
|
+
6. Add a failing assertion for the intended package-neutral boundary.
|
|
755
|
+
|
|
756
|
+
**Result:** complete on 2026-08-19.
|
|
757
|
+
|
|
758
|
+
- Authorizing evidence: the existing reduced Context Notes and Zustand cart fixtures prove duplicated state/action discovery and lowering. Their original external upstream revisions were not recorded, so the equivalence fixture records the Kudzu commits that introduced and narrowed both reductions instead of inventing provenance.
|
|
759
|
+
- Equivalent fixture: [`test/fixtures/context-shared-actions`](../../test/fixtures/context-shared-actions) reproduces the Zustand cart's object state, parameterized add/remove actions, two same-turn additions, batched dependency effect, retained layout DOM, enhanced navigation, and static sibling through the existing Context source boundary.
|
|
760
|
+
- Current semantic equivalence: both variants emit one layout-owned `quantities` RouteIR state, the same selected `quantities.oak ?? 0` effect dependency, the same direct bindings, and the same navigation lifetime. Required Chrome proves `0 -> 2 -> 0`, one effect commit per synchronous turn, retained header identity, and current route consumers.
|
|
761
|
+
- Recorded ownership limit: route consumers are replaced while the shared layout owner persists. The authored effect has no cleanup callback, so document/layout disposal cleanup remains unproven here and is reserved for Session 03E rather than implied by 03A.
|
|
762
|
+
- Current ModuleIR difference: Context modules retain ordinary `module-symbol` signals, empty `sharedStates`/`sharedActions`, and empty handler action edges. Zustand modules retain one package-neutral `SharedStateIR`, one `SharedActionIR` per selected action, `shared-state` signals, and handler action slot `0`.
|
|
763
|
+
- Intended boundary failure: one focused assertion compares source-model-neutral state, action, handler-action, and signal-kind projections for the Context and Zustand product/cart modules. It fails only because Context has not crossed the package-neutral shared-state/action boundary.
|
|
764
|
+
- Static exclusion: both `/static` routes emit complete HTML with no script or state marker. Context and Zustand package references are absent from browser output.
|
|
765
|
+
- Output accounting: the equivalent Context graph is 29,791 raw / 13,022 aggregate gzip JavaScript bytes; the Zustand graph is 30,131 raw / 13,150 aggregate gzip bytes. Both emit the same 18 deploy paths. Digests are `ba302120f5fe7584bbdaae8a0a8ccba08385f5108b713ba5101e4ed7bf1f45ed` and `86c13ffc95545c2ad02d752481d5ea63de16d4533322bdfbfd046b0dc87a3ad2` respectively.
|
|
766
|
+
- Accounting: zero semantic primitives, ModuleIR record kinds, core passes, normalization entries, production compiler lines, runtime concepts, and browser-runtime bytes added. One positive equivalence fixture, two static sibling checks, current IR snapshots, and one expected-red boundary assertion were added.
|
|
767
|
+
- Verification at `abe87ceafbf70ed8eb2618976e2d1e18c378126f`, Node 24.14.0, and Chrome 142.0.7444.175: `npm run check` passes; both focused required-Chrome behavior tests pass before the boundary assertion; the full suite reports 236 pass and the one authorizing failure out of 237 tests.
|
|
768
|
+
|
|
769
|
+
Session 03B input:
|
|
770
|
+
|
|
771
|
+
```text
|
|
772
|
+
Authorizing fixture: equivalent Context/Zustand cart reduction
|
|
773
|
+
First unsupported boundary: Context product/cart ModuleIR has no SharedStateIR, SharedActionIR, shared-state SignalIR, or HandlerIR action edge
|
|
774
|
+
Canonical semantic reduction: existing SharedStateIR and SharedActionIR plus the existing validated handler operation reference, if sufficient
|
|
775
|
+
Existing IR producer: Zustand adapter registration in source-compiler.mjs
|
|
776
|
+
Existing IR consumers: descriptor-session.mjs, handler-lowering.mjs, and module-ir.mjs
|
|
777
|
+
Owner and release boundary: one layout-owned state identity with route-owned action consumers and an existing layout dependency effect
|
|
778
|
+
Nearby rejected forms: existing Context and Zustand negative boundaries remain unchanged
|
|
779
|
+
Expected browser capability delta: none; RouteIR, runtime family, and browser state machinery are already equivalent
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
### Session 03B: Package-Neutral Action Contract
|
|
783
|
+
|
|
784
|
+
Decide whether existing `SharedActionIR` plus structured `HandlerIR` operations is sufficient. Do not add a new action language if current command and handler semantics can represent the fixture.
|
|
785
|
+
|
|
786
|
+
Required fields remain package-neutral:
|
|
787
|
+
|
|
788
|
+
```text
|
|
789
|
+
shared state identity
|
|
790
|
+
target field/state
|
|
791
|
+
operation identity
|
|
792
|
+
structured state transition or validated handler operation reference
|
|
793
|
+
owner/lifetime
|
|
794
|
+
source provenance
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
Forbidden fields in generic IR:
|
|
798
|
+
|
|
799
|
+
```text
|
|
800
|
+
Zustand package names
|
|
801
|
+
Context object names
|
|
802
|
+
Provider implementation AST
|
|
803
|
+
set callback spelling
|
|
804
|
+
library selector syntax
|
|
805
|
+
runtime subscription functions
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
**Result:** complete on 2026-08-19. Existing records are sufficient when read together: `SharedActionIR.state` is the deterministic shared-owner anchor, while the linked command or module-export `HandlerIR` owns the complete structured operation and ordered signal set. Multi-state Context actions therefore remain one action identity without adding a target-array schema. Context `SharedStateIR` records identity and field; Provider execution and RouteIR remain authoritative for the concrete initial value and lifetime. No action language, record kind, version change, or runtime concept is required.
|
|
809
|
+
|
|
810
|
+
### Session 03C: Context Adapter Boundary
|
|
811
|
+
|
|
812
|
+
Move only the reduced Context action output to package-neutral records. Preserve:
|
|
813
|
+
|
|
814
|
+
- direct `useContext` source boundary;
|
|
815
|
+
- one local or relative Context declaration;
|
|
816
|
+
- one Provider;
|
|
817
|
+
- direct shorthand Provider value;
|
|
818
|
+
- exposed state requirement;
|
|
819
|
+
- compiler-only action setters;
|
|
820
|
+
- collision-free consumer aliases;
|
|
821
|
+
- direct-call-only action use;
|
|
822
|
+
- existing negative diagnostics.
|
|
823
|
+
|
|
824
|
+
Do not turn general Context values into a store.
|
|
825
|
+
|
|
826
|
+
**Result:** complete. Reduced Context consumers now register `SharedStateIR`, `SharedActionIR`, shared-state `SignalIR`, and handler action edges using the Provider's stable module-symbol identity. Provider `useState()` execution, ordinary Context rendering, compiler-only setters, collision aliases, and existing source diagnostics remain unchanged. Ordinary static Context values do not enter this path.
|
|
827
|
+
|
|
828
|
+
### Session 03D: Generic Handler Consumption
|
|
829
|
+
|
|
830
|
+
Converge `contextAction` and `sharedAction` only after adapters have produced equivalent package-neutral records.
|
|
831
|
+
|
|
832
|
+
Expected generic consumers:
|
|
833
|
+
|
|
834
|
+
```text
|
|
835
|
+
framework/compiler/descriptor-session.mjs
|
|
836
|
+
framework/compiler/handler-lowering.mjs
|
|
837
|
+
framework/compiler/ir/module-ir.mjs
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
`core.mjs` and browser runtime should remain unchanged unless the fixture proves concrete state allocation cannot be represented today.
|
|
841
|
+
|
|
842
|
+
**Result:** complete. `descriptor-session.mjs` discovers direct action dependencies from one package-neutral transient action descriptor, and `handler-lowering.mjs` consumes the same `sharedAction` entry for Context and Zustand. Direct command optimization retains its `HandlerIR.actions` edge. Provider/action AST and setter spelling remain source-local and do not enter finalized ModuleIR. `contextAction` branches were removed; `core.mjs`, RouteIR, capability planning, and browser runtimes did not change.
|
|
843
|
+
|
|
844
|
+
### Session 03E: Ownership And Navigation Proof
|
|
845
|
+
|
|
846
|
+
Required browser behavior:
|
|
847
|
+
|
|
848
|
+
- same-turn actions see current logical state;
|
|
849
|
+
- DOM writes remain batched;
|
|
850
|
+
- layout-owned state persists through enhanced navigation;
|
|
851
|
+
- route-owned consumers release correctly;
|
|
852
|
+
- effects observe the same shared dependencies;
|
|
853
|
+
- document/layout disposal cleans up once;
|
|
854
|
+
- static siblings load no store or Context runtime;
|
|
855
|
+
- package imports are absent from output.
|
|
856
|
+
|
|
857
|
+
**Result:** complete. Required Chrome runs the same cart journey for both source models. Two same-turn additions produce one `0 -> 2` effect commit; dependency cleanup precedes `2 -> 0`; enhanced navigation retains the header and layout state; route consumers read the current value; non-persisted `pagehide` disposes the layout effect exactly once. Both static siblings remain complete zero-JavaScript HTML, and React, Context, and Zustand package references are absent from browser output.
|
|
858
|
+
|
|
859
|
+
### Session 03F: Negative Boundary
|
|
860
|
+
|
|
861
|
+
Keep or add fixed negatives for:
|
|
862
|
+
|
|
863
|
+
- hidden action state;
|
|
864
|
+
- exposed setter without state;
|
|
865
|
+
- private captures;
|
|
866
|
+
- dynamic Provider value;
|
|
867
|
+
- multiple Providers;
|
|
868
|
+
- indirect action alias;
|
|
869
|
+
- dynamic store field;
|
|
870
|
+
- derived/dynamic Zustand selector;
|
|
871
|
+
- captured Zustand helper;
|
|
872
|
+
- store initialization in keyed ownership;
|
|
873
|
+
- action escape or callback registry use.
|
|
874
|
+
|
|
875
|
+
**Result:** complete. Existing fixtures retain hidden-state, setter-only, private-capture, indirect-action, derived-selector, captured-helper, and action-escape diagnostics. Four focused fixtures add dynamic Provider values, multiple Providers, dynamic Zustand fields, and keyed-owner store calls. The keyed form remains rejected by the existing pure keyed-expression call boundary; no keyed shared-store semantics were added.
|
|
876
|
+
|
|
877
|
+
### Session 03G: Shared-State Closure Report
|
|
878
|
+
|
|
879
|
+
Expected result:
|
|
880
|
+
|
|
881
|
+
```text
|
|
882
|
+
Semantic primitives +0
|
|
883
|
+
Generic browser store +0
|
|
884
|
+
Subscription runtime +0
|
|
885
|
+
Package-specific IR removed or contained
|
|
886
|
+
Generic action consumers shared
|
|
887
|
+
Static sibling JS 0
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
**Result:** complete on 2026-08-19.
|
|
891
|
+
|
|
892
|
+
```text
|
|
893
|
+
Semantic primitives added: 0
|
|
894
|
+
ModuleIR record kinds added/removed: 0 / 0
|
|
895
|
+
Core passes added/removed: 0 / 0
|
|
896
|
+
Ordered normalization entries: 0 / 0
|
|
897
|
+
Runtime concepts added: 0
|
|
898
|
+
Generic store/subscription runtime: 0
|
|
899
|
+
Production source net delta: +26 lines
|
|
900
|
+
Core semantic LOC delta for item 03: +26 (5,140 -> 5,166)
|
|
901
|
+
Core semantic LOC delta from 0.8.62: +205 (4,961 -> 5,166)
|
|
902
|
+
Compatibility LOC delta: 0
|
|
903
|
+
Positive fixtures added: 1
|
|
904
|
+
Negative fixtures added: 4
|
|
905
|
+
Static sibling JavaScript: 0 B
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
- The Context and Zustand cart fixtures each emit the same 18 deploy paths before and after unification. With the final cleanup source, Context remains 29,951 raw / 13,065 aggregate gzip JavaScript bytes with digest `66897dce8fffd9e6bfb8b6a65ffba922a9f19d47dbb12c2a613dfb4b5685ee93`; Zustand remains 30,291 / 13,193 bytes with digest `9c157adc2ff9afef1c282d50cecf77f6c0d8be2251d996298155ffb396e50211`.
|
|
909
|
+
- The maintained Worker/effect graph remains byte-identical at 907 raw / 477 gzip bytes and 13,786 raw / 5,931 gzip bytes. Same-host sequential diagnostics measured baseline median 631.5 ms and final-candidate median 456.6 ms at different times; the run was not interleaved, so it establishes no timing comparison or claim.
|
|
910
|
+
- `npm run check`, 241/241 Node tests, 241/241 required-Chrome tests on Chrome 142.0.7444.175, and packed-package smoke pass on Node 24.14.0. The package smoke installs four packages and builds one static page with zero interactive pages.
|
|
911
|
+
- The +26 item LOC and cumulative +205 core LOC remain explicit debt for Work Item 0.9.0-06; this closure does not waive the final baseline gate.
|
|
912
|
+
|
|
913
|
+
## Work Item 0.9.0-04: Generalize Resource Ownership
|
|
914
|
+
|
|
915
|
+
### Objective
|
|
916
|
+
|
|
917
|
+
Determine whether existing effect ownership is sufficient for realistic resource-heavy applications, consolidate lifecycle proof where evidence supports it, and avoid `ResourceIR` unless multiple real cross-owner fixtures prove a missing semantic concept.
|
|
918
|
+
|
|
919
|
+
### Starting Position
|
|
920
|
+
|
|
921
|
+
Existing fixtures already represent:
|
|
922
|
+
|
|
923
|
+
- WebSocket;
|
|
924
|
+
- Worker;
|
|
925
|
+
- terminal/SDK-like async acquisition;
|
|
926
|
+
- timers;
|
|
927
|
+
- animation frames;
|
|
928
|
+
- `IntersectionObserver`;
|
|
929
|
+
- canvas;
|
|
930
|
+
- package-owned browser modules;
|
|
931
|
+
- document listeners;
|
|
932
|
+
- media query subscriptions.
|
|
933
|
+
|
|
934
|
+
They currently fit `EffectIR`, authored setup closures, exact cleanup, owner invalidation, and effect-private refs. Therefore the default expected result is no `ResourceIR`.
|
|
935
|
+
|
|
936
|
+
### Session 04A: Lifecycle Matrix
|
|
937
|
+
|
|
938
|
+
Create a matrix for every existing resource fixture:
|
|
939
|
+
|
|
940
|
+
| Field | Required evidence |
|
|
941
|
+
|---|---|
|
|
942
|
+
| Acquire | Exact creation or subscription site |
|
|
943
|
+
| Dependencies | State/prop inputs causing replacement |
|
|
944
|
+
| Owner | Document, layout, route, conditional, or keyed owner |
|
|
945
|
+
| Invalidation | When setter/ref authority ends |
|
|
946
|
+
| Cleanup | Exact close, terminate, cancel, disconnect, remove, or destroy operation |
|
|
947
|
+
| Late completion | Behavior after invalidation |
|
|
948
|
+
| BFCache | Persisted pagehide/pageshow behavior where relevant |
|
|
949
|
+
| Static exclusion | Static sibling and package/chunk absence |
|
|
950
|
+
|
|
951
|
+
**Result:** complete on 2026-08-19. The full matrix is recorded in [`0.9-resource-lifecycle.md`](./0.9-resource-lifecycle.md).
|
|
952
|
+
|
|
953
|
+
- Worker, WebSocket, async terminal, timers, animation frames, observer/canvas, document listeners, media-query subscriptions, navigation layout resources, and package-owned effect modules were inventoried against acquire, dependencies, owner, invalidation, cleanup, late completion, BFCache, and static exclusion.
|
|
954
|
+
- Every represented resource remains private to one effect invocation or an existing route/layout/conditional owner. No fixture proves handler/effect sharing, independent subscribers, reconnect state shared across owners, or ownership outside the acquiring effect.
|
|
955
|
+
- Strong required-Chrome evidence exists for Workers, timers, animation frames, canvas/observer, listeners, media queries, route/layout navigation, stale writes, and repeated disposal.
|
|
956
|
+
- WebSocket replacement is executable only with a Node fake. Terminal acquisition/BFCache behavior and package-effect cleanup remain build-only. No maintained journey proves genuine browser BFCache restoration.
|
|
957
|
+
- The gaps map directly to Session 04B. Session 04A changes documentation only and adds zero semantic primitives, IR kinds, passes, runtime concepts, browser files, or bytes.
|
|
958
|
+
|
|
959
|
+
### Session 04B: Close Existing Behavioral Gaps
|
|
960
|
+
|
|
961
|
+
Prioritize tests, not new semantics:
|
|
962
|
+
|
|
963
|
+
1. Add executable terminal async acquisition and BFCache checks if the fixture can run deterministically.
|
|
964
|
+
2. Add a browser WebSocket ownership journey using a deterministic fake transport where appropriate.
|
|
965
|
+
3. Combine dependency replacement, navigation owner release, and late completion in one fixture.
|
|
966
|
+
4. Verify route-owned package resource cleanup and package exclusion.
|
|
967
|
+
5. Record raw/gzip capability bytes.
|
|
968
|
+
|
|
969
|
+
**Result:** complete on 2026-08-19.
|
|
970
|
+
|
|
971
|
+
- The terminal fixture now has two deterministic required-Chrome scenarios. One proves accepted async acquisition, persisted hide/show resume, exact discard cleanup, listener removal, and idempotent disposal. The other resolves acquisition after disposal and proves the late handle closes once without publishing ready state.
|
|
972
|
+
- The WebSocket fixture now uses an enhanced-navigation layout. One required-Chrome journey combines `general -> support` dependency replacement, exact listener removal/close, stale callback rejection, route release, retained layout identity, fresh back-navigation ownership, and idempotent document disposal.
|
|
973
|
+
- The package effect's setup and cleanup now execute in Chrome. The static sibling remains script- and package-free. The fixture still creates no package handle, so actual package-created resource cleanup remains evidence-blocked rather than simulated.
|
|
974
|
+
- Aggregate JavaScript graphs are: terminal 2,634 raw / 1,495 gzip bytes; WebSocket 15,872 / 7,163 bytes; package effect 3,562,795 / 1,025,300 bytes. No dedicated resource runtime or shared browser bytes were added.
|
|
975
|
+
- Production compiler, ModuleIR, RouteIR, runtime concepts, and accepted source syntax are unchanged. The changes are fixture-local behavior and browser evidence only.
|
|
976
|
+
|
|
977
|
+
### Session 04C: Common Lifecycle Proof Review
|
|
978
|
+
|
|
979
|
+
Inventory duplicated recognition for:
|
|
980
|
+
|
|
981
|
+
- add/remove listener pairs;
|
|
982
|
+
- schedule/cancel pairs;
|
|
983
|
+
- observe/disconnect pairs;
|
|
984
|
+
- create/destroy or close pairs;
|
|
985
|
+
- async generation invalidation;
|
|
986
|
+
- private mutable handle ownership.
|
|
987
|
+
|
|
988
|
+
Only extract a shared source-local proof helper when at least two existing passes perform the same lexical ownership check and the extraction reduces code without weakening diagnostics.
|
|
989
|
+
|
|
990
|
+
A private analysis result may describe acquire/cleanup correspondence. It does not become public IR or browser runtime state unless required by independently proven semantics.
|
|
991
|
+
|
|
992
|
+
**Result:** complete on 2026-08-19. The only exact duplicate was an inclusive AST ancestry predicate in effect-private refs, effect resource validation, media-query normalization, and command-helper validation. One `isNodeWithin()` helper replaces all four copies, reducing the five changed compiler files by 12 net lines while preserving every source-specific diagnostic. Listener, timer, frame, observer, handle, and generation recognizers remain focused because their source graphs and proof obligations differ.
|
|
993
|
+
|
|
994
|
+
### Session 04D: Qualifying Cross-Owner Fixture Decision
|
|
995
|
+
|
|
996
|
+
`ResourceIR` review requires at least three unrelated real fixtures whose lifetimes cannot fit effect-private ownership. Qualifying pressure may include:
|
|
997
|
+
|
|
998
|
+
- one layout transport with independently mounted subscribers;
|
|
999
|
+
- intentional handler and effect sharing of one handle;
|
|
1000
|
+
- reconnect/replay state shared across route owners;
|
|
1001
|
+
- one resource whose owner differs from the effect invocation that acquires it.
|
|
1002
|
+
|
|
1003
|
+
Non-qualifying pressure includes:
|
|
1004
|
+
|
|
1005
|
+
- a private SDK handle;
|
|
1006
|
+
- one WebSocket in one effect;
|
|
1007
|
+
- one observer with cleanup;
|
|
1008
|
+
- one timer or animation frame;
|
|
1009
|
+
- library-specific constructor syntax;
|
|
1010
|
+
- a desire to expose a public resource API.
|
|
1011
|
+
|
|
1012
|
+
**Result:** complete. Zero maintained fixtures qualify. The navigation layout transport and route chart subscription are the closest case, but each lifetime decomposes cleanly into one layout `EffectIR` and one route `EffectIR` with independent cleanup. Surveyed Mattermost/Twenty transport pressure remains external research rather than a reduced failing fixture. `ResourceIR` review is not authorized.
|
|
1013
|
+
|
|
1014
|
+
### Session 04E: Decision Record
|
|
1015
|
+
|
|
1016
|
+
Close the item with one of two outcomes.
|
|
1017
|
+
|
|
1018
|
+
**Expected outcome A:** Existing EffectIR is sufficient. Record improved lifecycle coverage, any deleted duplication, zero runtime concepts, and no ResourceIR.
|
|
1019
|
+
|
|
1020
|
+
**Exceptional outcome B:** Architecture review approves a narrow resource record after three qualifying fixtures. Record why EffectIR cannot represent ownership, why normalization cannot solve it, exact fields, codegen consumers, browser-byte impact, and rejected generic-runtime alternatives.
|
|
1021
|
+
|
|
1022
|
+
**Result:** complete with expected outcome A. Existing `EffectIR`, invocation-private closures, and document/layout/route/conditional/keyed ownership represent every maintained fixture. Sessions 04A-04D add browser evidence and remove 12 lines of duplicate lexical proof, with zero semantic primitives, ModuleIR kinds, passes, runtime concepts, public APIs, or browser bytes.
|
|
1023
|
+
|
|
1024
|
+
```text
|
|
1025
|
+
Semantic primitives added: 0
|
|
1026
|
+
ModuleIR record kinds added/removed: 0 / 0
|
|
1027
|
+
Core passes added/removed: 0 / 0
|
|
1028
|
+
Ordered normalization entries: 0 / 0
|
|
1029
|
+
Runtime concepts added: 0
|
|
1030
|
+
Production compiler LOC delta: -12
|
|
1031
|
+
Core semantic LOC delta for item 04: -3 (5,166 -> 5,163)
|
|
1032
|
+
Core semantic LOC delta from 0.8.62: +202 (4,961 -> 5,163)
|
|
1033
|
+
Browser runtime byte delta: 0 B
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
- `npm run check`, 241/241 Node tests, 241/241 required-Chrome tests on Chrome 142.0.7444.175, and package smoke pass on Node 24.14.0.
|
|
1037
|
+
- The maintained Worker graph remains 907 raw / 477 gzip bytes and the window graph remains 13,786 / 5,931 bytes. One warm-up and seven final-candidate builds measured `[686.6,606.6,707.7,615.3,512.8,504.2,536.7]` with median 606.6 ms; this same-target diagnostic makes no comparative timing claim.
|
|
1038
|
+
- The cumulative +202 core semantic LOC remains debt for Work Item 0.9.0-06; resource closure reduces that debt by three core-file lines and does not waive the final baseline gate.
|
|
1039
|
+
|
|
1040
|
+
## Work Item 0.9.0-05: Strengthen Component Ownership And Dependencies
|
|
1041
|
+
|
|
1042
|
+
### Objective
|
|
1043
|
+
|
|
1044
|
+
Allow ordinary component boundaries to survive authoring while object-property dependencies, state operations, refs, effects, and repeated ownership remain compile-time facts.
|
|
1045
|
+
|
|
1046
|
+
### Authorization Gate
|
|
1047
|
+
|
|
1048
|
+
- 0.9.0-04 is closed.
|
|
1049
|
+
- A real application fixture currently requires component flattening or artificial primitive-state decomposition.
|
|
1050
|
+
- The unsupported source uses ordinary React component, prop, and hook patterns.
|
|
1051
|
+
- Existing direct prop and specialization rules cannot represent it safely.
|
|
1052
|
+
|
|
1053
|
+
### Required Authorizing Fixture
|
|
1054
|
+
|
|
1055
|
+
The preferred fixture shape is:
|
|
1056
|
+
|
|
1057
|
+
```text
|
|
1058
|
+
Parent object state
|
|
1059
|
+
-> immutable object prop
|
|
1060
|
+
-> Child A reads field A in text/attribute
|
|
1061
|
+
-> Child B reads field B in an effect
|
|
1062
|
+
-> Child C reads collection field C in a keyed list
|
|
1063
|
+
```
|
|
1064
|
+
|
|
1065
|
+
The browser journey must replace the parent object so one field changes while another remains equal. Only proven consumers update or rerun.
|
|
1066
|
+
|
|
1067
|
+
### Session 05A: Fixture And Ownership Baseline
|
|
1068
|
+
|
|
1069
|
+
1. Pin real upstream source.
|
|
1070
|
+
2. Preserve component boundaries in the reduced fixture.
|
|
1071
|
+
3. Add repeated component instances.
|
|
1072
|
+
4. Add one conditional instance.
|
|
1073
|
+
5. Add effect cleanup and remount checks.
|
|
1074
|
+
6. Add DOM identity checks.
|
|
1075
|
+
7. Add a static sibling.
|
|
1076
|
+
8. Record current failure and any flattening workaround.
|
|
1077
|
+
|
|
1078
|
+
**Result:** complete on 2026-08-19.
|
|
1079
|
+
|
|
1080
|
+
- [`object-prop-workledger-conversation`](../../test/fixtures/object-prop-workledger-conversation) pins MIT-licensed WorkLedger revision `3d8bf2130ec1d7698bff07fb00726b2bb94d20d4`, the complete archive hash, source hashes, and license hash.
|
|
1081
|
+
- The upstream state is owned by `useAIConversation()`, passed intact from `AISidebar` to `AIConversation`, selected as `[conversation.messages, streamContent]`, and mapped into keyed message rows. The reduction removes the custom hook, AI providers, storage, streaming, unrelated callbacks, and styling while preserving that semantic path.
|
|
1082
|
+
- Two retained and one conditional `ConversationView` invocation establish repeated ownership. The fixture includes selected-property effect cleanup counters, keyed rows, same-collection and replaced-collection updates, DOM identity targets, and a static sibling.
|
|
1083
|
+
- The first current failure is `src/ConversationView.tsx:11:3 useEffect() item-property dependencies are only supported in direct keyed row components`. Flattening the child or decomposing `conversation` into `label` and `messages` props avoids it but violates the authorization goal.
|
|
1084
|
+
- The post-05B browser contract is pinned in the fixture README: retained collection identity suppresses unrelated effect/list work, collection replacement reruns each owned effect once while preserving retained keys, conditional release/remount is exact, final disposal is idempotent, and `/static` remains zero JavaScript.
|
|
1085
|
+
- Session 05A adds no semantic primitive, IR kind, compiler pass, runtime concept, public API, or browser bytes. The fixture remains an expected build failure until Session 05B defines the property dependency contract.
|
|
1086
|
+
- `npm run check`, 242/242 Node tests, 242/242 required-Chrome tests on Chrome 142.0.7444.175, package smoke, and `git diff --check` pass. No benchmark or artifact delta is claimed because production compiler and runtime files are unchanged and the authorizing route intentionally emits no output yet.
|
|
1087
|
+
|
|
1088
|
+
### Session 05B: Property Dependency Contract
|
|
1089
|
+
|
|
1090
|
+
The semantic link must identify:
|
|
1091
|
+
|
|
1092
|
+
```text
|
|
1093
|
+
source SignalIR
|
|
1094
|
+
static property path
|
|
1095
|
+
component specialization owner
|
|
1096
|
+
consumer kind
|
|
1097
|
+
selected equality behavior
|
|
1098
|
+
conditional/keyed release owner when present
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
Do not create field-level mutable state slots solely to make analysis easier. One application object remains one logical state value unless authored otherwise.
|
|
1102
|
+
|
|
1103
|
+
**Result:** complete on 2026-08-19. [`0.9-component-property-contract.md`](./0.9-component-property-contract.md) defines one specialization-owned property link containing the existing parent SignalIR slot, one non-empty safe static path, `binding`/`effect`/`list` consumers, and `Object.is` selected equality. Bindings reuse `BindingIR`, effects reuse expression `DerivedIR`, and lists reuse binding-backed `KeyedBlockIR` plus the existing compiler-owned array anchor. No field signal, ModuleIR kind, runtime concept, or browser component owner is authorized.
|
|
1104
|
+
|
|
1105
|
+
### Session 05C: ComponentAnalysis Producer
|
|
1106
|
+
|
|
1107
|
+
Expected narrow owner:
|
|
1108
|
+
|
|
1109
|
+
```text
|
|
1110
|
+
framework/compiler/analysis/component-analysis.mjs
|
|
1111
|
+
framework/compiler/source-compiler.mjs specialization path
|
|
1112
|
+
framework/compiler/ir/module-ir.mjs validation
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
Required properties:
|
|
1116
|
+
|
|
1117
|
+
- JSON-safe references after source-local analysis;
|
|
1118
|
+
- stable OwnerRef and SignalIR links;
|
|
1119
|
+
- no retained component instance;
|
|
1120
|
+
- repeated calls own independent child state/effects;
|
|
1121
|
+
- direct parent state remains shared where semantically authored;
|
|
1122
|
+
- static property paths only;
|
|
1123
|
+
- no arbitrary object mutation tracking.
|
|
1124
|
+
|
|
1125
|
+
**Result:** complete. Each direct object-state prop specialization records JSON-safe `{ signal, path, consumers, equality }` property links under its existing prop entry. The signal is the already-authoritative parent SignalIR, the path is one safe direct segment, and the containing specialization remains the owner. ModuleIR validation checks every signal and boundary after JSON round-tripping. Repeated calls receive distinct specialization owners while sharing the one authored parent state.
|
|
1126
|
+
|
|
1127
|
+
### Session 05D: Binding And Effect Consumers
|
|
1128
|
+
|
|
1129
|
+
Reuse existing Derived and effect dependency semantics from 0.9.0-02.
|
|
1130
|
+
|
|
1131
|
+
Required behavior:
|
|
1132
|
+
|
|
1133
|
+
- property equality suppresses unrelated effect reruns;
|
|
1134
|
+
- direct DOM binding updates target only known nodes;
|
|
1135
|
+
- conditional removal releases state, refs, handlers, and effects;
|
|
1136
|
+
- remount recreates child-owned state from the authored initializer;
|
|
1137
|
+
- parent object identity changes do not force generic component rerendering.
|
|
1138
|
+
|
|
1139
|
+
**Result:** complete. Direct scalar fields reuse existing binding evaluators. Direct array fields become binding-backed keyed collections with existing compiler-owned anchors. Selected array effects reuse expression DerivedIR and `Object.is`, extending only the existing expression value guard from primitive to primitive-or-array. A compiler-only null-returning effect helper preserves each component invocation boundary while the authored component and helper disappear from browser ESM. Required Chrome proves same-array replacement updates labels without effect reruns, new-array replacement performs one cleanup/setup per owner, retained keys preserve DOM identity, conditional release/remount is exact, and final disposal is idempotent.
|
|
1140
|
+
|
|
1141
|
+
### Session 05E: Callback And Operation Boundaries
|
|
1142
|
+
|
|
1143
|
+
Do not remove the existing three-boundary callback limit speculatively. Extend only when the real fixture requires another direct forwarding boundary and ownership remains statically proven.
|
|
1144
|
+
|
|
1145
|
+
Keep rejected:
|
|
1146
|
+
|
|
1147
|
+
- callback aliases;
|
|
1148
|
+
- dynamic callback selection;
|
|
1149
|
+
- callback registries;
|
|
1150
|
+
- repeated calls in one handler where unsupported;
|
|
1151
|
+
- unproven spreads;
|
|
1152
|
+
- callback use outside supported event/effect roles;
|
|
1153
|
+
- a generic function serialization mechanism.
|
|
1154
|
+
|
|
1155
|
+
**Result:** complete with no change. The WorkLedger reduction owns updates in the parent and requires no callback forwarding extension. Existing three-boundary callback limits and diagnostics remain intact.
|
|
1156
|
+
|
|
1157
|
+
### Session 05F: Negative Boundary
|
|
1158
|
+
|
|
1159
|
+
Required negatives:
|
|
1160
|
+
|
|
1161
|
+
- dynamic property access;
|
|
1162
|
+
- object mutation;
|
|
1163
|
+
- opaque object spread;
|
|
1164
|
+
- property alias that loses ownership proof;
|
|
1165
|
+
- composed initializer outside the proven boundary;
|
|
1166
|
+
- callback alias or escape;
|
|
1167
|
+
- hookful child on an unproven dynamic path;
|
|
1168
|
+
- object ref forwarded to multiple roots;
|
|
1169
|
+
- fourth callback boundary unless separately authorized;
|
|
1170
|
+
- whole-object dependency where only property semantics are supported.
|
|
1171
|
+
|
|
1172
|
+
**Result:** complete. New focused fixtures reject dynamic selected paths, property aliases, and prop mutation. Existing dynamic component spreads, composed child initializers, callback escape/fourth-boundary cases, dynamic hook paths, repeated-root ref diagnostics, mixed whole-object/property dependency tests, and collection mutation diagnostics retain the remaining boundary. The positive trigger requires one direct parent state identifier and one direct `prop.field.map()` consumer, so object expressions and opaque call-site values do not acquire property links.
|
|
1173
|
+
|
|
1174
|
+
### Session 05G: Specialization Cache Decision
|
|
1175
|
+
|
|
1176
|
+
Do not add caching because repeated components exist. Add it only when a maintained fixture proves repeated semantic analysis is material.
|
|
1177
|
+
|
|
1178
|
+
Required cache proof:
|
|
1179
|
+
|
|
1180
|
+
- stable semantic input key;
|
|
1181
|
+
- no AST mutation sharing;
|
|
1182
|
+
- source dependency invalidation;
|
|
1183
|
+
- ownership IDs remain call-site specific;
|
|
1184
|
+
- output is byte-identical;
|
|
1185
|
+
- clean and incremental build improvement is material under the protocol.
|
|
1186
|
+
|
|
1187
|
+
**Result:** complete with no cache. Three repeated WorkLedger calls do not establish material analysis cost, and call-site-specific ownership IDs prevent an unmeasured AST-result cache from being free. Existing project/module caches remain unchanged.
|
|
1188
|
+
|
|
1189
|
+
**Work item result:** complete on 2026-08-19.
|
|
1190
|
+
|
|
1191
|
+
```text
|
|
1192
|
+
Semantic primitives added: 0
|
|
1193
|
+
ModuleIR record kinds added/removed: 0 / 0
|
|
1194
|
+
Core passes added/removed: 0 / 0
|
|
1195
|
+
Ordered normalization entries: 0 / 0
|
|
1196
|
+
Runtime concepts added: 0
|
|
1197
|
+
Browser component functions added: 0
|
|
1198
|
+
Positive / negative fixtures added: 1 / 3
|
|
1199
|
+
Browser runtime byte delta: 0 B
|
|
1200
|
+
Production compiler LOC delta: +133
|
|
1201
|
+
Core semantic LOC delta for item 05: +133 (5,163 -> 5,296)
|
|
1202
|
+
Core semantic LOC delta from 0.8.62: +335 (4,961 -> 5,296)
|
|
1203
|
+
```
|
|
1204
|
+
|
|
1205
|
+
- WorkLedger route graph: 11 JavaScript files, 37,302 raw / 14,083 aggregate gzip bytes; `/static` emits zero JavaScript.
|
|
1206
|
+
- Maintained Worker/effect graph remains 907 raw / 477 gzip bytes for Worker and 13,786 / 5,931 bytes for window output. One warm-up and seven same-target completion builds measured `[1162.6,1505.3,1140.8,938.0,758.9,753.8,717.3]`, median 938.0 ms; no timing comparison is claimed.
|
|
1207
|
+
- `npm run check`, 245/245 Node tests, 245/245 required-Chrome tests on Chrome 142.0.7444.175, package smoke, and `git diff --check` pass.
|
|
1208
|
+
- The +133 item delta and cumulative +335 core semantic LOC remain explicit debt for Work Item 0.9.0-06. The final baseline gate requires deletion or architecture review; this work item does not waive it.
|
|
1209
|
+
|
|
1210
|
+
## Work Item 0.9.0-06: Remove Duplication And Close Semantic Compression
|
|
1211
|
+
|
|
1212
|
+
### Objective
|
|
1213
|
+
|
|
1214
|
+
Delete syntax-specific analysis made redundant by 0.9 semantic authority, reduce or hold pass and LOC counts, and preserve diagnostic ownership.
|
|
1215
|
+
|
|
1216
|
+
### Candidate Duplication Inventory
|
|
1217
|
+
|
|
1218
|
+
Candidates are reviewed, not automatically removed:
|
|
1219
|
+
|
|
1220
|
+
| Candidate | Evidence required |
|
|
1221
|
+
|---|---|
|
|
1222
|
+
| Context versus shared-action branches | Both adapters already produce equivalent generic records |
|
|
1223
|
+
| Binding/imported calculation versus Derived identity | Consumers already use one canonical derived representation |
|
|
1224
|
+
| Listener pair validation | At least two passes use identical lexical ownership proof |
|
|
1225
|
+
| Animation cancellation validation | Duplicate proof can be removed without weakening specialized diagnostics |
|
|
1226
|
+
| Primitive/object/array initializer checks | One serializable initializer contract preserves authored limits |
|
|
1227
|
+
| Setter/reducer/state-backed specialization loops | One semantic operation edge preserves all negative boundaries |
|
|
1228
|
+
| Derived diagnostic string rewriting | Context-aware diagnostics can replace message mutation |
|
|
1229
|
+
| Route dependency denormalization | Direct references survive into route planning without changing RouteIR behavior |
|
|
1230
|
+
|
|
1231
|
+
### Session 06A: Candidate Ledger
|
|
1232
|
+
|
|
1233
|
+
For each candidate record:
|
|
1234
|
+
|
|
1235
|
+
```text
|
|
1236
|
+
Current producers:
|
|
1237
|
+
Current consumers:
|
|
1238
|
+
Duplicate semantic decision:
|
|
1239
|
+
Required source-specific diagnostic:
|
|
1240
|
+
Deletion enabled by completed work:
|
|
1241
|
+
Expected LOC/pass delta:
|
|
1242
|
+
Regression fixtures:
|
|
1243
|
+
```
|
|
1244
|
+
|
|
1245
|
+
Reject candidates that merely move code or hide pass count.
|
|
1246
|
+
|
|
1247
|
+
**Result:** complete on 2026-08-19. [`0.9-compression-ledger.md`](./0.9-compression-ledger.md) records all eight planned candidates plus the Work Item 05 component-helper duplication. Context/shared actions and resource proof are already compressed; listener, animation, broad specialization-loop, diagnostic-rewording, and route-denormalization candidates would only move code or weaken authority. Serializable initializer lookup remains a viable later deletion. The first selected candidate is the exact compiler-only component effect helper materialization duplicated by object-property and setter-callback specialization.
|
|
1248
|
+
|
|
1249
|
+
### Session 06B: One Deletion At A Time
|
|
1250
|
+
|
|
1251
|
+
Each deletion is independently reviewable and runs:
|
|
1252
|
+
|
|
1253
|
+
- focused positive tests;
|
|
1254
|
+
- focused negative tests;
|
|
1255
|
+
- `npm run check`;
|
|
1256
|
+
- `npm test`;
|
|
1257
|
+
- required Chrome tests;
|
|
1258
|
+
- output manifest comparison;
|
|
1259
|
+
- raw/gzip comparison;
|
|
1260
|
+
- affected benchmark.
|
|
1261
|
+
|
|
1262
|
+
Do not batch unrelated cleanup into one change.
|
|
1263
|
+
|
|
1264
|
+
**First deletion result:** complete. One `materializeComponentHelper()` replaces duplicated effect rewriting, authored-source retention, helper declaration registration, setter/state-owner map installation, and capability flags in `source-compiler.mjs`. Object-property specialization still prepends a null helper to retain visible list analysis; setter specialization still replaces its root with the state-owning helper. No diagnostic, accepted source, pass, IR, runtime, or browser output changes.
|
|
1265
|
+
|
|
1266
|
+
```text
|
|
1267
|
+
Core semantic LOC: 5,296 -> 5,271 (-25)
|
|
1268
|
+
Core semantic LOC from 0.8.62: +310 (4,961 -> 5,271)
|
|
1269
|
+
Production files changed: 1
|
|
1270
|
+
Browser runtime byte delta: 0 B
|
|
1271
|
+
```
|
|
1272
|
+
|
|
1273
|
+
- WorkLedger and array-prop effect-sync deploy digests and raw/gzip JavaScript are byte-identical before and after the deletion; exact values are in the compression ledger.
|
|
1274
|
+
- `npm run check`, all 245 Node tests, all 245 required-Chrome tests, and fresh-install package smoke pass. The maintained Worker/effect graph remains 907 raw / 477 gzip B for Worker and 13,786 raw / 5,931 gzip B for window output; seven same-target builds have a 444.7 ms median, with no comparative timing claim.
|
|
1275
|
+
|
|
1276
|
+
**Second deletion result:** complete. `directStateInitializer()` now performs the single direct serializable `useState()` declaration lookup used by parameterized debounce validation, setter-child array effect pairing, and specialized child state seeding. Primitive and array restrictions remain at their callers; two duplicate component-body scans are removed.
|
|
1277
|
+
|
|
1278
|
+
```text
|
|
1279
|
+
Core semantic LOC: 5,271 -> 5,264 (-7)
|
|
1280
|
+
Total Session 06B deletion: 5,296 -> 5,264 (-32)
|
|
1281
|
+
Core semantic LOC from 0.8.62: +303 (4,961 -> 5,264)
|
|
1282
|
+
Production files changed: 1
|
|
1283
|
+
Browser runtime byte delta: 0 B
|
|
1284
|
+
```
|
|
1285
|
+
|
|
1286
|
+
- Parameterized-debounce and array-prop effect-sync deploy trees are byte-identical against the preceding commit; exact digests and raw/gzip JavaScript are in the compression ledger.
|
|
1287
|
+
- `npm run check`, all 245 Node tests, all 245 required-Chrome tests, and package smoke pass. The maintained Worker/effect graph remains byte-identical; seven same-target builds have a 507.7 ms median, with no timing claim.
|
|
1288
|
+
- No remaining ledger candidate offers meaningful source deletion without moving source-specific proof, weakening ownership authority, or adding a diagnostic abstraction. Session 06B is complete.
|
|
1289
|
+
|
|
1290
|
+
### Session 06C: Diagnostic Audit
|
|
1291
|
+
|
|
1292
|
+
Verify every newly supported boundary reports:
|
|
1293
|
+
|
|
1294
|
+
- stable semantic reason;
|
|
1295
|
+
- authored file, line, and column;
|
|
1296
|
+
- supported neighboring forms;
|
|
1297
|
+
- safe migration direction;
|
|
1298
|
+
- no generated `.kudzu` path as the primary location;
|
|
1299
|
+
- no silent fallback.
|
|
1300
|
+
|
|
1301
|
+
**Result:** complete. Six object-property, setter-effect, and debounce invalid fixtures were built against the preceding commit and final candidate. Relative authored file, line, column, and message are identical after normalizing the checkout root; only expected internal stack-frame line numbers move. Every message retains its semantic reason and nearby safe form. No generated path is primary, no fallback exists, and no diagnostic abstraction was added. Exact messages are recorded in the compression ledger.
|
|
1302
|
+
|
|
1303
|
+
### Session 06D: Final Complexity Comparison
|
|
1304
|
+
|
|
1305
|
+
Repeat every 0.9.0-01 count using the same commands and file sets.
|
|
1306
|
+
|
|
1307
|
+
Required table:
|
|
1308
|
+
|
|
1309
|
+
| Metric | 0.8.62 baseline | 0.9 candidate | Delta | Explanation |
|
|
1310
|
+
|---|---:|---:|---:|---|
|
|
1311
|
+
| Semantic concepts | 10 | 10 | 0 | The existing kernel remains sufficient; Resource stays effect-owned. |
|
|
1312
|
+
| ModuleIR record kinds | 10 | 10 | 0 | Existing Signal, Derived, SharedAction, Effect, and ownership records are reused. |
|
|
1313
|
+
| Core semantic passes | 5 | 5 | 0 | Binding index, transformer, and three structural/projection boundaries remain distinct. |
|
|
1314
|
+
| Ordered normalization entries | 15 page / 14 imported | 15 page / 14 imported | 0 / 0 | No pass was added or hidden in the transformer. |
|
|
1315
|
+
| Core semantic LOC | 4,961 | 5,317 | +356 | Proven semantics add 335 lines, Session 06B removes 32, and measured Work Item 07 scaling paths add 53. |
|
|
1316
|
+
| Compatibility LOC | 1,342 | 1,333 | -9 | Shared ancestry proof removed duplicate adapter checks. |
|
|
1317
|
+
| Runtime concepts | 10 | 10 | 0 | Existing capability modules implement every accepted slice. |
|
|
1318
|
+
| Browser bytes by family | Recorded baseline | Unchanged for baseline families | 0 B | New fixtures select existing route-specific families only. |
|
|
1319
|
+
| Positive fixtures | 0 added | 4 added | +4 | Two Derived, one shared-action, and one object-property fixture. |
|
|
1320
|
+
| Negative fixtures | 0 added | 7 added | +7 | Four shared-action/store and three object-property boundaries. |
|
|
1321
|
+
|
|
1322
|
+
If core semantic LOC or pass count increases, release requires an explicit architecture review documenting why the increase is necessary, what duplication was removed, and why the result remains bounded.
|
|
1323
|
+
|
|
1324
|
+
**Architecture review:** approved for the current 0.9 candidate. The +356 core lines implement three evidence-backed closures plus 53 lines of measured Work Item 07 import-free graph, used-import, and async compilation paths. Session 06B removes 32 duplicate lines after the semantic seams become visible. The increase remains bounded because it adds zero concepts, record kinds, passes, normalization entries, runtime concepts, or public APIs; every new boundary is covered by real positive and fail-closed negative fixtures. The candidate ledger rejects consolidations that merely move code or erase source-specific proof.
|
|
1325
|
+
|
|
1326
|
+
The maintained public storefront scaling gate passes at 100, 1,000, and 10,000 generated products against preceding commit `bb7fdc5`. All three paired baseline/candidate manifests and byte counts are identical. Seven alternating clean-build samples per target overlap, so no timing change is claimed; medians, output sizes, and raw samples are recorded in `PERFORMANCE.md` and the compression ledger.
|
|
1327
|
+
|
|
1328
|
+
## Work Item 0.9.0-07: Final Cross-Framework Proof
|
|
1329
|
+
|
|
1330
|
+
**Status:** complete. Local benchmark source remains ignored by project policy. Native C1 disclosure and the C2/C5 stateful, Worker, navigation, ownership, static-exclusion, resilience, and uniform metric matrices pass. The final 21-profile C2 row filter is faster than Vue, while row restore and search restore are within 3.5% and 1.8% of their nearest comparators. Flattened generated commerce input plus one-shot plan streaming, release, and staged HTML spooling makes Kudzu 2.5%/5.5% faster than Astro cold/warm at 10,000 products and cuts peak RSS 71.0% to 542,484 KiB versus Astro's 612,412 KiB. Model-driven AI delivery is a 1.0 gate. See [`0.9-final-proof-audit.md`](./0.9-final-proof-audit.md).
|
|
1331
|
+
|
|
1332
|
+
### Objective
|
|
1333
|
+
|
|
1334
|
+
Run the complete matched suite and prove the browser, interaction, resilience, and build advantages required for `0.9.0`.
|
|
1335
|
+
|
|
1336
|
+
### Comparison Set
|
|
1337
|
+
|
|
1338
|
+
Minimum applicable set:
|
|
1339
|
+
|
|
1340
|
+
| Category | Required comparator |
|
|
1341
|
+
|---|---|
|
|
1342
|
+
| Migration baseline | React + Vite |
|
|
1343
|
+
| Client framework | Vue |
|
|
1344
|
+
| Compiler framework | Svelte |
|
|
1345
|
+
| HTML-first/static | Astro |
|
|
1346
|
+
| Production static routing | Best applicable of Next.js, Nuxt, SvelteKit, React Router, or TanStack |
|
|
1347
|
+
|
|
1348
|
+
Framework versions are pinned from lockfiles. Version changes after baseline require rerunning all affected targets.
|
|
1349
|
+
|
|
1350
|
+
### Required Application Matrix
|
|
1351
|
+
|
|
1352
|
+
| Application | Required characteristics |
|
|
1353
|
+
|---|---|
|
|
1354
|
+
| Content application | Multiple routes, links, metadata, CSS, assets, progressive enhancement, at least one small interaction |
|
|
1355
|
+
| Stateful application | Local state, derived state, shared state, forms, keyed collections, effects, cleanup, navigation |
|
|
1356
|
+
| Commerce scale application | 100, 1,000, and 10,000 generated products/routes with deterministic data |
|
|
1357
|
+
| Resource scenario | Worker, WebSocket, observer, canvas, or SDK-like lifetime with exact cleanup |
|
|
1358
|
+
|
|
1359
|
+
One application may satisfy multiple rows, but content and stateful proof cannot both be replaced by one microbenchmark.
|
|
1360
|
+
|
|
1361
|
+
### Behavior Acceptance Before Timing
|
|
1362
|
+
|
|
1363
|
+
Every variant must pass:
|
|
1364
|
+
|
|
1365
|
+
- complete initial content;
|
|
1366
|
+
- route and data parity;
|
|
1367
|
+
- form and validation behavior;
|
|
1368
|
+
- keyboard journeys;
|
|
1369
|
+
- focus behavior;
|
|
1370
|
+
- accessible names, roles, states, and errors;
|
|
1371
|
+
- keyed identity where the application requires it;
|
|
1372
|
+
- effect/resource cleanup;
|
|
1373
|
+
- back/forward and direct-entry behavior;
|
|
1374
|
+
- deterministic data and output expectations;
|
|
1375
|
+
- no uncaught browser errors.
|
|
1376
|
+
|
|
1377
|
+
Failed acceptance means no timing sample is counted.
|
|
1378
|
+
|
|
1379
|
+
### Artifact Measurements
|
|
1380
|
+
|
|
1381
|
+
Record per route and complete session:
|
|
1382
|
+
|
|
1383
|
+
- HTML raw/gzip;
|
|
1384
|
+
- CSS raw/gzip;
|
|
1385
|
+
- JavaScript raw/gzip;
|
|
1386
|
+
- actual browser-transferred JavaScript;
|
|
1387
|
+
- unique session JavaScript;
|
|
1388
|
+
- preload/module graph;
|
|
1389
|
+
- route count;
|
|
1390
|
+
- output file count;
|
|
1391
|
+
- total output size;
|
|
1392
|
+
- static-route JavaScript;
|
|
1393
|
+
- hydration markers or runtime bootstrap where applicable.
|
|
1394
|
+
|
|
1395
|
+
### Browser Measurements
|
|
1396
|
+
|
|
1397
|
+
Record:
|
|
1398
|
+
|
|
1399
|
+
- first content visibility;
|
|
1400
|
+
- content readiness;
|
|
1401
|
+
- action readiness;
|
|
1402
|
+
- event-to-next-paint for representative actions;
|
|
1403
|
+
- navigation content and action readiness;
|
|
1404
|
+
- impatient-click loss from early interaction attempts;
|
|
1405
|
+
- main-thread script parse/execute cost;
|
|
1406
|
+
- heap after load;
|
|
1407
|
+
- heap after complete journey;
|
|
1408
|
+
- heap after repeated navigation/disposal;
|
|
1409
|
+
- browser exceptions and failed requests.
|
|
1410
|
+
|
|
1411
|
+
### Failure-Resilience Matrix
|
|
1412
|
+
|
|
1413
|
+
| Condition | Required expectation |
|
|
1414
|
+
|---|---|
|
|
1415
|
+
| JavaScript disabled | Native links/forms/content remain usable where baseline behavior permits |
|
|
1416
|
+
| JavaScript delayed two seconds | Complete HTML remains visible; early native behavior remains safe |
|
|
1417
|
+
| One capability chunk missing | Unrelated document behavior remains intact; failure is observable |
|
|
1418
|
+
| Slow 4G | No hidden hydration blank or unusable shell |
|
|
1419
|
+
| CPU throttled | Initial HTML remains available; interaction measurements are recorded |
|
|
1420
|
+
| Navigation fetch failure | Native recovery or explicit failure path remains available |
|
|
1421
|
+
|
|
1422
|
+
### Build-Scaling Protocol
|
|
1423
|
+
|
|
1424
|
+
Run 100, 1,000, and 10,000 deterministic products/routes.
|
|
1425
|
+
|
|
1426
|
+
Required outputs:
|
|
1427
|
+
|
|
1428
|
+
- actual emitted route count;
|
|
1429
|
+
- one warm-up;
|
|
1430
|
+
- at least seven rotating samples per target;
|
|
1431
|
+
- cold and warm build where supported;
|
|
1432
|
+
- raw timing arrays;
|
|
1433
|
+
- median, min, max, and paired differences where applicable;
|
|
1434
|
+
- peak RSS;
|
|
1435
|
+
- milliseconds per emitted route;
|
|
1436
|
+
- files and output bytes;
|
|
1437
|
+
- output digest or deterministic manifest;
|
|
1438
|
+
- acceptance result before timing;
|
|
1439
|
+
- framework and environment versions.
|
|
1440
|
+
|
|
1441
|
+
Do not use three sequential samples for the release claim. Do not divide by requested product count when emitted route counts differ.
|
|
1442
|
+
|
|
1443
|
+
### Tie And Loss Rules
|
|
1444
|
+
|
|
1445
|
+
Deterministic byte metrics have no statistical tie: fewer bytes wins.
|
|
1446
|
+
|
|
1447
|
+
Timing ties require:
|
|
1448
|
+
|
|
1449
|
+
- interleaved or rotating target order;
|
|
1450
|
+
- at least seven samples;
|
|
1451
|
+
- at least twenty-one samples when ranges overlap or conclusions remain unstable;
|
|
1452
|
+
- no established median loss greater than the 5% materiality threshold;
|
|
1453
|
+
- a reported uncertainty method and raw samples;
|
|
1454
|
+
- no wording stronger than the evidence supports.
|
|
1455
|
+
|
|
1456
|
+
A primary metric loss cannot be hidden in a weighted aggregate score.
|
|
1457
|
+
|
|
1458
|
+
### 0.9 Competitive Pass Conditions
|
|
1459
|
+
|
|
1460
|
+
Kudzu must show:
|
|
1461
|
+
|
|
1462
|
+
- least initial JavaScript among applicable variants, accepting a tie only at the 0 B floor;
|
|
1463
|
+
- least total-session JavaScript among applicable variants, accepting a tie only at the 0 B floor;
|
|
1464
|
+
- no hydration;
|
|
1465
|
+
- fastest or statistically tied-fastest interaction readiness;
|
|
1466
|
+
- fastest or statistically tied-fastest representative event latency;
|
|
1467
|
+
- fastest or statistically tied-fastest matched navigation readiness;
|
|
1468
|
+
- no material CPU or heap loss;
|
|
1469
|
+
- stronger disabled/delayed/missing-JS behavior;
|
|
1470
|
+
- no material build-scaling weakness at 100, 1,000, or 10,000 routes;
|
|
1471
|
+
- complete behavior and accessibility parity.
|
|
1472
|
+
|
|
1473
|
+
Any failure blocks release until fixed, invalidated by a corrected benchmark, or explicitly removed from the release claim with product approval.
|
|
1474
|
+
|
|
1475
|
+
## Continuous Regression Matrix
|
|
1476
|
+
|
|
1477
|
+
Every semantic work item selects the smallest relevant matrix, while the release candidate runs all rows.
|
|
1478
|
+
|
|
1479
|
+
| Area | Focused | Full Node | Chrome | Output | Bytes | Build | Browser perf | Cross-framework |
|
|
1480
|
+
|---|---|---|---|---|---|---|---|---|
|
|
1481
|
+
| Baseline docs | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1482
|
+
| Derived | Yes | Yes | Yes | Yes | Yes | Affected | Affected | Final |
|
|
1483
|
+
| Shared state | Yes | Yes | Yes | Yes | Yes | Affected | Affected | Final |
|
|
1484
|
+
| Resource | Yes | Yes | Yes | Yes | Yes | Affected | Required | Final |
|
|
1485
|
+
| Component | Yes | Yes | Yes | Yes | Yes | Affected | Required | Final |
|
|
1486
|
+
| Duplication deletion | Yes | Yes | Affected | Yes | Yes | Affected | Affected | Final |
|
|
1487
|
+
| Release candidate | All | All | All | All | All | All | All | All |
|
|
1488
|
+
|
|
1489
|
+
## Fixture Evidence Standard
|
|
1490
|
+
|
|
1491
|
+
Every new real-derived fixture records:
|
|
1492
|
+
|
|
1493
|
+
```text
|
|
1494
|
+
Fixture name:
|
|
1495
|
+
Upstream project:
|
|
1496
|
+
Upstream URL:
|
|
1497
|
+
Upstream commit/tag:
|
|
1498
|
+
License:
|
|
1499
|
+
Acquisition hash:
|
|
1500
|
+
Original files:
|
|
1501
|
+
Reduced files:
|
|
1502
|
+
Behavior retained:
|
|
1503
|
+
Behavior deliberately excluded:
|
|
1504
|
+
First Kudzu failure:
|
|
1505
|
+
Semantic concept exercised:
|
|
1506
|
+
Static sibling:
|
|
1507
|
+
Positive browser journey:
|
|
1508
|
+
Negative neighboring forms:
|
|
1509
|
+
Artifact and byte result:
|
|
1510
|
+
Benchmark result:
|
|
1511
|
+
```
|
|
1512
|
+
|
|
1513
|
+
Fixture count does not authorize a primitive. The semantic relationship between fixtures must be documented.
|
|
1514
|
+
|
|
1515
|
+
## Diagnostic Standard
|
|
1516
|
+
|
|
1517
|
+
0.9 diagnostics remain deterministic and actionable even before the structured 0.11 CLI work.
|
|
1518
|
+
|
|
1519
|
+
Every new diagnostic answers:
|
|
1520
|
+
|
|
1521
|
+
```text
|
|
1522
|
+
What source form failed?
|
|
1523
|
+
Which semantic proof is missing?
|
|
1524
|
+
Which forms are supported?
|
|
1525
|
+
What safe rewrite is possible?
|
|
1526
|
+
Where is the authored source location?
|
|
1527
|
+
```
|
|
1528
|
+
|
|
1529
|
+
Preferred message shape:
|
|
1530
|
+
|
|
1531
|
+
```text
|
|
1532
|
+
Cannot prove <semantic ownership or dependency>.
|
|
1533
|
+
|
|
1534
|
+
<Specific authored construct> uses <unsupported behavior>.
|
|
1535
|
+
|
|
1536
|
+
Supported forms:
|
|
1537
|
+
- <form>
|
|
1538
|
+
- <form>
|
|
1539
|
+
|
|
1540
|
+
Possible migration:
|
|
1541
|
+
- <deterministic rewrite>
|
|
1542
|
+
```
|
|
1543
|
+
|
|
1544
|
+
Do not expose generated paths, internal slots, or transient AST terminology as the primary explanation.
|
|
1545
|
+
|
|
1546
|
+
## Per-Session Workflow
|
|
1547
|
+
|
|
1548
|
+
### Start
|
|
1549
|
+
|
|
1550
|
+
1. Read the required documents.
|
|
1551
|
+
2. Inspect `package.json` for the actual version.
|
|
1552
|
+
3. Inspect `git status` and preserve unrelated changes.
|
|
1553
|
+
4. Find the first incomplete work item and session packet.
|
|
1554
|
+
5. Verify dependencies and fixture evidence.
|
|
1555
|
+
6. Reproduce the current failure or baseline.
|
|
1556
|
+
7. Write the per-slice contract before editing production code.
|
|
1557
|
+
|
|
1558
|
+
### Implement
|
|
1559
|
+
|
|
1560
|
+
1. Choose the first applicable rung: native, existing semantics, normalization, adapter, architecture review.
|
|
1561
|
+
2. Add the smallest failing positive or negative check.
|
|
1562
|
+
3. Change the narrowest producer/consumer boundary.
|
|
1563
|
+
4. Preserve source-specific diagnostics at the compatibility boundary.
|
|
1564
|
+
5. Preserve JSON-safe IR and fail-closed validation.
|
|
1565
|
+
6. Avoid unrelated cleanup.
|
|
1566
|
+
7. Compare output before adding further scope.
|
|
1567
|
+
|
|
1568
|
+
### Verify
|
|
1569
|
+
|
|
1570
|
+
1. Run focused tests.
|
|
1571
|
+
2. Run `npm run check`.
|
|
1572
|
+
3. Run `npm test`.
|
|
1573
|
+
4. Run required Chrome tests.
|
|
1574
|
+
5. Run package smoke when package output changes.
|
|
1575
|
+
6. Compare representative ModuleIR and RouteIR.
|
|
1576
|
+
7. Compare emitted files and hashes.
|
|
1577
|
+
8. Record raw/gzip browser bytes.
|
|
1578
|
+
9. Run affected build/browser benchmarks.
|
|
1579
|
+
10. Confirm static siblings remain zero JavaScript.
|
|
1580
|
+
|
|
1581
|
+
### Close
|
|
1582
|
+
|
|
1583
|
+
1. Fill the complexity report.
|
|
1584
|
+
2. Record commands, environment, raw data, and limitations.
|
|
1585
|
+
3. Update the active work status.
|
|
1586
|
+
4. Update current architecture only when ownership actually moved.
|
|
1587
|
+
5. Update public support docs only for completed support.
|
|
1588
|
+
6. Do not update release notes or package version before release.
|
|
1589
|
+
7. Name the next exact session packet.
|
|
1590
|
+
|
|
1591
|
+
## Per-Slice Completion Report Template
|
|
1592
|
+
|
|
1593
|
+
```text
|
|
1594
|
+
Work item:
|
|
1595
|
+
Authorizing fixture:
|
|
1596
|
+
Upstream revision:
|
|
1597
|
+
First failing source location:
|
|
1598
|
+
|
|
1599
|
+
Semantic reduction:
|
|
1600
|
+
Producer changed:
|
|
1601
|
+
Consumers changed:
|
|
1602
|
+
Ownership boundary:
|
|
1603
|
+
Nearby rejected forms:
|
|
1604
|
+
|
|
1605
|
+
Semantic primitives added:
|
|
1606
|
+
ModuleIR records added/removed:
|
|
1607
|
+
Core passes added/removed:
|
|
1608
|
+
Ordered normalization entries added/removed:
|
|
1609
|
+
Core semantic LOC delta:
|
|
1610
|
+
Compatibility LOC delta:
|
|
1611
|
+
Runtime concepts added:
|
|
1612
|
+
|
|
1613
|
+
Browser files changed:
|
|
1614
|
+
Browser raw byte delta:
|
|
1615
|
+
Browser gzip byte delta:
|
|
1616
|
+
Static sibling JavaScript:
|
|
1617
|
+
|
|
1618
|
+
Positive fixtures added:
|
|
1619
|
+
Negative fixtures added:
|
|
1620
|
+
Focused tests:
|
|
1621
|
+
Full tests:
|
|
1622
|
+
Chrome journeys:
|
|
1623
|
+
Package smoke:
|
|
1624
|
+
|
|
1625
|
+
Build benchmark:
|
|
1626
|
+
Browser benchmark:
|
|
1627
|
+
Cross-framework impact:
|
|
1628
|
+
Known limitations:
|
|
1629
|
+
Next work item:
|
|
1630
|
+
```
|
|
1631
|
+
|
|
1632
|
+
## Architecture Review Triggers
|
|
1633
|
+
|
|
1634
|
+
Stop implementation and open an architecture review when any condition is true:
|
|
1635
|
+
|
|
1636
|
+
- one feature changes three or more unrelated core compiler subsystems;
|
|
1637
|
+
- a new semantic primitive is proposed;
|
|
1638
|
+
- a new ModuleIR record kind is proposed;
|
|
1639
|
+
- a browser runtime concept is proposed;
|
|
1640
|
+
- static routes would acquire JavaScript;
|
|
1641
|
+
- route JavaScript would include unused package behavior;
|
|
1642
|
+
- a generic callback registry is proposed;
|
|
1643
|
+
- a generic subscription/store/resource/query/form runtime is proposed;
|
|
1644
|
+
- arbitrary JavaScript evaluation or bytecode is proposed;
|
|
1645
|
+
- ownership cannot be expressed with current route/layout/conditional/keyed/effect boundaries;
|
|
1646
|
+
- output bytes materially increase;
|
|
1647
|
+
- a browser or build benchmark regresses materially;
|
|
1648
|
+
- diagnostics would require silent fallback;
|
|
1649
|
+
- a compatibility feature cannot remain at the adapter boundary.
|
|
1650
|
+
|
|
1651
|
+
The review must compare deletion, native migration, normalization, adapter, existing IR extension, and rejection before considering a primitive.
|
|
1652
|
+
|
|
1653
|
+
## Stop And Rollback Rules
|
|
1654
|
+
|
|
1655
|
+
- Stop a semantic slice when no real fixture authorizes it.
|
|
1656
|
+
- Stop resource work when existing EffectIR already represents the fixture.
|
|
1657
|
+
- Stop caching work when no benchmark proves material repeated work.
|
|
1658
|
+
- Stop pass consolidation when diagnostic ownership becomes less clear.
|
|
1659
|
+
- Stop cross-framework sampling when behavior parity fails.
|
|
1660
|
+
- Stop a release claim when raw data is unavailable.
|
|
1661
|
+
- Stop package publication when version, tests, package smoke, registry verification, or performance gates differ from the reviewed commit.
|
|
1662
|
+
- Forward-fix published releases; never repoint a published tag.
|
|
1663
|
+
|
|
1664
|
+
## Risk Register
|
|
1665
|
+
|
|
1666
|
+
| Risk | Early signal | Mitigation | Release effect |
|
|
1667
|
+
|---|---|---|---|
|
|
1668
|
+
| Derived becomes arbitrary evaluator | New calls/operators added per fixture | Keep tagged pure vocabulary and static captures | Blocks semantic slice |
|
|
1669
|
+
| Package logic leaks into core | Library names in ModuleIR/codegen/runtime | Move decision to adapter boundary | Blocks review |
|
|
1670
|
+
| ResourceIR added prematurely | Private handles described as shared resources | Reuse EffectIR and closure ownership | Blocks resource item |
|
|
1671
|
+
| Component runtime emerges | Browser needs component identity/function calls | Preserve build-time specialization | Blocks release |
|
|
1672
|
+
| Pass count hidden | Logic moved into source compiler without deletion | Count semantic decisions and LOC, not filenames only | Blocks complexity gate |
|
|
1673
|
+
| Benchmark parity drifts | Different routes/content/a11y | Checked scenario contracts | Invalidates results |
|
|
1674
|
+
| Benchmark harness disappears | Ignored/untracked scripts or moving branches | Pin public revision and tracked commands | Blocks proof gate |
|
|
1675
|
+
| Chrome tests silently skip | Browser unavailable without required flag | Use `KUDZU_REQUIRE_CHROME=1` | Blocks release candidate |
|
|
1676
|
+
| Build scaling shifts to browser | Less static output or more client data | Compare complete HTML and browser bytes | Blocks release |
|
|
1677
|
+
| AI benchmark is gamed | Kudzu-specific prompts/private knowledge | Equal public docs, tools, budgets, and raw failures | Blocks 1.0 claim |
|
|
1678
|
+
|
|
1679
|
+
## Documentation Update Matrix
|
|
1680
|
+
|
|
1681
|
+
| Change | Required documents |
|
|
1682
|
+
|---|---|
|
|
1683
|
+
| Active work status | `0.9-semantic-compression.md`, this plan |
|
|
1684
|
+
| Compiler owner moves | `compiler-current-architecture.md` |
|
|
1685
|
+
| Performance result | `PERFORMANCE.md`, active work evidence |
|
|
1686
|
+
| Supported migration syntax | `MIGRATION_ROADMAP.md`, README/framework docs as applicable |
|
|
1687
|
+
| Deliberate unsupported boundary | `MIGRATION_ROADMAP.md`, fixture README if present |
|
|
1688
|
+
| Version plan changes | `versioning.md` |
|
|
1689
|
+
| Actual release | `package.json`, lockfile, `RELEASES.md`, README, generator range, release page |
|
|
1690
|
+
| Benchmark comparator update | `PERFORMANCE.md`, benchmark revision/lock record |
|
|
1691
|
+
|
|
1692
|
+
## Release Candidate Procedure
|
|
1693
|
+
|
|
1694
|
+
### RC Preparation
|
|
1695
|
+
|
|
1696
|
+
1. Freeze semantic scope.
|
|
1697
|
+
2. Complete 0.9.0-06 complexity report.
|
|
1698
|
+
3. Pin all benchmark revisions and framework lockfiles.
|
|
1699
|
+
4. Build the full fixture corpus from a clean checkout.
|
|
1700
|
+
5. Run Node and required Chrome suites.
|
|
1701
|
+
6. Run package smoke installation.
|
|
1702
|
+
7. Run all maintained Kudzu benchmarks.
|
|
1703
|
+
8. Run the final cross-framework matrix.
|
|
1704
|
+
9. Publish raw data and failures.
|
|
1705
|
+
10. Review every material delta.
|
|
1706
|
+
|
|
1707
|
+
### RC Acceptance
|
|
1708
|
+
|
|
1709
|
+
The candidate must satisfy:
|
|
1710
|
+
|
|
1711
|
+
- all semantic queue items complete or evidence-closed;
|
|
1712
|
+
- no unreviewed semantic primitive;
|
|
1713
|
+
- no generic browser runtime;
|
|
1714
|
+
- core pass/LOC budget passes or has approved bounded exception;
|
|
1715
|
+
- static-route zero JavaScript passes;
|
|
1716
|
+
- complete initial HTML passes;
|
|
1717
|
+
- capability proportionality passes;
|
|
1718
|
+
- cross-framework browser/build proof passes;
|
|
1719
|
+
- content and stateful application journeys pass;
|
|
1720
|
+
- disabled/delayed/missing-JS matrix passes;
|
|
1721
|
+
- package and registry process passes on the exact candidate commit.
|
|
1722
|
+
|
|
1723
|
+
### Final Release Updates
|
|
1724
|
+
|
|
1725
|
+
Only after RC acceptance:
|
|
1726
|
+
|
|
1727
|
+
1. Set `@kudzujs/core` to `0.9.0`.
|
|
1728
|
+
2. Update lockfile metadata.
|
|
1729
|
+
3. Update `create-kudzu` to a `^0.9.0` core range and verify generated projects.
|
|
1730
|
+
4. Add factual `0.9.0` release notes.
|
|
1731
|
+
5. Update README status and benchmark summary.
|
|
1732
|
+
6. Update current architecture version references.
|
|
1733
|
+
7. Run `npm run check`, `npm test`, required Chrome tests, and package smoke again.
|
|
1734
|
+
8. Pack and inspect package contents.
|
|
1735
|
+
9. Publish from the reviewed commit.
|
|
1736
|
+
10. Verify npm registry metadata and a fresh generated application.
|
|
1737
|
+
11. Create the release tag/page without changing the published artifact.
|
|
1738
|
+
|
|
1739
|
+
## Handoff Toward 1.0.0
|
|
1740
|
+
|
|
1741
|
+
`0.9.0` proves browser and build advantage. `1.0.0` additionally proves Kudzu is the best framework for AI-assisted delivery under equal conditions and freezes Semantic IR v1.
|
|
1742
|
+
|
|
1743
|
+
0.9 work must leave the evidence needed for later AI evaluation:
|
|
1744
|
+
|
|
1745
|
+
- stable fixture provenance;
|
|
1746
|
+
- deterministic diagnostics;
|
|
1747
|
+
- exact acceptance journeys;
|
|
1748
|
+
- machine-readable artifacts where already available;
|
|
1749
|
+
- compiler attempt/build timing records;
|
|
1750
|
+
- source-retention comparisons;
|
|
1751
|
+
- no private migration knowledge required to succeed.
|
|
1752
|
+
|
|
1753
|
+
### Planned Version Relationship
|
|
1754
|
+
|
|
1755
|
+
| Version | Primary outcome |
|
|
1756
|
+
|---|---|
|
|
1757
|
+
| 0.9 | Semantic compression plus proven cross-framework browser/build advantage |
|
|
1758
|
+
| 0.10 | First-class deterministic `kudzu normalize` |
|
|
1759
|
+
| 0.11 | Structured diagnostics, explain, fix, and migration analysis |
|
|
1760
|
+
| 0.12 | Broader ecosystem adapters through package-neutral semantics |
|
|
1761
|
+
| 1.0 | Stable Semantic IR v1 plus best equal-condition AI delivery results |
|
|
1762
|
+
|
|
1763
|
+
### 1.0 AI Delivery Protocol Seed
|
|
1764
|
+
|
|
1765
|
+
The final 1.0 protocol will use the same:
|
|
1766
|
+
|
|
1767
|
+
- model and model version;
|
|
1768
|
+
- system constraints;
|
|
1769
|
+
- tools and permissions;
|
|
1770
|
+
- hardware and network;
|
|
1771
|
+
- context and time budget;
|
|
1772
|
+
- task statement;
|
|
1773
|
+
- starting repository quality;
|
|
1774
|
+
- public documentation access;
|
|
1775
|
+
- behavior, accessibility, build, browser, and output acceptance suite.
|
|
1776
|
+
|
|
1777
|
+
It will include at least content, forms, CRUD/shared state, commerce-derived state, and resource/realtime tasks. Each framework receives at least five attempts per task, with more attempts when results are unstable.
|
|
1778
|
+
|
|
1779
|
+
The primary AI metric is cost per successful task. A task counts only when all acceptance checks pass.
|
|
1780
|
+
|
|
1781
|
+
Required 1.0 metrics:
|
|
1782
|
+
|
|
1783
|
+
- success rate;
|
|
1784
|
+
- input, output, and reasoning tokens;
|
|
1785
|
+
- monetary cost;
|
|
1786
|
+
- elapsed completion time;
|
|
1787
|
+
- files read and modified;
|
|
1788
|
+
- tool calls;
|
|
1789
|
+
- compiler/build attempts;
|
|
1790
|
+
- failed attempts and correction cycles;
|
|
1791
|
+
- source retention and maintainability review;
|
|
1792
|
+
- final browser bytes and performance;
|
|
1793
|
+
- diagnostic interactions required;
|
|
1794
|
+
- context surface area per successful task.
|
|
1795
|
+
|
|
1796
|
+
Kudzu must achieve the highest or statistically tied-highest success rate and the lowest median cost per successful task while retaining the complete 0.9 browser advantage. Build-only completion, cherry-picked attempts, hidden compiler knowledge, or toy-only tasks cannot authorize 1.0.
|
|
1797
|
+
|
|
1798
|
+
## Active Status Ledger
|
|
1799
|
+
|
|
1800
|
+
| Work item | Status | Next exact action | Blocker |
|
|
1801
|
+
|---|---|---|---|
|
|
1802
|
+
| 0.9.0-01 | Complete | Baseline, harness restoration, contracts, and explicit gaps are signed off | None |
|
|
1803
|
+
| 0.9.0-02 | Complete | Derived closure recorded for Medusa and Mercury | None |
|
|
1804
|
+
| 0.9.0-03 | Complete | Shared-state/action closure recorded for Context and Zustand | None |
|
|
1805
|
+
| 0.9.0-04 | Complete | Existing EffectIR sufficiency and zero qualifying ResourceIR fixtures recorded | None |
|
|
1806
|
+
| 0.9.0-05 | Complete | WorkLedger object-property binding/effect/list ownership and negatives recorded | None |
|
|
1807
|
+
| 0.9.0-06 | Complete | Candidate ledger, two deletions, diagnostic audit, and architecture review are signed off | None |
|
|
1808
|
+
| 0.9.0-07 | Complete | Final cross-framework browser, ownership, resilience, and build proof signed off | None |
|
|
1809
|
+
|
|
1810
|
+
## Immediate Next Session
|
|
1811
|
+
|
|
1812
|
+
`0.9.0-01` through `0.9.0-07` are complete. Native C1, the five-target runtime/capability matrices, C2 browser latency, C5 resource ownership, and 10,000-route commerce build time and peak RSS pass. The next milestone is the separately gated 1.0 AI delivery protocol.
|
|
1813
|
+
|
|
1814
|
+
The completed final session:
|
|
1815
|
+
|
|
1816
|
+
- profiled retained route-plan, artifact-report, and HTML memory at 10,000 routes;
|
|
1817
|
+
- reduced peak retention without dropping `.kudzu` evidence or incremental correctness;
|
|
1818
|
+
- reran seven rotating 10,000-product samples after the retained optimization;
|
|
1819
|
+
- keep the pinned AI migration task runner in the 1.0 work item.
|