Skip to content

docs: add Gotchas & Pitfalls section to state_exec developer guide#100

Merged
transfix merged 1 commit into
masterfrom
docs/state-exec-gotchas
May 27, 2026
Merged

docs: add Gotchas & Pitfalls section to state_exec developer guide#100
transfix merged 1 commit into
masterfrom
docs/state-exec-gotchas

Conversation

@transfix
Copy link
Copy Markdown
Owner

Summary

Adds a new Section 12 — Gotchas & Pitfalls to the STATE_EXEC_DEVELOPER_GUIDE.md, documenting non-obvious behaviours discovered during CI debugging and integration testing of PRs #96#99.

Contents

Subsection Topic
12.1 First write to a new state path is not replicated (lazy observer attachment in state_sync_adapter)
12.2 Duplicate-value writes silently dropped (state::value() equality guard)
12.3 Pumping before a peer connects permanently loses mutations (drain_local cursor advancement)
12.4 let scoping vs set for loop-carried state
12.5 All state values are strings
12.6 Generators are single-use
12.7 msg-recv blocks and can deadlock single-process programs
12.8 sleep granularity depends on scheduler tick rate
12.9 break exits only the innermost loop
12.10 Fork-based IPC tests and socket cleanup

The existing Architecture Reference section is renumbered from 12 → 13 and the TOC is updated accordingly.

New Section 12 documenting non-obvious behaviours discovered during
CI debugging and integration testing:

- First write to a new state path is not replicated (lazy observer
  attachment in state_sync_adapter)
- Duplicate-value writes silently dropped (equality guard)
- Pumping before a peer connects permanently loses mutations
  (drain_local cursor advancement)
- let scoping vs set for loop-carried state
- All state values are strings
- Generators are single-use
- msg-recv blocks and can deadlock single-process programs
- sleep granularity depends on scheduler tick rate
- break exits only the innermost loop
- Fork-based IPC tests and socket cleanup
@transfix transfix merged commit 03b4f96 into master May 27, 2026
14 checks passed
@transfix transfix deleted the docs/state-exec-gotchas branch May 27, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant