Skip to content

Commit e77a727

Browse files
committed
chore: sync local main without generated artifacts
1 parent 56e4637 commit e77a727

File tree

2,614 files changed

+149697
-308263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,614 files changed

+149697
-308263
lines changed

.dockerignore

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
**/target/
2-
.git/
3-
.planning/
4-
tests/
5-
mesher/mesher
6-
node_modules/
1+
**
2+
!Cargo.toml
3+
!Cargo.lock
4+
!compiler/**
5+
!cluster-proof/**
6+
7+
cluster-proof/cluster-proof
8+
compiler/**/target/
79
*.log
810
.DS_Store

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66

77
tools/editors/vscode-mesh/node_modules/
88
tools/editors/vscode-mesh/*.vsix
9+
tools/editors/vscode-mesh/.vscode-test/
10+
tools/editors/vscode-mesh/out/
911

1012
# Root
1113
/node_modules/
1214

1315
# Frontend
1416
frontend/node_modules/
1517
frontend/dist/
18+
packages-website/.svelte-kit/
1619

1720
# Website
1821
website/node_modules/
@@ -23,6 +26,9 @@ website/docs/.vitepress/cache/
2326
reference-backend/reference-backend
2427
mesher/mesher
2528
benchmarks/*/benchmark
29+
cluster-proof/cluster-proof
30+
tiny-cluster/tiny-cluster
31+
tiny-cluster-prefered/tiny-cluster
2632

