read_request() in the Rust gateway's HTTP transport only ever looked at
Content-Length to size the request body. A chunked request (Transfer-Encoding:
chunked, no Content-Length) made content_length default to 0, so the body was
silently truncated to empty and forwarded to the backend while the real chunked
bytes were left unread on the connection — desynchronizing the next request
parsed from that same socket (request smuggling), or just silently dropping a
real client's upload with no error at all.
The sibling Python prototype (lawsynth_gateway/app.py) already rejects any
Transfer-Encoding header with 400 unsupported_transfer_encoding; the Rust
rewrite dropped that check. Add it back as a new ReadOutcome variant handled
in server.rs, with a regression test.
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>
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>
Batch 9 of expansion-v2. Makes the analysis layer user-reachable, adds two
model-use capabilities, and threads an analysis job through the hosted platform.
Deterministic/offline/std-only.
crates/lawsynth-mpc (new): successive-linearization LQR-MPC. Relinearizes each
step (analytic A=∂f/∂x, B=∂f/∂u), solves a local LQR (lawsynth-feedback),
applies the first clamped move, advances the nonlinear plant by RK4. Regulates a
forced pendulum to <1e-3, respects saturation, stabilizes a Van der Pol limit
cycle; per-step gain bit-identical to direct LQR on a linear plant. Honest that
it's LQR-MPC, not constrained QP-MPC. 18 tests.
crates/lawsynth-propagate (new): coefficient→forecast uncertainty. Delta method
Cov(x(t))≈S·Cov(θ)·Sᵀ via forward sensitivities, plus seeded Monte-Carlo over the
bootstrap ensemble. Delta matches the (t·x0·e^-θt)²·s² closed form to <1e-9;
delta≈MC at small σ and honestly diverges (asymmetric MC band) at large σ.
covariance_from_ensemble closes the bootstrap→bands pipeline. 34 tests.
crates/lawsynth-cli: new analysis subcommands bifurcation/sensitivity/estimate/
reduce (shared linearize-at-fixed-point helper derives A/C/B from a world), with
honest guardrails (bifurcation needs a parameterized law; reduce needs a Hurwitz
point; estimate pole placement is single-output). 115 lib + 7 integration tests.
services/worker + scheduler: Job::AnalyzeStability + JobOutput::Stability threaded
through every worker match site (job/execute/artifacts/errors/http_error) and
proven first-class in the scheduler via an end-to-end submit→lease→execute test.
Gateway HTTP→Job decode noted as an honest follow-up. Worker 64 + scheduler tests.
specs/{model-predictive-control,forecast-uncertainty}: boundary specs.
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>
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>