Repository navigation
v0.10.0 — state-ownership lens + AI-007/008/009 linters
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-classedge_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(...)orresp, _ := svc.Call(...)) whenon_failureis 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*Batchsibling exists in code (theGetDistance/GetDistancesBatchN+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 fromevents.published/events.consumed. WARN, not BLOCK: AST-only (method-name + subject-shape), no receiver-type proof.
Changed
ServiceMap(Go linters) now parsesdependencies.downstream.sync[]andevents.{published,consumed}[].- AI-008 severity raised from the reserved
INFOtoWARN(conservative matcher).