31 Commits

Author SHA1 Message Date
7dfbb5df69 fix(python): make documented maturin install path work
The `maturin develop` path documented in the README and installation guide
failed: python/lawsynth/ has no Cargo.toml and pyproject.toml carried no
manifest-path, so maturin had nothing to build. Point maturin at the
lawsynth-python crate in the Cargo workspace via manifest-path, and document
scripts/build-native.sh as the maturin-free / offline fallback (both produce
an import-compatible lawsynth._native).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:01:01 +03:00
a3b1ef8de1 feat(sdk): Python + TS clients for invariants and analyze
Completes the "go all" reach: the standalone `invariants` command and the new
one-shot `analyze` are now first-class in both SDKs.

python/lawsynth analysis.py: invariants() and analyze() methods + frozen
dataclasses (Invariant/InvariantReport, Skipped, AnalyzeReport). _parse_analyze
composes the existing _parse_stability/_parse_lyapunov/_parse_invariants over the
sub-objects (asserted identical to the standalone parsers) and narrows a
{skipped:true} slot to Skipped. analyze/invariants attached to Study/
DiscoveryResult. test_analysis 66 passed; full suite 160 passed / 9 skipped.

packages/world-schema + api-client: InvariantReport + AnalyzeReport interfaces,
parseInvariantReport/parseAnalyzeReport (+ validators, isSkipped guard).
parseAnalyzeReport reuses the standalone validators and re-paths child issues.
api-client 34 pass; world-schema green.

Keys confirmed against crates/lawsynth-cli/src/{invariants,analyze}.rs render_json
AND verbatim CLI capture. Honest note: invariants --box is a single shared LO:HI
interval (vs analyze's per-state box) — the clients encode each correctly.
2026-08-18 22:59:17 +03:00
1442b15920 feat(sdk): Python + TS clients for the koopman / sde / pde discovery engines
Surface parity for the discovery engines exposed on the CLI in e147df5.

python/lawsynth analysis.py: koopman()/sde()/pde() client methods over the CLI
--json, with frozen dataclasses mirroring the exact engine keys (discrete +
continuous eigenvalues, drift/diffusion laws + binned table, PDE term list) and
honest per-method docstrings (operator-not-a-world; statistical estimator;
finite-difference grid). Dep-free parse tests + skip-guarded live tests;
test_analysis 54 passed, full SDK suite 148 passed / 9 skipped.

packages/world-schema + api-client: typed KoopmanReport/SdeReport/PdeReport
interfaces + runtime parsers (parseKoopmanReport/parseSdeReport/parsePdeReport,
KoopmanEigenvalue adds `modulus`), method-token constants, malformed-rejection
tests. world-schema green; api-client 30 pass.

All keys confirmed against crates/lawsynth-cli/src/{koopman,sde,pde}.rs
render_json AND verbatim runtime capture. No shape differed from source.
2026-08-18 21:18:09 +03:00
e5fdd737ab feat: Python global-dynamics reach + cross-crate integration suite
Batch 14 (partial — TS reach deferred to after a session-limit reset).

python/lawsynth analysis.py: lyapunov/basins/network/mpc client methods over the
CLI --json (single source of truth), with frozen dataclasses mirroring the exact
engine keys and honest per-method docstrings (lyapunov time-averaged; basins
fixed-point attractors only; network correlational; mpc needs a stabilizable
linearization). 9 new dep-free parse tests; full SDK suite 139 passed / 9 skipped.

crates/lawsynth-integration (new, test-only, publish=false): cross-crate
end-to-end tests proving the pipeline composes — discovery→stability finds the
stable spiral, discovery→lyapunov is dissipative (sum≈−0.3 = trace),
stability↔lyapunov agree (stable ⇔ negative largest exponent), a conservative
system is simultaneously a center + energy invariant + zero exponents,
egraph simplification preserves dynamics to 1e-9, and the discover→render chain
is deterministic. 6 tests.
2026-08-18 20:19:53 +03:00
e841852b59 feat: product reach — CLI global-dynamics commands, server analysis endpoint, e2e example
Batch 13 of expansion-v2. Makes the global-dynamics/control engine reachable
from the CLI and the hosted API, and adds a verified end-to-end scenario.

crates/lawsynth-cli: new `lyapunov` (spectrum + KY dimension + chaos flag),
`basins` (attractors + basin fractions + escaped/undetermined), `network`
(directed coupling edge list), and `mpc` (regulate to a setpoint) commands —
all with --json and honest caveats (lyapunov time-averaged; basins fixed-point
attractors only; network correlational-not-causal; mpc successive-linearization
LQR). 135 lib + 9 new integration tests.

python/lawsynth-server: POST /v1/worlds/{id}/analysis/stability mirroring the
simulations resource (auth scope, idempotency key, events). Reaches the engine
the same way the SDK does (native build_world -> save -> CLI-backed stability),
not re-implemented. Honest cases: inconclusive kept, empty box is 200, bad
request 422, engine-absent 503, engine-failure 5xx. 36 passed / 5 skipped
(engine absent), 39 passed with the engine.

examples/20-stability-and-forecast: verified scenario — a conservative oscillator
discovered, then stability finds a center (inconclusive) that invariants explains
via H = 0.25·imbalance² + mid², then forecast. Real captured output; matches the
gallery format; pytest examples 21/21. Honest that bifurcation/sensitivity need
declared parameters.
2026-08-18 18:11:36 +03:00
220552d530 feat: SDE discovery + discrete-time control + Python/TS reach
Batch 10 of expansion-v2. Extends discovery into stochastic dynamics, adds
discrete-time control, and completes the Python/TS reach for the analysis
commands. Deterministic/offline/std-only (Rust) or typed/tested (Python/TS).

crates/lawsynth-sde (new): stochastic law discovery via Kramers-Moyal
conditional moments. Drift a(x)=E[ΔX|x]/Δt and diffusion b²(x)=E[ΔX²|x]/Δt
estimated by binning, occupancy-gated, then sparse-fit to a polynomial library.
Recovers OU (linear drift, constant diffusion), GBM (state-dependent quadratic
diffusion), and double-well (cubic drift) from seeded Euler-Maruyama paths.
Reports raw binned table + fitted laws; honest that it's a statistical
estimator (accuracy scales with path length / bin occupancy). Closes the loop
with the existing SDE simulator. 29 tests.

crates/lawsynth-discrete (new): discrete-time DLQR + Kalman/observer. DARE by
deterministic value iteration (reused on the dual for the filter); discrete
stability = spectral radius < 1, verified via koopman::eigen. DARE residuals
1e-12..5e-14, stabilizes an open-loop-unstable plant, matches the analytic
scalar P=2+√5 case. 34 tests.

python/lawsynth analysis.py: bifurcation/sensitivity/estimate/reduce client
methods over the CLI --json (single source of truth). test_analysis 36 passed;
full SDK suite 130 passed. Honest engine constraints surfaced (pole placement
needs observability; reduce needs a diagonalizable Hurwitz linearization).

packages/world-schema + api-client: typed models + parsers for the four new
analysis-command JSON shapes, verbatim-CLI fixtures, token strings confirmed
against source. api-client 24 tests.

specs/{sde-discovery,discrete-time-control}: boundary specs with honest limits.
2026-08-18 17:21:57 +03:00
fab9a4a45a feat: reach + performance + docs — Python analysis client, parallel eval, sensitivity, guide
Batch 7 of expansion-v2. Extends the product across surfaces and adds an
analysis primitive. Deterministic/offline/std-only (Rust) or graceful-absence
(Python).

python/lawsynth analysis.py (new): Python client for the engine's stability,
control, and domains analyses — shells out to the lawsynth CLI (--json) and
parses to typed dataclasses. No numerics re-implemented in Python; the Rust
engine is the single source of truth. Locates the binary like the benchmarks,
raises MissingBinaryError/CliError honestly, and is fully parse-testable
offline. 20 tests; full SDK suite 114 passed.

crates/lawsynth-features: opt-in std::thread-parallel feature-library
evaluation, bit-identical to serial for ALL thread counts (row-chunked via
thread::scope, ordered assembly, no parallel float reduction). Verified via
f64::to_bits across {1,2,3,4,7,8} threads x 10 library variants x uneven row
counts. Measured 3.6x at 8 threads; honestly sublinear (allocation-bound,
~few-thousand-row crossover). 28 tests + benchmark.

crates/lawsynth-sensitivity (new): forward sensitivity analysis. Integrates the
variational equations Ṡ_j = J_x·S_j + f_θj (J_x from the analytic Jacobian, f_θ
by symbolic differentiation) on the augmented system with fixed-step RK4.
Analytic check to <1e-6; finite-difference cross-check at 1e-6 for every
parameter on logistic + Lotka-Volterra. 22 tests.

docs/guide (new): verified end-to-end guide — getting-started, workflow
(discover→simplify→stability→control→export→validate→uncertainty), and a
determinism demo. All 17 documented commands run exit-0 via run_all.sh; honest
about real behaviors (already-minimal law simplifies to 0 nodes saved, CLI
bootstrap doesn't surface per-coef intervals, center points are inconclusive).
README links the guide.

specs/{parallel-evaluation,sensitivity-analysis}: boundary specs.
2026-08-18 16:14:46 +03:00
1c96065a07 feat: v2-A/v2-B — analytic Jacobian, SINDYc control, template priors, tracking interop
Batch 4 of expansion-v2. All deterministic/offline/std-only (Rust) or
graceful-absence (Python), with honest boundary specs.

crates/lawsynth-jacobian (new): symbolic analytic Jacobian J[i][j]=∂f_i/∂x_j
from a discovered vector field's expression trees, for stiff integration and
local stability. Exact sum/product/quotient/chain/power rules over the expr IR;
a non-differentiable node is a typed error, never a silent zero (its power rule
also fixes a NaN the expr crate's naive log-based rule hits on negative bases).
Symbolic result cross-checked against lawsynth-differentiate finite differences
to <=1e-6. 24 tests.

crates/lawsynth-control (new): SINDYc controlled discovery for forced systems
ẋ=f(x,u). Augmented library Θ(x,u) via lawsynth-features (control-only and
state×control cross terms); targets from differentiating a state-only
sub-dataset so controls are never differentiated and never predicted. Recovers
a forced oscillator to ~1e-5; a states-only refit leaves control variance
unmodelled (~8e6x worse RSS), and a constant control is honestly unidentifiable
(persistent-excitation limit). 25 tests.

crates/lawsynth-discovery template priors: declarative grammar constraints
(max degree, allowed variables/kinds, forbid interactions, max active terms,
require a kind) applied as a deterministic hard filter over candidate terms
before the sparse solve, with a full drop report. Default None is byte-identical
to prior behavior; a prior that excludes the truth yields an honest zero law,
never fabricated structure. 29 tests.

python/lawsynth tracking.py (new): MLflow / W&B experiment-tracking interop.
Dep-free deterministic RunRecord anchor (sorted-key JSON, byte-stable) plus
log_to_mlflow/log_to_wandb that lazily import the backend and raise
MissingDependencyError (subclasses ImportError) when absent. Only logs metrics
that genuinely exist on the result — no fabricated mdl/seed/timing; callers pass
measured values via extra_metrics. 21 tests + 2 honest skips; SDK suite 94 pass.

specs/{analytic-jacobian,controlled-discovery,template-priors}: boundary specs.
2026-08-18 15:21:13 +03:00
2335e9556d feat: v2-A engine breadth — structural reductions, MDL/Pareto, differentiable export, SRBench families
Batch 3 of the expansion-v2 roadmap, all deterministic/offline/std-only with
honest capability boundaries.

crates/lawsynth-reduce (new): deterministic symmetry & separability detection.
Numerical-derivative probe (finite differences replace AI-Feynman's trained NN
gradients) over a reconstructed Cartesian grid; additive/multiplicative
separability + difference/sum/product/ratio symmetries. Every detection is a
HYPOTHESIS verified by reconstruction residual, never a proof; non-grid data is
honestly rejected (NotReconstructed). 17 tests.

crates/lawsynth-score: two-part MDL objective (L_data + L_model in nats) and
O(n log n) pareto_front_2d (sort-then-sweep), verified equal to the O(n^2)
front across 12 deterministic sets. +5 tests; crate fmt-normalized to config.

python/lawsynth export.py (new): to_sympy/to_torch/to_jax + dep-free
numeric_derivatives anchor. Constants+params hoisted into one trainable vector
so autograd reaches every coefficient (Neural-ODE vector field). Backends
absent here degrade gracefully (MissingDependencyError subclasses ImportError).
Faithful to native simulate at 1.1e-16. 10 tests + 6 honest skips.

benchmarks: SRBench Feynman (15: 12 static algebraic relations as honest
capability-boundaries, 3 dynamics-framed ODEs executed at R2~=1.0) and
black-box (4 systems, predictive R2 + parsimony, no ground truth) families.
Fixes a pre-existing _runner.py failure where Strogatz cases leaked into the
legacy contract suite. 31 benchmark tests.

specs/structural-reductions: boundary spec (detection-is-a-hypothesis contract).
2026-08-18 15:04:43 +03:00
2b734f3a20 feat(v2-B): scikit-learn adapter (LawSynthDynamics/Regressor/Transformer)
The #1 adoption lever from the competitive analysis: a sklearn-compatible package
(python/lawsynth-sklearn) so the scikit-learn ecosystem adopts LawSynth with
near-zero switching cost (why gplearn/PySINDy win mindshare).
- LawSynthDynamics: fit(X, t=)/predict/simulate/score/equations over the real
  Study discovery; full get_params/set_params/__sklearn_tags__/NotFittedError.
- LawSynthRegressor (RegressorMixin), LawSynthTransformer (feature library +
  deterministic decorrelation prune), parsimony='auto' (lambda = Cov/Var).
- Inherits sklearn mixins when present; faithful standalone fallback otherwise.
Demo recovers an oscillator R2=0.999996; 50 tests pass (7 sklearn-integration
skip cleanly when sklearn absent). Deterministic, offline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 02:34:31 +03:00
ebd7076388 feat(P6): collaboration clients — SDK Client, api-client, Studio review screen
Completes P6 end-to-end (backend endpoints + now clients):
SDK — Client gains 9 collaboration methods (members/revisions/annotations/review/
merge); example drives the full loop offline in-process (roles -> submit ->
revisions -> annotate -> review/approve -> merge) with viewer-403 + owner-only-
approve enforced.
Studio — 12th screen (Collaboration & Review): members+roles, revision lineage,
annotations, role-gated review actions; @lawsynth/api-client CollaborationApi +
InMemoryCollaborationTransport. Typecheck clean; api-client 15 + studio 15 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 02:30:18 +03:00
12af3b956c feat(P6/P7): collaboration workspaces + streaming online discovery
Completing the next-phase specs (P6-P10 now all coded):

P6 Collaboration (specs/collaboration) — project roles owner/editor/viewer
enforced server-side at every mutation (viewer 403, owner-only membership +
approval); immutable world revision lineage (content hash + derivation
discovered/edited/composed/imported + monotonic number, retrievable);
annotations + review state machine (draft->in_review->approved|rejected, audit
events to the bus); deterministic index merge that returns conflicts rather than
overwriting. +15 API tests (168 pass native-absent).

P7 Streaming discovery (specs/streaming-discovery) — CLI lawsynth stream + SDK
Study.stream/stream_discover: explicit window policy (sliding/growing, time
units, bounded memory), sustained-drift-triggered re-discovery (distinguishes
outlier from regime change), change records with per-law term diffs, byte-for-
byte replay determinism. Honestly documented as batched re-discovery, not
incremental. Regime switch at t=8 detected with exact differing terms. +CLI/SDK
tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 01:50:26 +03:00
29fe90834c feat(P8/P9/P10): plugin marketplace, model governance, hosted-platform tenancy
Implementing the next-phase boundary specs as real, tested code:

P8 Plugin marketplace (specs/plugin-marketplace) — .lsplugin packages (checksum
manifest + package hash), mirrorable TSV registry, honest keyed-HMAC signing
(documented as symmetric MAC, not public-key), capability grants enforced at a
single seam (declared AND granted), non-destructive install; CLI plugin
pack/install/list/verify/remove/registry. pack->sign->install->verify->tamper-
fails demonstrated.

P9 Governance (specs/model-governance) — model cards (Rust render_model_card +
SDK Study.model_card orchestrating explain/validate/backtest/ensemble, honest
'Not measured' omissions), content-addressed lineage with verify_reproducible(),
tamper-evident hash-chained audit log (content ordinals, no clock). Added
Study.validate() holdout.

P10 Hosted platform (specs/hosted-platform) — per-tenant isolation tests on every
resource + FIXED a real artifact cross-tenant download leak (owner check);
per-tenant quota -> 429 + append-only metering log + GET /v1/usage; honest HMAC
SSO seam at the gateway (tenant token exchange, rejects forged/cross-tenant).

Rust workspace green (60 plugin/report tests); API 153 pass native-absent (+22);
gateway 14 (+7); SDK governance 16.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 01:27:37 +03:00
7087e7925e feat(product): symbolic simplify (egraph), model compose/edit, hosted-deploy
Wave 11 — the three candidates:
CLI — lawsynth simplify (egraph equality saturation extracts the lowest-cost
EQUIVALENT law; proves equivalence by simulating both worlds, deviation ~0;
honest 'already minimal' on sparse discovered worlds); lawsynth compose (union
two worlds into a coupled system, namespacing collisions) and lawsynth edit
(immutable rename/set-param/drop-law/scale-law, re-validated).

SDK — lawsynth.simplify / World.simplify (stdlib expand/fold/combine +
equivalence verify), lawsynth.compose, World.rename/set_parameter/drop_law/
scale_law. Two runnable examples.

Deploy — a verifiable hosted-deploy story: deploy/quickstart (config-validated
minimal api+gateway) + docs/self-hosting/quickstart.md (real curl/Client run
loop), after fixing genuine drift in the compose files (SQLite URL the API
actually accepts, correct token env, object root, health endpoints, native
build step) — verified end-to-end from source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 01:08:14 +03:00
8bae186f19 feat(product): rolling-origin backtest, portable workspaces, cookbook
Wave 10 — rigor & sharing:
CLI — lawsynth backtest (rolling-origin/walk-forward: N origins x horizon,
per-state RMSE/MAE/R2 + skill-vs-horizon decay + verdict, --html report);
lawsynth workspace export/import (portable .lsworkspace archive: world bytes +
provenance + runs, per-entry SHA-256 integrity, non-destructive import).

SDK — Study.backtest -> Backtest (skill-vs-horizon decay, deterministic);
lawsynth.Project workspace persisting in the CLI library.tsv format (verified
bidirectional CLI<->SDK interop) with export/import archives.

Docs — a real cookbook (10 task recipes, CLI + SDK each) + 3 end-to-end
tutorials, verified against the shipped source (two-intervention-semantics and
preset-vs-recipe differences called out).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 23:46:25 +03:00
945f20fae9 feat(product): data prep, ensemble uncertainty, model monitoring across surfaces
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>
2026-08-17 23:33:03 +03:00
68f07af53b feat(product): Studio↔live services, C/ONNX/MATLAB export, notebook widget, 3x faster ingest
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>
2026-08-17 23:09:54 +03:00
035cebdcf1 feat(product): discovery-as-a-service — run workflow + Python service Client
Wave 7 — the backend ties together into one working loop:
API — POST /v1/runs executes a real discovery run state machine (queued ->
running -> succeeded|failed) via the native engine on a worker thread, stores the
discovered world, computes a real result summary (mse/complexity/#laws), and
emits RunQueued/Started/Succeeded/Failed to the event bus (streamed by
/v1/events). GET /v1/runs/{id} (status+summary) and /v1/runs/{id}/world flow
straight into the existing explain/report endpoints. Honest 503 when native
absent; bearer-auth + tenant-scoped + idempotent.

SDK — lawsynth.Client (stdlib urllib) drives the loop: submit_discovery -> wait
-> world -> explain/forecast/report, with a real HTTP transport and an in-process
WSGI transport so it runs fully offline. Demonstrated end to end.

API 98 -> 134 tests (native absent); client 18 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 22:30:54 +03:00
8e6d7f1cb0 feat(product): experiment tracking, data profiling, brand-themed reports
Wave 6 — workflow & polish:
CLI — lawsynth runs (experiment tracking; content-derived ids, no clock, so
runs are deterministic and machine-stable): discover --track records data hash/
columns + config + result summary; runs list/show/compare (config + result
deltas). lawsynth profile <csv>: per-column stats, time monotonicity/regularity,
and quality warnings (outliers, gaps, constant columns) before you discover.

SDK — lawsynth.profile / Study.profile -> DataProfile (stats + time profile +
warnings, brand-themed _repr_html_).

Reports — a real brand Theme (palette + serif/sans/mono stacks from
typography.md) applied across report/comparison/scenarios HTML + SVG (terracotta
primary series on warm paper). Backward-compatible: *_with_theme fns added,
ReportOptions.theme defaults to brand; CLI + 30 report tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 22:15:22 +03:00
edaf16b08b feat(product): domain presets/recipes, provenance workspace, product README
Wave 5 — approachability & front door:
CLI — discover --preset (physics/ecology/epidemiology/finance/general) + presets
catalog; explicit flags override presets. library becomes a provenance-aware
workspace: world/data content hashes, columns, config, tags captured on add;
library search + compare over the workspace (backward-compatible index).

SDK — lawsynth.recipes (parity with CLI presets) + Study.discover(recipe=...,
**overrides); three runnable domain demos. Van der Pol shows the payoff: general
recipe misses the cubic term, mechanics recipe recovers -x+v-x^2*v (R2 0.99995).

Docs — a real product README (hero + Lorenz GIF, CLI+Python quickstart, feature
matrix by product loop, surfaces + HTTP endpoints, honest tone); refreshed
getting-started pages and a CHANGELOG Unreleased section. All flags verified
against the shipped CLI usage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 21:53:47 +03:00
3c257cc9ef feat(product): scenarios & decisions across CLI, SDK, notebook, Studio
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>
2026-08-17 21:45:50 +03:00
aff4eea206 feat(product): reproducible pipeline, richer reports, data import, Studio 8 screens
Wave 3 product depth:
CLI — lawsynth pipeline <config.toml>: declarative ingest->discover->validate->
report/export chain, byte-reproducible, --example scaffold. Reports gain fit-vs-
observed + residual strips (report --data), regime timelines, uncertainty bands,
and compare --html side-by-side diffs (all self-contained, no external assets).

SDK — data import: lawsynth.load_source / Study.from_source bridge the connectors
library (filesystem, http verified; optional drivers degrade cleanly) into the
discovery loop, coercing numerics at the SDK boundary.

Studio — 3 more screens (data lens, structure map, export) for 8 total, a
screen-switcher home + registry-driven nav, cross-screen selection through the
shared state-store; fixed a pre-existing inverted-y chart-scale bug.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 21:36:24 +03:00
13d696183d feat(product): ship report/explain/compare/forecast, Study SDK, Studio screens
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>
2026-08-17 21:05:39 +03:00
bad0bc8d76 fix(connectors): correct aspirational HTTP CSV ingestion test to real contract
test_http_csv_is_streamed_coerced_and_numeric_validated asserted three behaviors
the connectors layer deliberately does NOT provide: numeric coercion of CSV
(contradicts the documented no-coercion contract and test_s3's string assertion),
loopback reads without the SSRF opt-in, and an ETag on read batches (only inspect()
surfaces it; the fixture has no HEAD). Rewritten to assert the real contract:
faithful string records + private-network opt-in + numeric=True rejecting textual
CSV. Repo now has zero failing tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 20:31:13 +03:00
b011dce423 test+config: connector test suite + service config/docs (manifest files)
Connectors: 22 real pytest modules (186 pass / 7 optional-dep skips) exercising
every connector's dependency-free surface + missing-driver degradation; SSRF
guard verified; errors_connector.py as a thin re-export (no forked taxonomy).
Services: config/{dev,staging,prod,test,limits,logging}.yaml + docs/*.md for
api/gateway/scheduler/worker, mapped to the real config structs; gateway/scheduler
Dockerfiles + scheduler .env/README. All YAML validated.

Closes 66 manifest files (gap 175->109). No source behavior changed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 19:23:14 +03:00
345faa9de1 build: add maturin-free native extension build helper
Adds python/lawsynth/scripts/build-native.sh which builds the lawsynth-python
cdylib via cargo and installs it as the package's _native module under the
interpreter's ABI suffix — the same artifact maturin produces, but usable on
toolchains without maturin (air-gapped CI). Unblocks the Python native surface
(python/lawsynth: 22 tests) and the native conformance/e2e legs. The built .so
stays gitignored. Also stages Cargo.lock for the discovery opt/causal deps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 19:07:30 +03:00
ac66c5c8f1 batgod 2026-08-17 13:40:09 +03:00
9a25989a70 f life 2026-08-16 23:40:41 +03:00
5828d99939 dragon warrior 2026-08-16 22:04:11 +03:00
6997f22be0 dr doom 2026-08-16 21:04:23 +03:00
6a9ce627e0 asdoruyu 2026-08-16 20:29:23 +03:00