Skip to content

tools: Add semantic actor framework analyzer - #1063

Draft
sputn1ck wants to merge 2 commits into
mainfrom
kon/actor-framework-analysis
Draft

tools: Add semantic actor framework analyzer#1063
sputn1ck wants to merge 2 commits into
mainfrom
kon/actor-framework-analysis

Conversation

@sputn1ck

Copy link
Copy Markdown
Member

What changed

  • add a typed framework golangci-lint plugin alongside the existing ll plugin
  • validate durable actor TLV registrations and reject top-level fixed-layout binary message encodings
  • validate protofsm table identity, duplicate rows/edges, descriptions, and terminal markers
  • require detached Ask continuations to bound CallerCtx and keep the concurrent-classic escape test-only
  • use SSA effect summaries to reject actor waits, stripped-context sends, independent SQL transactions, and transaction-context escapes while a writer is held
  • enable the plugin in the existing Wavelength lint CI job

The transaction analysis deliberately models “writer held” separately from “context carries a transaction.” That distinction catches both historical mailbox failure modes: waiting on an Ask whose durable enqueue is still uncommitted, and stripping the transaction before an enqueue that then tries to acquire a second writer.

Diagnostics

  • ATL001-ATL003: durable TLV encoding and codec registration
  • PFS001-PFS005: protofsm transition-table invariants
  • ALC001-ALC003: detached Ask and durable actor lifecycle
  • ATX001-ATX005: actor transaction/deadlock boundaries

Validation

  • GOWORK=off go test ./... in tools/linters
  • GOWORK=off go vet ./... in tools/linters
  • full framework-only scan of the Wavelength tree: 0 issues
  • GOGC=50 make lint-local workers=4: 0 issues
  • GOWORK=off go test ./...
  • make tidy-module-check
  • make fmt-changed-check
  • make commitmsg-lint range='origin/main..HEAD'

sputn1ck added 2 commits July 29, 2026 17:40
Use typed AST and SSA facts to enforce durable TLV schemas, protofsm
table invariants, detached Ask lifetimes, and actor transaction
boundaries.

Model held writers separately from stripped contexts so the analyzer
catches both historical mailbox deadlocks.
Enable the typed framework plugin in the existing golangci-lint job so
every client change is checked for actor, transaction, TLV, and
protofsm invariants.
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@sputn1ck
sputn1ck requested a review from Roasbeef July 29, 2026 16:15
@levmi levmi added the actor label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants