2026-10-04 — Traffic simulation, contracts, and careful agent work
A model that has to explain itself
Urban traffic is easy to sketch and hard to simulate credibly. A line of cars following a leader is only one part of the problem. Intersections add signals, turning paths, yielding, limited storage, and vehicles that can block one another. This project models those interactions in a 2D browser application, with scenarios for signalized crossings and the Dresden Carolabrücke corridor. Its goal is to let people inspect traffic behavior and compare corridor designs. The repository is clear that this is an engineering model, not a field-calibrated predictor.
The application is built from browser-native JavaScript modules, HTML, CSS,
Canvas 2D, Web Workers, and an optional WebGPU compute path. Scenario data is
JSON, checked against a JSON Schema by a small Go validator. The repository
also contains Node.js headless runners for physical invariants, flow, worker
behavior, GPU parity, and turn completion. There are 12 model specifications
and 25 test-*.js scripts. make check combines schema and licensing checks,
unit and runtime checks, geometry and flow gates, and a hybrid-worker runtime
gate.
When a passing test was not enough
A useful episode began with vehicles that appeared to stall while turning. The tempting explanation was that the turn obstacle detector was seeing phantom obstacles. The September 8 investigation traced the vehicles and their blockers instead. Some were held by yielding traffic; in an unsignalized crossing, vehicles could hold one another. The obstacle was real, even though the overall deadlock still needed a fix.
The team tried a bounded admission prototype, then evaluated it against more
than turn completion. One version removed focused turn timeouts but pushed an
unsignalized flow gate to 774 frames against a 600-frame limit. A variant
that considered only stopped blockers produced 1,793 bridge overlap frames.
Both experiments were rejected and the production behavior was restored in
commit 8142d70. The prototype and its measurements remained in history and
issue 019, while docs/TurnStallInvestigation.md records how to reproduce the
cases and what a future fix must measure. That record distinguishes a useful
diagnosis from a shipped correction.
The next day's worker repair shows why shared code does not guarantee shared
behavior. Issue 093 found that the main simulation and its Web Worker both
used the same pocket-occupancy trait, but consumed its return value
differently. The trait returned a pocket ID string; the worker treated that
string as an object and lost pocket metadata. Commit a7df724 corrected the
adapter and added regression coverage for both consumers, including capacity,
retention, departure, active turns, and stale-field clearing. A separate
parser fix in 9c6e382 ensured URL overrides could not turn off a
schema-declared immutable movement feature.
A workflow built around evidence
The repository uses numbered Markdown issues as work tickets and keeps architecture decisions, experiments, and retrospective studies beside the code. Recent history contains 50 commits in the six-week window, with 19 commits from September 7–11 covering roadmap work, two focused fixes, and durable investigation notes. There are 86 issue documents plus the generated index. The work is not all feature delivery: several recent tickets define missing evidence, including real-browser control checks, seed and timestep coverage, independent safety observers, and reference validation for simple crossings.
The project documents use of read-only advisors for distinct investigation questions, followed by sequential edits to shared simulation files. The turn investigation also records an independent geometry check: a separating-axis test of oriented vehicle bodies found future intersections in the examined snapshots. The existing following-overlap helper could not establish safety for perpendicular traffic. These observations drove issue 098's proposal for independent safety fixtures. They do not mean that the proposed gate is already implemented or that every route has been proven safe.
This breadth is difficult for one person to keep in working memory: the browser and worker adapters, GPU path, 12 scenarios, physical checks, issue history, and design documentation all need to agree. The agents' clearest contribution here is parallel reading and review, not autonomous claims of correctness. The worker regression demonstrates the value of testing the consumer boundary; the rejected turn experiment demonstrates the value of keeping flow and collision evidence alongside a headline completion metric. The remaining open work is substantial, and the project says so. Its strongest lesson is procedural: make experiments reproducible, retain failed results, and describe exactly what the evidence does and does not establish.
Facts
| Item | Verified snapshot |
|---|---|
| Stack | JavaScript ES modules, HTML, CSS, Canvas 2D, Web Workers, optional WebGPU; Node.js tests; Go JSON Schema validator |
| Size | 12 JSON model specifications; 25 headless test-*.js scripts; 16,170 lines across top-level website JS, trait JS, and test scripts |
| Recent activity | 50 commits from 2026-08-23 through 2026-09-11; 19 from 2026-09-07 through 2026-09-11 |
| Recent concrete fixes | Worker pocket consumer contract (a7df724, 2026-09-08); immutable movement override (9c6e382, 2026-09-08); local Go workspace setup and follow-up (d0efb69, 88efb1b) |
| Validation limit | Project assessment says the traffic model is not field-calibrated; issue 099 tracks reference evidence and validation work |