Skip to content

Commit c234ae7

Browse files
committed
docs: the summary is maintenance rules, then facts, then week-by-week
Three changes, all asked for by the maintainer: The "where it stands" prose is gone. It read as an assessment of the project — feature scope covered, what is "left", waiting on decisions rather than features — which is a judgement this file has no standing to make. The factual table stays: test tallies, documented members, visual regression coverage, benchmark pairs, style parity, bundle size, CI. The maintenance rules move to the top, where the next person editing the file sees them before editing rather than after. Two rules are new: the weeks carry headline changes and *what they buy*, and no judgement calls about project status — both of which this pass exists to enforce. The timeline table becomes five week sections, each a list of what changed and what it bought at a high level. What was previously scattered across "what v4 is", "performance" and a one-line-per-week table is now in the week that produced it, with its benefit attached: the columnar model buys the performance case, goldens plus parity diffs buy the answer to "is it right", the GPU executors buy 642x on Markov clustering, the concurrent benchmark runner buys 8.4 minutes instead of 55. The rendered page now holds zero prose blocks — three tables and 62 points. Claude-Session: https://claude.ai/code/session_01CZuBgFBGSDy6QtAYFL5sE3
1 parent 13eadeb commit c234ae7

1 file changed

Lines changed: 102 additions & 94 deletions

File tree

EXECUTIVE_SUMMARY.md

