You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,9 @@ docker-compose up -d
89
89
git commit -m "chore(my-pkg): foo bar"
90
90
```
91
91
92
+
- We use Graphite for stacked PRs. Diff against the parent branch (`gt ls` to see the stack), not `main`.
93
+
- To revert a file to the version before this branch's changes, checkout from the first child branch (below in the stack), not from `main` or the parent. Child branches contain the pre-this-branch state of files modified by branches further down the stack.
94
+
92
95
**Never push to `main` unless explicitly specified by the user.**
93
96
94
97
## Dependency Management
@@ -339,6 +342,10 @@ When making changes to the engine or RivetKit, ensure the corresponding document
339
342
-**Landing page changes**: When updating the landing page (`website/src/pages/index.astro` and its section components in `website/src/components/marketing/sections/`), update `README.md` to reflect the same headlines, features, benchmarks, and talking points where applicable.
340
343
-**Sandbox provider changes**: When adding, removing, or modifying sandbox providers in `rivetkit-typescript/packages/rivetkit/src/sandbox/providers/`, update `website/src/content/docs/actors/sandbox.mdx` to keep provider documentation, option tables, and custom provider guidance in sync.
341
344
345
+
### CLAUDE.md conventions
346
+
347
+
- When adding entries to any CLAUDE.md file, keep them concise. Ideally a single bullet point or minimal bullet points. Do not write paragraphs.
348
+
342
349
### Comments
343
350
344
351
- Write comments as normal, complete sentences. Avoid fragmented structures with parentheticals and dashes like `// Spawn engine (if configured) - regardless of start kind`. Instead, write `// Spawn the engine if configured`. Especially avoid dashes (hyphens are OK).
Copy file name to clipboardExpand all lines: engine/CLAUDE.md
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,7 @@ When changing a versioned VBARE schema, follow the existing migration pattern.
35
35
36
36
## Concurrent containers
37
37
38
-
Never use `Mutex<HashMap<K, V>>` or `RwLock<HashMap<K, V>>`. They serialize all access behind a single lock and are extremely slow under contention. Use lock-free concurrent maps instead:
39
-
40
-
-`scc::HashMap` for general concurrent key-value storage. Use `entry_async`, `get_async`, `insert_async`, `remove_async` for async contexts. Be aware that `scc::HashMap` does not hold entries locked across `.await` points. Each async method acquires and releases its lock atomically. If you need read-then-write atomicity, use `entry_async` which holds the bucket lock for the duration of the closure, but the closure itself must be synchronous.
41
-
-`moka::Cache` when you need TTL-based expiration or bounded capacity.
42
-
-`DashMap` is also acceptable but `scc::HashMap` is preferred in this codebase.
43
-
44
-
The same applies to `Mutex<HashSet<T>>`. Use `scc::HashSet` instead.
38
+
Never use `Mutex<HashMap<...>>` or `RwLock<HashMap<...>>`. Use `scc::HashMap` (preferred), `moka::Cache` (for TTL/bounded), or `DashMap`. Same for sets: use `scc::HashSet` instead of `Mutex<HashSet<...>>`. Note that `scc` async methods do not hold locks across `.await` points. Use `entry_async` for atomic read-then-write.
0 commit comments