2733
# Temp probe/scratch directories (created during debugging)
2834
/.tmp/
@@ -45,6 +51,7 @@ benchmarks/*/benchmark
4551
/.gsd/state-manifest.json
4652
/.gsd/metrics.json
4753
/.gsd/completed-units.json
54+
/.gsd/reports/
4855

4956
# ── GSD baseline (auto-generated) ──
5057
.DS_Store

.gsd/DECISIONS.md

Lines changed: 195 additions & 0 deletions
Large diffs are not rendered by default.

.gsd/KNOWLEDGE.md

Lines changed: 135 additions & 1 deletion
Large diffs are not rendered by default.

.gsd/OVERRIDES.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# GSD Overrides
2+
3+
User-issued overrides that supersede plan document content.
4+
5+
---
6+
## Override: 2026-03-31T20:32:50.863Z
7+
8+
**Change:** Im still noticing code like this in the tiny cluster code
9+
10+
pub fn normalize_failover_delay_ms(delay :: Int) -> Int do
11+
if delay <= 0 do
12+
0
13+
else if delay > 5000 do
14+
5000
15+
else
16+
delay
17+
end
18+
end
19+
20+
pub fn configured_failover_delay_ms() -> Int do
21+
normalize_failover_delay_ms(Env.get_int("TINY_CLUSTER_WORK_DELAY_MS", 0))
22+
end
23+
24+
fn maybe_delay_work_execution() do
25+
let delay = configured_failover_delay_ms()
26+
if delay > 0 do
27+
Timer.sleep(delay)
28+
0
29+
else
30+
0
31+
end
32+
end
33+
34+
This should NOT be required to be done by the user. It should also be part of the language
35+
**Scope:** resolved
36+
**Applied-at:** M046/S03/T03
37+
38+
---
39+
40+
## Override: 2026-04-01T16:34:24.487Z
41+
42+
**Change:** Why am i STLL seeing this syntax in @tiny-cluster/ and @cluster-proof/ esmpels??
43+
44+
I SHould NOT be seeing this
45+
@cluster pub fn execute_declared_work(_request_key :: String, _attempt_id :: String) -> Int do
46+
1 + 1
47+
end
48+
49+
it SHOULD be liek this instead
50+
@cluster
51+
pub fn add() -> Int do
52+
1 + 1
53+
end
54+
**Scope:** resolved
55+
**Applied-at:** M047/S05/T06
56+
57+
---

.gsd/PROJECT.md

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,48 @@
22

33
## What This Is
44

5-
Mesh is a programming language and backend application platform repository aimed at being trustworthy for real backend work, not just toy examples. The repo contains the compiler, runtime, formatter, LSP, REPL, package tooling, docs site, package registry, package website, and two dogfood applications: `reference-backend/` as the narrow proof surface and `mesher/` as the broader pressure test.
5+
Mesh is a programming language and backend application platform repository aimed at being trustworthy for real backend and distributed-systems work, not just toy examples. The repo contains the compiler, runtime, formatter, LSP, REPL, package tooling, docs site, package registry, package website, and dogfood applications used to pressure-test the language.
6+
7+
The current planning wave is M047. M046 already proved route-free clustered work strongly enough that `tiny-cluster/`, rebuilt `cluster-proof/`, and `meshc init --clustered` could stay tiny and runtime-owned; M047/S04 completed the hard public cutover to source-first `@cluster` declarations, S05 rebaselined the public clustered surfaces onto ordinary function names and shipped the SQLite Todo starter, S06 closed the docs/migration/assembled-proof layer with `bash scripts/verify-m047-s06.sh` as the retained closeout rail, S07 shipped the real `HTTP.clustered(...)` compiler/runtime seam with live two-node HTTP proof, and S08 adopted that shipped wrapper into the Todo starter, public docs, and assembled closeout rails without displacing the canonical route-free `@cluster` story. The repo now has a truthful clustered-route wrapper implementation plus native and Docker proof that the Todo starter's selected read routes execute through explicit-count clustered route wrappers end to end.
68

79
## Core Value
810

9-
Dogfood friction should turn into honest platform improvements: when Mesh or its surrounding delivery/tooling/editor/package surfaces hit a real limitation, the repo should fix that limitation at the source and then prove the repaired path end to end instead of carrying permanent folklore or artifact-only confidence.
11+
If Mesh claims it can cluster, route work, survive node loss, and report truthful runtime status, those claims must be proven through small docs-grade examples where the language/runtime owns the magic instead of the example app reimplementing distributed behavior — including the syntax users actually write.
1012

1113
## Current State
1214

1315
Mesh already ships a broad backend-oriented stack:
1416
- Rust workspace crates under `compiler/` for lexing, parsing, type checking, code generation, runtime, formatter, LSP, REPL, package tooling, and CLI commands
1517
- native compilation to standalone binaries
1618
- runtime support for actors, supervision, HTTP, WebSocket, JSON, database access, migrations, files, env, crypto, datetime, and collections
17-
- dogfooded applications: `reference-backend/` and `mesher/`
18-
- a real package registry service in `registry/`, a public packages website in `packages-website/`, and a VS Code extension in `tools/editors/vscode-mesh/`
19+
- a distributed runtime surface with node start/connect/list/monitor, remote spawn/send, continuity, authority, and clustered-app tooling
20+
- dogfooded applications: `reference-backend/` as the narrow backend proof surface, `mesher/` as the broader pressure test, `tiny-cluster/` as the local route-free clustered proof, and `cluster-proof/` as the packaged route-free clustered proof
21+
- a real package registry service in `registry/`, a public packages website in `packages-website/`, and editor surfaces including the VS Code extension and repo-owned Neovim pack
22+
23+
Recent distributed-runtime state:
24+
- M039 proved automatic cluster formation, truthful membership, runtime-native internal balancing, and single-cluster degrade/rejoin on a narrow proof app
25+
- M042 moved single-cluster keyed continuity into `mesh-rt` behind a Mesh-facing `Continuity` API
26+
- M043 proved cross-cluster primary/standby continuity, bounded promotion, and packaged same-image failover/operator rails
27+
- M044 productized clustered apps: manifest opt-in, runtime-owned declared-handler execution, built-in read-only operator/CLI surfaces, `meshc init --clustered`, bounded automatic promotion/recovery, and a rewritten `cluster-proof` on the public clustered-app contract
28+
- M045 simplified the clustered example story around runtime-owned bootstrap, runtime-chosen remote execution, automatic failover, and scaffold-first docs
29+
- M046 closed the route-free clustered proof wave: `tiny-cluster/`, rebuilt `cluster-proof/`, and `meshc init --clustered` now share one tiny `1 + 1` clustered-work contract, and the authoritative closeout rail is `bash scripts/verify-m046-s06.sh`
30+
31+
The current clustered declaration surface has now crossed the public cutover line. M047/S01 and S02 landed the source-first `@cluster` / `@cluster(N)` parsing, shared mesh-pkg declaration provenance/count metadata, source-ranged meshc diagnostics, range-accurate mesh-lsp diagnostics, runtime registration keyed by generic declared-handler runtime names, and continuity records that preserve public `replication_count`. M047/S04 then removed the old public compatibility bridge: parser/pkg/compiler flows now reject legacy `clustered(work)` and `[cluster]` with migration guidance, and `bash scripts/verify-m047-s04.sh` remains the authoritative cutover verifier.
32+
33+
M047 is now closed through S08 on the current source-first clustered model. The declared-work wrapper/codegen seam supports ordinary zero-arg `@cluster` functions, `tiny-cluster/`, `cluster-proof/`, and `meshc init --clustered` dogfood ordinary names like `add()`, and `meshc init --template todo-api` generates a SQLite Todo API with CRUD routes, actor-backed write limiting, restart-persistent SQLite state, a route-free clustered `sync_todos()` function, explicit-count `HTTP.clustered(1, ...)` on the selected read routes, and a Dockerfile that packages the binary produced by `meshc build .`. S06 added the dedicated built-package SQLite regression (`cargo test -p meshc --test e2e_sqlite_built_package -- --nocapture`), finished the public docs/migration story, and made `bash scripts/verify-m047-s06.sh` the assembled closeout rail that wraps S05 and owns the retained `.tmp/m047-s06/verify` bundle. S07 then landed the real clustered HTTP route wrapper: `HTTP.clustered(handler)` / `HTTP.clustered(N, handler)` now type-check with wrapper-specific diagnostics, lower to deterministic `__declared_route_<runtime_name>` shims that register through the shared declared-handler seam, execute the route handler itself as the clustered boundary, and surface continuity/runtime truth through the same runtime-name/replication-count fields used by ordinary clustered work. S08 completed the adoption layer by updating the scaffold, docs, and retained closeout rails to prove the Todo starter's selected clustered read routes natively and inside Docker while preserving the route-free `@cluster` surfaces as the canonical public model.
1934

20-
Recent milestone state:
21-
- M028 established the production-backend trust baseline around API + DB + migrations + jobs
22-
- M029 completed the major formatter correctness and dogfood cleanup wave across `mesher/` and `reference-backend/`
23-
- M031 fixed several real DX/compiler rough edges found through dogfooding and expanded the regression suite
24-
- M032 retired stale Mesher limitation folklore, fixed real blockers in Mesh, and dogfooded those repairs back into `mesher/`
25-
- M033 strengthened the neutral ORM/migration core, added explicit PostgreSQL extras, and left a clean path for later SQLite-specific work
26-
- M034 hardened CI/CD and proved the public release path end to end: the real registry package-manager flow is live-verified by `scripts/verify-m034-s01.sh`, CI and release gating run through one reusable authoritative-proof workflow, shipped installers are proven installable/runnable through staged verifiers, the VS Code extension release lane validates the packaged VSIX before publication, and `scripts/verify-m034-s05.sh` assembles all subsystem proofs into one canonical acceptance flow. Five of six hosted workflow lanes are green on the rollout SHA; the remaining hosted Windows release-smoke blocker (`release.yml` on `v0.1.0` at `Verify release assets (x86_64-pc-windows-msvc)`) has actionable diagnostics and structured trace surfaces for follow-up.
35+
Public docs/readmes now teach the three canonical route-free `@cluster` surfaces first, then layer on the Todo starter as the fuller example with explicit-count `HTTP.clustered(1, ...)` on `GET /todos` and `GET /todos/:id` while pointing default-count/two-node wrapper behavior at the S07 rail. The current closeout proof surface is `cargo test -p meshc --test e2e_m047_s06 -- --nocapture`, `cargo test -p meshc --test e2e_sqlite_built_package -- --nocapture`, and `bash scripts/verify-m047-s06.sh`, with retained status/phase/bundle pointers under `.tmp/m047-s06/verify/`. `HTTP.clustered(...)` lands in compiler/runtime/e2e through the S07 rails (`cargo test -p mesh-typeck m047_s07 -- --nocapture`, `cargo test -p mesh-lsp m047_s07 -- --nocapture`, `cargo test -p mesh-codegen m047_s07 -- --nocapture`, `cargo test -p mesh-rt m047_s07 -- --nocapture`, and `cargo test -p meshc --test e2e_m047_s07 -- --nocapture`), while S05/S06 now adopt the shipped wrapper truthfully through the Todo starter and assembled native/Docker closeout rails (`cargo test -p meshc --test e2e_m047_s05 -- --nocapture` and `bash scripts/verify-m047-s05.sh`).
2736

2837
## Architecture / Key Patterns
2938

30-
- Rust workspace under `compiler/` with separate crates for parser, type checker, codegen, runtime, formatter, LSP, CLI, REPL, package tooling, and CLI-facing package manager code
31-
- backend-first proof surfaces through `reference-backend/` and `mesher/`
32-
- release/deploy/package surfaces split across GitHub Actions, `registry/`, `packages-website/`, `website/`, install scripts, and `tools/editors/vscode-mesh/`
33-
- proof-first dogfooding: reproduce a real app or delivery limitation, fix it at the right layer, then dogfood the repaired path back into the repo’s real workflows
34-
- keep the default surface boring and composable; use explicit boundary markers when behavior is genuinely vendor-, editor-, or deployment-specific
39+
- Rust workspace under `compiler/` with separate crates for parser, type checker, codegen, runtime, formatter, LSP, CLI, REPL, package tooling, and package manager code
40+
- backend-first proof surfaces through narrow reference apps and shell verifiers, not marketing-only examples
41+
- proof-first dogfooding: reproduce a real runtime/platform limitation, fix it at the correct layer, then prove the repaired path end to end
42+
- explicit honesty boundaries when behavior is genuinely environment-specific; avoid claiming portability or automation that the runtime does not really own
43+
- assembled closeout verifiers own a fresh `.tmp/<slice>/verify` bundle and retain delegated subrails by copying their verify trees plus bundle pointers, rather than sharing or mutating lower-level `.tmp/.../verify` directories directly
44+
- current clustered runtime surface lives primarily in `compiler/mesh-rt/src/dist/`, `compiler/mesh-codegen/`, `compiler/mesh-typeck/`, and `compiler/meshc/`, with user-facing docs in `website/docs/docs/distributed/` and the scaffold path in `compiler/mesh-pkg/src/scaffold.rs`
45+
- clustered HTTP routes now reuse the same declared-handler seam as ordinary clustered work: compiler lowering rewrites `HTTP.clustered(...)` to deterministic `__declared_route_<runtime_name>` bare shims, router registration reverse-maps those shims onto declared-handler runtime metadata, and continuity/operator views stay keyed by the real handler runtime name rather than the shim symbol
46+
- for the next wave, clustered ergonomics should stay source-first and obvious: one general clustered function model, route-local wrapper sugar for HTTP, and examples that look like starting points rather than proof apps
3547

3648
## Capability Contract
3749

@@ -45,6 +57,14 @@ See `.gsd/REQUIREMENTS.md` for the explicit capability contract, requirement sta
4557
- [x] M032: Mesher Limitation Truth & Mesh Dogfood Retirement — audit workaround folklore, fix real blockers in Mesh, and dogfood those repairs back into `mesher/`
4658
- [x] M033: ORM Expressiveness & Schema Extras — strengthen the neutral data layer, add PG-first extras now, and leave a clean path for SQLite extras later
4759
- [x] M034: Delivery Truth & Public Release Confidence — harden CI/CD, prove the package manager end to end, and make the public release path trustworthy instead of artifact-only
48-
- [ ] M035: Test Framework Hardening — get Mesh’s testing story ready to test `mesher` thoroughly during development
49-
- [ ] M036: Editor Parity & Multi-Editor Support — make editor support match real Mesh syntax and give at least one non-VSCode editor a first-class path
60+
- [x] M036: Editor Parity & Multi-Editor Support — make editor support match real Mesh syntax and give at least one non-VSCode editor a first-class path
61+
- [x] M038: Fix Windows MSVC Build — repair the hosted Windows release lane so the shipped compiler path is trustworthy
62+
- [x] M039: Auto-Discovery & Native Cluster Balancing — prove discovery, truthful membership, runtime-native internal balancing, and single-cluster failure/rejoin on a narrow proof app
63+
- [x] M042: Runtime-Native Distributed Continuity Core — move single-cluster distribution, replication, and keyed continuity into `mesh-rt` behind a simple Mesh-facing API
64+
- [x] M043: Runtime-Native Cross-Cluster Disaster Continuity — extend the same runtime-owned continuity model across primary/standby clusters
65+
- [x] M044: First-Class Clustered Apps & Bounded Auto-Promotion — turn runtime continuity/failover into the default productized clustered-app model for ordinary Mesh services
66+
- [x] M045: Language-Owned Clustered Example Simplification — make the primary clustered example tiny, docs-grade, and fully language/runtime-owned instead of proof-app-shaped
67+
- [x] M046: Language-Owned Tiny Cluster Proofs — make clustered work auto-triggered, decorator-declarable, route-free, and equally proven through `meshc init --clustered`, `tiny-cluster/`, and rebuilt `cluster-proof/`
68+
- [ ] M047: Cluster Declaration Reset & Clustered Route Ergonomics — replace `clustered(work)` with `@cluster`, reset canonical examples/scaffolds to ordinary `@cluster` function names, continue the clustered-route wrapper work honestly, and ship a clear SQLite Todo scaffold with a complete Dockerfile that makes clustering obvious without looking like a proof app
69+
- [ ] M035: Test Framework Hardening — get Mesh's testing story ready to test `mesher` thoroughly during development
5070
- [ ] M037: Package Experience & Ecosystem Polish — improve the package manager experience, website-first, once the underlying trust path is proven

.gsd/QUEUE-ORDER.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
{ "order": ["M038", "M035", "M036", "M037"], "updatedAt": "2026-03-28T00:56:00Z" }
1+
{
2+
"order": [
3+
"M043"
4+
],
5+
"updatedAt": "2026-03-29T05:45:51.575Z"
6+
}

0 commit comments

Comments
 (0)