Skip to content

v0.10.0 — state-ownership lens + AI-007/008/009 linters

Choose a tag to compare

@krus210 krus210 released this 10 Jun 11:18
· 4 commits to main since this release
e374bc3

Closes a class of failure observed end-to-end: investigate designed a cross-service state transition (offer rejection) but never selected the system-of-record service that owns the state — an orchestrator (matching-service) absorbed a transition owned by task-service via a synchronous RPC, bypassing its outbox and its reassignment counter. Theme: make ownership a forced, reviewable decision, and ship the behavioural linters that catch the code-side residue.

Added

  • State-ownership (system-of-record) lens in architecture-investigate. A new clarify dimension forces enumerating every piece of persistent state the change touches and naming its system-of-record service; the write must originate in that service's own write path, never a sync RPC reaching into a foreign aggregate. A new forcing State-ownership map artifact (step 8b) makes the decision visible the way the fan-out trace makes event subscribers visible. A foreign-aggregate sync mutation is a named deviation, and ownership findings are first-class edge_cases[] entries.
  • Topology preference: owner-applies-async-command over foreign-aggregate sync RPC, surfaced both in the clarify gate and the self-review loop.
  • Self-review anti-patterns: foreign-state mutation via a sync RPC; idempotency asserted but not traced under replay; N+1 where a batch endpoint exists.
  • AI-007 swallowed-errors (WARN) — flags a downstream call whose return is discarded via blank _ (_ = svc.Call(...) or resp, _ := svc.Call(...)) when on_failure is declared. WARN, not BLOCK: AST-only, cannot prove the receiver is the declared downstream client.
  • AI-008 redundant-call (WARN) — flags a singular method called inside a loop when a *Batch sibling exists in code (the GetDistance/GetDistancesBatch N+1). Pure code-pattern heuristic — not tied to declared downstream.
  • AI-009 undeclared-event (WARN, v1 = NATS topics) — flags NATS Publish/Subscribe to a topic (literal or package-level const) absent from events.published/events.consumed. WARN, not BLOCK: AST-only (method-name + subject-shape), no receiver-type proof.

Changed

  • ServiceMap (Go linters) now parses dependencies.downstream.sync[] and events.{published,consumed}[].
  • AI-008 severity raised from the reserved INFO to WARN (conservative matcher).