The Content-Security-Policy had no exception for static.ads-twitter.com
(script-src) or the analytics.twitter.com/t.co conversion beacon
(img-src, connect-src), so uwt.js and every adsct conversion ping were
silently blocked by the browser on every page view. Same bug class
independently found and fixed on bidstage.app and ereboslab.com today.
Verified live: static.ads-twitter.com/uwt.js now loads (200) and the
adsct beacon fires with no CSP violations in the console.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The homepage opener led with a feature description instead of the pain the
visitor is searching for. Rewrite it to name the search ("symbolic regression
from a time series", "discover equations from data"), link the shipped
damped-oscillator sample above the fold, and show the actual CLI command so
the value is provable in the first screen instead of asserted.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The Getting Started page and its runnable example both told visitors to run
`cargo install lawsynth-cli` and `pip install lawsynth` — neither package is
published (crates.io/PyPI both 404), so every visitor following the
quickstart hit a dead command. RELEASE.md already documents the real, tested
v0.1 install path (source checkout, no registry access needed); this just
brings the public site's copy in line with it: git clone + cargo install
--path crates/lawsynth-cli + maturin develop.
Publishing to crates.io/PyPI remains intentionally gated on owner-provisioned
credentials (release-plz.toml publish = false), already tracked in
RELEASE.md's "Publishing (owner-gated)" section — no new blocker doc needed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Loads the X Ads base code (pixel rhhqi) on every page by injecting it
into the single shared renderPage() template in site.ts, so all 312
pre-rendered static pages pick it up on the next render/deploy.
World Lab's subtitle promises "Simulate, forecast, and intervene on the
current world," and ScreensController already had a fully working
forecastWorld() method plus a "world:forecast" case in its onAction
dispatch table (calling the real worlds.forecast API) since the P6 wave —
but no screen ever rendered a button with that action id, so a real user
could never trigger it. The button, its handler, and its result were three
separately built pieces that were never connected.
Add the "Request live forecast" button to World Lab's actions, track a
`forecasting` in-flight flag, and surface the live forecast result as a
metric so clicking it has a visible effect instead of silently doing
nothing. Covered by a new end-to-end test (worldLabForecastTests) that
drives the real action id through a live api-client transport and asserts
the model updates.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds docs/getting-started/faq.md targeting real search queries people ask
when evaluating equation-discovery / symbolic-regression tools (what SINDy
is, how LawSynth compares to PySINDy/PySR, whether it's free/offline, what
a .lsworld bundle is, and honest current limitations) — claim-gated against
the actual CLI, README, and docs/research/limitations.md.
Also fixes two unresolved git merge-conflict markers left in
apps/docs-site/package.json and src/site.ts from a prior merge (ef2abe9),
which left package.json as invalid JSON and broke `npm run build/test/render`
for the lawsynth.dev static-site pipeline. Resolved both in favor of the
feat/release-cut-2026-09-06 side (keeps seo_titles.test.js in the test script
and fallbackDescription() in renderPage, which seo_titles.ts already exports
and the rest of the file already relies on). Build, full test suite (15/15),
and a deterministic re-render all pass after the fix.
Rendered and deployed via `npx wrangler deploy`; new page verified live at
https://lawsynth.dev/docs/getting-started/faq (200, correct title/meta,
listed in sitemap.xml), and all referenced internal doc links verified 200.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The workspace repository metadata pointed at a 404 (lawsynth/lawsynth instead
of caelum0x/lawsynth). RELEASE.md documents 12 crates plus all services/apps
as explicitly internal for v0.1 (not part of the published surface), but only
lawsynth-integration actually carried `publish = false` — add the missing
flag to the other 16 internal crates/services/apps so a future `cargo
publish` run can't accidentally ship them.
Also fix the two cargo clippy -D warnings failures blocking CI on main since
the 2026-10-12 release-cut merge: lawsynth-information-diffusion's forecast()
needlessly indexes `totals` by a range-loop variable (needless_range_loop)
and exceeds clippy's argument-count lint (too_many_arguments, same pattern
already used elsewhere in the workspace for fixed simulation-contract
surfaces). Verified: cargo fmt --check, cargo clippy --workspace --all-targets
-- -D warnings, and cargo test --workspace (388 suites, 0 failures) all pass
clean; cargo build --locked --release -p lawsynth-cli succeeds.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- assets html_handling drop-trailing-slash: sitemap/canonical/internal links
were all 307-redirecting to the trailing-slash variant
- qualify duplicate SEO titles (19 pages) with their section
- strip repeated heading and markdown markers from fallback descriptions
- IndexNow key file
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Crates inherited version/license/edition from [workspace.package] but not
`repository`, so every crate published without a repository link. Add
`repository.workspace = true` uniformly, completing the
description+version+license+repository metadata `cargo publish` and crates.io
expect. No build impact.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every intra-workspace dependency was declared path-only
(`{ path = "../lawsynth-X" }`), which makes `cargo publish` fail with
"all dependencies must have a version specified when publishing". Add the
uniform workspace version (`version = "0.1.0"`) alongside each `lawsynth-*`
path dep across all workspace members so each crate can be published with a
single `cargo publish`. Path is retained, so local offline builds are
unchanged (cargo prefers the path for workspace builds); this only supplies
the version metadata the registry requires. Publishing itself stays owner-
gated via release-plz (publish=false).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Landing (apps/docs-site/src/content.ts): add a why-it-matters positioning
line (open-source, Apache-2.0 alternative to black-box ML and SINDy), an
"Open source & contributing" section (Star on GitHub, Contribute, Apache-2.0,
CLI + Python/TS SDKs), and a "Project scope" section covering the dynamics /
control / causal / bifurcation domains plus the GridSynth and Information
Diffusion applied tools and the roadmap.
README: tighten the hero with a one-line what, the read-the-equations-not-a-
black-box differentiator, license/language/SDK badges, and GitHub + Contributing
links.
Discovery ran stlsq_standardized (thresholds in RMS-normalized feature
space) but then re-filtered the restored *original-unit* coefficients by
config.sparse.threshold. That defeated the standardization: genuine terms
whose coefficient is small purely because their state carries a large
magnitude (e.g. SIR's beta/N ~ 3e-4 with populations ~1e3) were pruned,
collapsing the law unless the user hand-tuned the threshold to the data
scale. Keep every non-zero term the standardized solver returns.
Fixing that unmasked a second bug: when a threshold prunes every remaining
active term in one step, STLSQ's loop broke on empty support and returned
the pre-prune *dense* fit, so an aggressive threshold silently produced a
denser model. Zero the coefficients when the support drains, matching the
reference STLSQ contract.
- Add regression tests: keeps_scale_small_coefficients_after_standardized_fit
and threshold_above_every_coefficient_yields_the_empty_model.
- SIR now recovers the S*I interaction at raw population scale (thr 0.02);
Lorenz/Lotka-Volterra/damped-pendulum recovery unchanged.
- Add a reproducible discovery gallery (examples/discovery-gallery) and a
site showcase page (docs/showcase) with deterministic observed-vs-recovered
SVG plots served from the docs site.
- .gitignore: local datasets, scratch worlds, and regenerable run/work dirs.
Workspace: 1653 tests pass; docs-site render stays byte-identical.
Load the 253 hand-written Markdown files under docs/ through the existing
compileSite pipeline, published under /docs/** with README->index mapping,
internal .md link rewriting, and folder-grouped navigation (254 pages incl.
a /docs landing). Add standalone-image support to the Markdown renderer
(same-origin-only sources matching the img-src 'self' CSP, semantic <figure>
with figcaption, lazy/async loading) and wire the new hero phase-portrait and
discovery-loop SVG diagrams into the landing and getting-started pages.
- load-docs.mjs: fs-backed docs loader (deterministic sorted discovery)
- markdown.ts: image block kind, parser, renderer, alt indexed for search
- theme.ts: .docs-figure styling
- content.ts: hero.svg + loop.svg on / and /getting-started
- tests: image rendering + docs-corpus coverage; determinism preserved
254 pages render; 12/12 tests pass; two renders byte-identical.
- assets/favicon.svg + assets/og.svg: a LawSynth mark (dark rounded square + an
accent signal-wave with a highlighted node) and a 1200x630 OG banner; the
emitter copies apps/docs-site/assets/* verbatim into public/.
- seo.ts: added og:site_name, twitter:title/description, and twitter:image
(alongside the existing og:*), so shared links render a rich card.
- site.ts renderPage: <link rel=icon> (+ apple-touch-icon), theme-color, and
passes og.svg as the preview image on every page.
docs-site 11/11 pass; favicon.svg/og.svg + og:image/twitter:image verified in
the rendered output.
Every page now carries a header GitHub link and a footer with Docs, CLI
reference, GitHub (github.com/caelum0x/lawsynth), and Contact
(caelum0x42@gmail.com) links plus a one-line tagline and a mailto for
collaboration. Minimal footer/header styling added to the theme. docs-site 11/11
pass; footer verified in the rendered output.
New "Visualize" route renders a world's trajectory as an SVG chart, using the
app's existing createElementNS convention (as screens/render.ts does) with
chart-core's createChartModel + categoricalColor. Bundled deterministic RK4
samples (damped oscillator, Lotka-Volterra orbit) demo it offline with no engine;
an optional .viewer.json paste box round-trips a ViewerBundle via parseViewerBundle.
Honest states: empty → the demo curve with a "no engine required" info notice; a
bundle with a world but no trajectory → a "connect the engine (wasm)" warning and
NO fabricated curve; invalid JSON → alert; wrong-shape → the ViewerBundleError
message. Nothing throws to the UI. New visualize.test.ts (sample determinism,
chart model, full render path, honest states) via the fake-Document harness;
18 studio suites pass; typecheck clean.
Note: world-viewer's trajectoryPlotGeometry passes an inverted pixel range that
chart-core's createScale rejects (throws for all inputs) — worked around in-app
by building geometry with the validated primitives; the package bug is a
follow-up (out of this footprint).
Studio's analysis route went from a static card grid to a real feature. The grid
is now the report selector (wired to the route's :report segment); selecting a
report opens a live detail panel: paste `lawsynth <cmd> --json` (or "Load sample"
for a bundled deterministic constant), and Studio parses it via the api-client
parsers and renders the existing view models.
Detail views for all 7 report types — stability (flagship: fixed-point table with
classification badge + verdict + a ± b i eigenvalues), control, domains,
bifurcation, sensitivity, estimate, reduce. Honest states surfaced visibly:
center/marginal → warning badge + "Inconclusive (linearization cannot decide)";
empty result → normal "no fixed points in the searched region"; invalid JSON /
wrong shape → an alert with the SchemaValidationError message (never crashes).
Pure Document-taking renderers; re-render on interaction via the app's render().
New analysis_view.test.ts (~25 assertions across sample/verbatim/empty/invalid/
wrong-shape/bifurcation/estimate + an all-7-samples loop), backed by a
dependency-free fake Document. 17 studio suites pass; typecheck clean.
Adds an exhaustive command reference to the docs site — every one of the 44
subcommands dispatched in crates/lawsynth-cli/src/lib.rs, grouped into seven
pillars (Discover / Analyze / Control / Simulate & forecast / Share & report /
Workspace & runs / Plugins), each with its purpose, real flags + source-confirmed
defaults, a runnable example, and honest constraints (bifurcation needs a
parameterized world; reduce needs a Hurwitz point; koopman/sde/pde take datasets
not .lsworld and pde reads a headerless grid; network is correlational; stream is
batched re-discovery; plugin signing is HMAC not public-key). Commands enumerated
from the run() match arms — none invented; serve omitted (no dispatch). Lands in
a new "Reference" nav section. docs-site 11/11 tests pass; page rendered.
apps/playground/src/wasm_loader.ts: createWasmLoader(source, factory) adapts the
generated glue's createBindings (crates/lawsynth-wasm-bindings/web/lawsynth_wasm.mjs,
whose output already matches LawSynthWasmBindings key-for-key) into the
WasmRuntime loader, validating the required API. The factory is dependency-
injected — not imported — so the app carries no build-time dependency on the
compiled .wasm (produced by scripts/build-wasm.sh on a networked machine) and
the wiring is testable offline. defaultWasmSource() resolves the .wasm beside
the deployed glue.
5 tests (fake-factory round-trip through WasmRuntime.simulate, missing-API +
factory-failure rejection as wasm-unavailable/capability boundaries, source URL
resolution). Full playground suite green (12/12 files).
Production wiring is a copy step (glue + built .wasm beside the app + point the
loader at defaultWasmSource); documented in the crate README.
Now that these discovery engines have real CLI commands (e147df5), the site can
honestly show them. Adds an "Alternative discovery engines" subsection to the
Discover pillar with each real command (discover --method weak-form, lawsynth
koopman, lawsynth sde, lawsynth pde) and a one-line honest caveat per engine
(noise-robust/no-differentiation; operator-not-a-world; statistical estimator;
finite-difference grid). docs-site 11/11 tests pass; rendered output verified.
Makes the documentation site reflect the shipped product and adds a static
deployment path for the newly-registered lawsynth.dev on Cloudflare Pages.
Content (apps/docs-site/src/content.ts): sharpened landing page + two new pages —
/capabilities (Discover / Analyze / Control / Share, every claim tied to a real
CLI command or SDK call, with an honest-boundaries section) and /determinism
(bit-identical reproducibility as the contract, what it does and does not
guarantee). getting-started/concepts updated with pointers. All cross-checked
against crates/lawsynth-cli usage() + the Python/TS SDK surfaces; crate-internal
methods without a user-facing command were deliberately left off (no overclaim).
Deploy tooling:
- render-static.mjs — deterministic static-site emitter. The SSG is Node-free
(pure TS); this thin .mjs boundary imports the tested in-memory site model and
writes one self-contained index.html per page + sitemap.xml/robots.txt plus the
Cloudflare _headers (nosniff/DENY/strict CSP) and _redirects. Byte-identical
across runs. `.mjs` keeps @types/node out of the pure-TS build.
- wrangler.toml (pages_build_output_dir = public), npm run render / deploy,
DEPLOY.md (direct upload + Git-connected Pages settings), .gitignore for
generated public/. Origin stays https://lawsynth.dev.
- 2 new emitter tests (files emitted + determinism). docs-site 11/11 pass.
Also: full `cargo test --workspace` sweep is green (exit 0) across all crates.
Batch 11 of expansion-v2. Extends discovery to spatiotemporal + conservation
structure, adds principled hyperparameter selection, and surfaces analysis in
the web app. Deterministic/offline/std-only (Rust) or typed/tested (TS).
crates/lawsynth-pde (new): evolution-PDE discovery (PDE-FIND). Central-difference
spatial/time derivatives on the interior + differential-term library (uᵖ·D_m) +
STLSQ on flattened u_t. Recovers heat (0.2002·u_xx), advection (−0.801·u_x), and
Burgers (−1.000·u·u_x + 0.100·u_xx) from snapshots; two-mode fixtures break the
u/u_xx collinearity; a finer-grid test confirms O(dx²). 32 tests.
crates/lawsynth-invariants (new): conserved-quantity detection. H parametrized
over a library; conserved ⇔ ∇H·f=0; the SVD nullspace of the sampled
Lie-derivative matrix yields invariants (constant excluded, canonically
normalized). Recovers x²+y² energy, two independent invariants for a decoupled
system, y²−2cos x for the pendulum (trig basis), and honestly returns EMPTY for
a damped oscillator (no false positive). 21 tests.
crates/lawsynth-modelselect (new): time-series cross-validated hyperparameter
selection. Forward-chaining/rolling folds (no shuffling), discover-on-train +
simulate-on-test predictive scoring via lawsynth-score, full auditable table,
simpler-model tie-break. Selects degree 3 for cubic Duffing, degree 1 for a
linear system, degree 2 for logistic. 27 tests.
apps/studio: analysis module surfacing all seven engine reports (stability/
control/domains/bifurcation/sensitivity/estimate/reduce) as UI view models via
the api-client parsers, wired as a navigable route. Honest cases handled
(inconclusive classification, empty fixed-point set, null validation). 16 groups.
specs/{pde-discovery,invariant-detection,model-selection}: boundary specs.
Wave 9 — data quality, trust & monitoring:
CLI — lawsynth prep (smooth/resample/detrend/trim/drop-constant via preprocess)
moves a noisy model WEAK(R2=0.39)->GOOD(R2=0.95); lawsynth monitor (model-based
anomaly detection, robust MAD control limits) flags an injected shock as DRIFT at
the right time; forecast --confidence emits deterministic residual-bootstrap bands.
SDK — Study.prepare (cleaned Study), discover_ensemble -> Ensemble (per-term
selection-frequency + coefficient mean/std = robust vs unstable terms) with
forecast bands, Study.monitor -> MonitorReport. Three runnable examples.
Studio — Data Prep + Monitor screens (now 11 screens): interactive prep with
raw-vs-prepared overlay that promotes to the working dataset, and observed-vs-
predicted residual monitoring with a threshold + in-control/watch/drift verdict.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wave 8 — depth across four fronts:
Studio — @lawsynth/api-client gains the real discovery-run endpoints; the Studio
discovery flow now drives the LIVE client (submit -> bounded-poll -> getWorld ->
feed screens), with an in-memory fake transport for offline end-to-end tests.
Export — lawsynth export --format c|onnx|matlab. The C compiles clean and matches
the engine to ~1e-14; ONNX is an honest computation-graph JSON (each node mapped
to its standard ONNX op, DAG-interned, evaluator-verified); MATLAB .m emitted.
Notebook — WorldExplorerWidget: a self-contained embedded-JS widget that
re-simulates in-browser on slider drag (no kernel round-trip); factors each
discovered coefficient into a tunable parameter. study.discover().explore().
Performance — single-pass streaming CSV parser: 3.19x faster ingest (500k rows
224ms->70ms, 328 MiB/s; 1M rows 7.2M rows/s), byte-for-byte identical output
(equivalence-tested), plus streaming Read-based loaders + progress callbacks + a
scale benchmark.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wave 4 — compare what-ifs to decide:
CLI — lawsynth scenarios: define N named what-if scenarios (scheduled
interventions), compare final-state divergence from baseline in a table + a
self-contained multi-series HTML report (overlaid trajectories + legend).
lawsynth doctor: environment/health check with a real world round-trip self-test.
SDK — Study.add_scenario/compare_scenarios -> ScenarioComparison (table +
overlaid-SVG _repr_html_); a cohesive StudyDashboard in lawsynth-notebook that
composes equations/trajectory/frontier/regimes/uncertainty/scenarios into one
themed Jupyter view; Study._repr_html_ now renders the full dashboard when the
notebook package is present, degrading gracefully otherwise.
Studio — Scenario Board (9th screen): define scenarios, overlay trajectories
(multi-series chart + legend), baseline-divergence table, store-driven selection.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Product depth across all three surfaces (PRODUCT.md captures the vision):
CLI — new lawsynth-report crate (self-contained HTML reports with inline SVG
trajectory + phase-portrait charts) and five product commands: report, explain
(plain-language laws), compare (world diff), forecast (what-if interventions),
library (local world index). Demonstrated end-to-end on a damped oscillator.
SDK — high-level Study workflow (from_csv -> discover -> explain -> simulate/
forecast -> report -> save/load), stdlib HTML report generator, and notebook
rich _repr_html_ display. Quickstart example recovers the oscillator exactly
(R2=1.0) and writes a 30KB report.
Studio — 5 interactive screens (discovery canvas, equation explorer, regime
timeline, uncertainty lens, world lab) composing the shared TS packages through
a reactive state-store; typecheck-clean.
Also: benchmark execution deepened 9 -> 18 real cases (causal + regime families
now scored against ground truth); cross-service integration tests (gateway->
artifact proxy, scheduler<->worker lifecycle over real sockets).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>