caelum0x ac68067b17 fix(release): correct crates.io repository URL and gate internal crates from publish
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>
2026-10-15 16:53:00 +03:00
..
2026-08-17 13:40:09 +03:00
2026-08-17 13:40:09 +03:00
2026-08-17 13:40:09 +03:00
2026-08-17 13:40:09 +03:00
2026-08-17 13:40:09 +03:00
2026-08-17 13:40:09 +03:00
2026-08-17 13:40:09 +03:00

LawSynth artifact service

lawsynth-artifact-service is a local-first, content-addressed store for LawSynth artifacts. Objects are identified by their SHA-256 digest, stored durably through lawsynth-store's LocalStore, and served either as an in-process library or over a small dependency-free HTTP/1.1 transport. Every write records its checksum, size, content type, and optional retention; every read re-verifies integrity.

The crate is a library first (ArtifactService) with an optional network layer (ArtifactServer). Routing is a pure function of (service, now, request), so the whole API is testable without opening a socket. No async runtime, HTTP framework, or database engine is linked.

Boundaries

  • Trusts only the local caller. The LocalOnlyAuthorizer accepts a single local principal; authentication and remote principals belong to a separate, explicitly built adapter. See docs/security.md.
  • Serves HTTP/1.1 only. gRPC, queues, streaming, and uploads to remote object stores are reported as NetworkSurface::NotImplemented rather than stubbed.
  • Enforces compiled-in resource ceilings (config/limits.yaml). Limits gate admission; they are not OS-level quotas.
  • The HMAC BundleAuthenticator protects bytes a caller already controls; it is not a signed-bundle format or a defense against a malicious storage actor.

CLI

lawsynth-artifact serve <root> <addr>                 # HTTP/1.1 over the local core
lawsynth-artifact health <root>                       # print catalog + capacity summary
lawsynth-artifact gc <root> <unix-seconds> [--dry-run] # sweep expired artifacts

Example:

lawsynth-artifact serve ./.lawsynth/artifacts 127.0.0.1:8080
lawsynth-artifact health ./.lawsynth/artifacts
lawsynth-artifact gc ./.lawsynth/artifacts 1723900000 --dry-run

serve prints one startup line to stderr and then blocks, handling one request per connection on a thread-per-connection model.

HTTP surface

See docs/api.md. In brief: POST /artifacts, GET /artifacts/{id}, DELETE /artifacts/{id}, GET /artifacts/{id}/metadata, the POST /uploads … PUT /uploads/{id}/parts/{n} … POST /uploads/{id}/complete multipart flow, POST /gc, and GET /health.

Configuration

Resource limits and per-environment profiles live under config/ (limits.yaml, development.yaml, test.yaml, staging.yaml, production.yaml, logging.yaml). They document the fields of ArtifactConfig (src/config.rs); the current CLI applies the built-in defaults reproduced in limits.yaml. No environment variables are read — see .env.example.

Build and test

cargo build --release -p lawsynth-artifact-service
cargo test -p lawsynth-artifact-service

Further reading: docs/architecture.md, docs/api.md, docs/operations.md, docs/failures.md, docs/security.md.