Lines changed: 102 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,40 @@
33
The v4 rewrite: a columnar model and a WebGPU renderer, per
44
[#3486](https://github.com/cytoscape/cytoscape.js/issues/3486).
55

6-
- **Status**: not released, and not close. `cytoscape@3` remains the shipping
7-
library.
6+
- **Status**: not released. `cytoscape@3` remains the shipping library.
87
- **Scope of this record**: the v4 prototype, from **2026-07-22**.
98
- **Last updated**: 2026-08-12, as round 68 closed.
10-
- **Derived document.** [`PLAN.md`](PLAN.md) is the development record and the
11-
source of truth; this is the five-minute version — see *Maintaining this
12-
file*.
9+
10+
## How to maintain this file
11+
12+
- **[`PLAN.md`](PLAN.md) is the source; this file is derived from it.** Nothing
13+
is recorded here that is not recorded there first.
14+
- **Rewrite when a round closes** — by re-reading the record and restating it,
15+
never by appending.
16+
- **Point form only.** Short points, high level, readable in five minutes.
17+
- **Week by week, and headline changes only.** Each week is a list of what
18+
changed and **what it buys** — the benefit, not the implementation. A change
19+
earns a line only if it changed what the library *is* or what it can do; most
20+
do not.
21+
- **No round narrative.** Rounds, file names, sub-round numbering and
22+
implementation detail belong in `PLAN.md`. Round numbers appear here only
23+
where one is the sole handle on an open question.
24+
- **Restate, don't append.** Later rounds routinely change what an earlier
25+
decision meant, so earlier weeks need correcting too.
26+
- **Facts, not judgement.** The numbers table below stays current; assessments
27+
of how close a release is, what is "left", or whether the work is on track do
28+
not belong here — they need information this file does not carry.
29+
- **Quote a number only if it is current.** Test tallies, member counts and
30+
benchmark figures go stale first; re-run the relevant command (see
31+
`AGENTS.md`) rather than copying one forward.
32+
- **Keep the decisions table honest**: an item leaves it when the decision is
33+
made, not when the work is scheduled.
34+
- Update *Last updated* and the round it covers.
1335

1436
---
1537

1638
## Where it stands
1739

18-
- Feature scope covered; the work is **hardening, measurement and release
19-
preparation**.
20-
- CI green as of 2026-08-06, having been red on every push for weeks.
21-
- `npm test` passes from a clean checkout.
22-
- What is left waits on **a decision, another platform, or release
23-
credentials** — not on unbuilt features.
24-
- An inventory, not a schedule: several rounds v4 needs are not scoped yet.
25-
2640
| | |
2741
|---|---|
2842
| Automated tests | 2,205 unit · 427 module · 24 soak · 376 browser (251 run; 125 skip for want of a WebGPU adapter) |
@@ -31,31 +45,80 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
3145
| Benchmarks | 25 suites, 4 published profiles · **all 366 v3-comparative pairs read v4-faster** (geometric mean 13.7×, minimum 1.03×) · GPU algorithm executors 13× geo-mean over their CPU reference |
3246
| Style parity | v4 accepts 157 of v3's 291 style property names; the rest dropped by decision |
3347
| Bundle | 691 KiB minified / 185 KiB gzipped — ~1.5× v3 (410 / 126 KiB); the WGSL shaders, which v3 has no equivalent of, are minified at build time |
34-
35-
**Headline case** — a 19,607-node / 464,657-edge network:
36-
37-
- initialises in **~0.95 s against v3's ~19 s**;
38-
- holds **33 ms frames where v3 takes 4,460 ms**;
39-
- lays out live on the GPU force layout in **1.3 s**.
48+
| CI | Green as of 2026-08-06; `npm test` passes from a clean checkout |
4049

4150
---
4251

43-
## What v4 is
52+
## Week 1 — 22–24 July
4453

4554
- **A columnar, CPU-canonical model** — typed-array columns, stable slots,
46-
coalesced dirty spans, a CSR adjacency index.
47-
- Reads stay synchronous, so the public API did not become async.
48-
- **A WebGPU renderer** — SDF node shapes, compute culling, indirect draws, GPU
49-
picking, GPU text.
50-
- **A co-signed model↔renderer contract** in one file: changing the column and
51-
flag layout is a deliberate act.
52-
- **Structured queries instead of a selector language** — objects and plain
53-
functions.
54-
- **A serializable mapper DSL** for style, evaluated on the GPU for paint
55-
channels.
56-
- Element state (`:selected`, `:active`, `:grabbed`, …) is ordinary style
57-
condition, not a shader constant — so an application can restyle or disable
58-
every affordance.
55+
coalesced dirty spans, a CSR adjacency index. Buys the whole performance
56+
case: the graph is already in the shape the GPU wants.
57+
- **Reads stay synchronous.** Buys a public API that did not have to become
58+
async to get the model.
59+
- **A WebGPU renderer** — SDF shapes, compute culling, indirect draws, GPU
60+
picking, GPU text. Buys interaction on graphs that stall v3: **33 ms frames
61+
where v3 takes 4,460**.
62+
- **A co-signed model↔renderer contract in one file.** Buys a layout change
63+
that cannot happen by accident on one side only.
64+
- **Structured queries instead of a selector language.** Buys queries that are
65+
data — composable, inspectable, no parser.
66+
- **A serializable mapper DSL for style.** Buys paint channels evaluated on the
67+
GPU, and style that can cross a wire.
68+
69+
## Week 2 — 27 July – 2 August
70+
71+
- **Visible-behaviour parity with v3** — curves, compounds, labels, images,
72+
animation. Buys an existing app the same picture.
73+
- **Goldens *plus* live v3-vs-v4 parity diffs.** Buys the answer to *is it
74+
right*, which a golden alone cannot give: goldens compare v4 against its own
75+
past.
76+
- **Benchmarks with an HTML report.** Buys claims that are numbers.
77+
- **Design sittings, decisions recorded when taken.** Buys a migration guide
78+
that could later be compiled rather than reconstructed.
79+
80+
## Week 3 — 3–8 August
81+
82+
- **Error and documentation contracts gated at zero tolerance.** Buys a guard
83+
no test has ever fired failing the build, and a public member without docs
84+
failing it too.
85+
- **The repository split: v4 is the package, v3 lives whole in `v3/`.** Buys a
86+
v4 that ships alone, and a real v3 to keep measuring parity against.
87+
- **Packaging gate, migration guide, soak tier, status site.** Buys release
88+
mechanics that are testable before there is a release.
89+
- **CI made honest.** Buys a green run that means something: every defect found
90+
was in something never executed on a fresh checkout, on a runner, or in a
91+
browser nobody could launch locally.
92+
93+
## Week 4 — 9–11 August
94+
95+
- **Both long-standing API decisions taken, each by declining the surface its
96+
own homework had priced.** Buys a smaller library and a recorded reason.
97+
- **The force layout rebuilt on published methods.** Buys a layout that stays
98+
numerically stable past node degree ~20, and lays out the 465k-edge network
99+
live in **1.3 s**.
100+
- **The nine expensive whole-graph algorithms went async with GPU executors.**
101+
Buys Markov clustering at up to **642×** its CPU reference, k-medoids 146×,
102+
Floyd–Warshall 28×; the traversal tier stays synchronous.
103+
- **Per-element bypasses returned as a first-class stylesheet section.** Buys
104+
v3's ergonomics without v3's cost — id-keyed, surviving re-add, carried by
105+
`cy.json()` (v3 loses them), twice as fast.
106+
- **Cross-commit benchmark comparison pages.** Buys regressions caught by the
107+
archive rather than by a user: one four-day-old regression on first use.
108+
- **The load path measured, then taken apart.** Buys **1.9×** on the 465k-edge
109+
load with a byte-identical rendered frame, and initialisation of that network
110+
in **~0.95 s against v3's ~19 s**.
111+
112+
## Week 5 — 12 August
113+
114+
- **The benchmark runner runs jobs concurrently.** Buys a publishing run of the
115+
`all` profile in **8.4 minutes instead of ~55**, so re-measuring stops being
116+
a reason not to measure.
117+
- **Concurrency folded into the harness fingerprint, and the published archive
118+
kept serial.** Buys the guarantee that a faster *instrument* can never be
119+
read as a faster *library*.
120+
121+
---
59122

60123
## What changed for users of v3
61124

@@ -67,45 +130,13 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
67130
sequencing.
68131
- **display/visibility split** into a structural tier and a paint-only tier.
69132
- **`cy.layout({ impl })` is the whole extension story.**
70-
- **The nine expensive whole-graph algorithms return promises** and take
71-
`executor: 'cpu' | 'gpu' | 'auto'`; the traversal tier stays synchronous.
72-
- **Per-element bypasses are back** — a first-class `bypasses` stylesheet
73-
section, id-keyed, surviving re-add, carried by `cy.json()` (v3 loses them),
74-
twice as fast as v3's.
133+
- **The expensive whole-graph algorithms return promises** and take
134+
`executor: 'cpu' | 'gpu' | 'auto'`.
75135
- **`cy.collection()` throws if passed an argument**; **`cy.$()` and
76136
`cy.byId()`** restored as aliases.
77-
78-
## Performance
79-
80-
- Every v3-comparative benchmark pair reads v4-faster.
81-
- The published archive and its cross-commit comparison pages keep it that way
82-
— they caught a four-day-old regression on first use.
83-
- **GPU algorithm executors** on a real adapter: Markov clustering up to 642×
84-
its CPU reference, k-medoids 146×, Floyd–Warshall 28×, betweenness 18×; only
85-
PageRank and hierarchical clustering sit in low single digits.
86-
- **The load path**, rebuilt on measurement: **1.9×** on the 465k-edge load,
87-
rendered frame byte-identical.
88-
- **First frame**: deferring the feature pipelines cut the software-renderer
89-
first frame from 4.6 s to 2.7 s.
90-
- **The benchmark runner** runs jobs concurrently: an `all`-profile publishing
91-
run went from ~55 min to **8.4**.
92-
- Concurrency is treated as a change of instrument, not a faster clock: it is
93-
folded into the harness fingerprint, and **the published archive stays
94-
serial**.
95-
96-
---
97-
98-
## Timeline
99-
100-
| Week | |
101-
|---|---|
102-
| **1** — 22–24 Jul | Architecture proved end to end. |
103-
| **2** — 27 Jul – 2 Aug | Visible-behaviour parity with v3, and the measurement infrastructure to keep it. |
104-
| **3** — 3–8 Aug | Contracts gated; the repository split so v4 is the package; packaging, migration guide, soak tier, status site; CI made honest. |
105-
| **4** — 9–11 Aug | Both long-standing decisions taken; the force layout rebuilt; the expensive algorithms async onto the GPU; bypasses back; the load path taken apart. |
106-
| **5** — 12 Aug | The benchmark runner stopped using one core of eight. |
107-
108-
---
137+
- **Element state** (`:selected`, `:active`, `:grabbed`, …) is ordinary style
138+
condition rather than a shader constant, so an application can restyle or
139+
disable every affordance.
109140

110141
## Open decisions
111142

@@ -115,7 +146,7 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
115146
| Edge overlay band width | v3 draws the halo `2 × padding` wide (invisible at small paddings), v4 `width + 2 × padding` (always visible). Either resolution changes rendered output |
116147
| Hollow *mid* arrows | Still show the line through them: they sit mid-edge, where a trim cannot reach. May end up unsupported rather than fixed |
117148

118-
## What remains before 4.0
149+
## Not yet built
119150

120151
| | |
121152
|---|---|
@@ -128,8 +159,6 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
128159
through the declarative mapper system; splitting the largest implementation
129160
files.
130161

131-
---
132-
133162
## How this project works
134163

135164
1. **A control for every claim** — each test run once with the behaviour it
@@ -141,24 +170,3 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
141170
browser, a person opening the page.
142171
5. **A change that should be invisible is the best test of the tools that watch
143172
for changes.**
144-
145-
---
146-
147-
## Maintaining this file
148-
149-
- **`PLAN.md` is the source; this file is derived from it.**
150-
- **Rewrite when a round closes** — by re-reading the record and restating it,
151-
never by appending.
152-
- **Point form only**: short points, high level, readable in five minutes.
153-
- **No round narrative.** Rounds, file names and implementation detail belong
154-
in `PLAN.md`; a round earns a line here only when it changed what the library
155-
*is*, and most earn none.
156-
- Round numbers appear only where one is the sole handle on an open question.
157-
- **Restate, don't append.** Later rounds routinely change what an earlier
158-
decision meant, so earlier sections need correcting too.
159-
- **Quote numbers only if they are current.** Test tallies, member counts and
160-
benchmark figures go stale first; re-run the relevant command (see
161-
`AGENTS.md`) rather than copying a figure forward.
162-
- **Keep the decisions table honest**: an item leaves it when the decision is
163-
made, not when the work is scheduled.
164-
- Update *Last updated* and the round it covers.

0 commit comments

Comments
 (0)