8d7c827ebb
Two event-delivery back-pressure faults from the core audit (#7). (a) streamGlobal forwarded globalFlow → a per-connection Channel with buffer.send (SUSPEND). globalFlow is also SUSPEND-overflow, so one wedged WebSocket client back-pressured globalFlow → append() suspended → the whole kernel stalled. Now the collector uses trySend; on overflow it closes the buffer with SlowClientException, tearing down that one connection (client reconnects and re-syncs via replaySnapshot) instead of blocking append(). (b) Per-session subscriptions (extraBufferCapacity 64) used tryEmit with the return ignored: a lagging in-process collector (e.g. LiveArtifactRepository) silently diverged from the durable log. Both SqliteEventStore and InMemoryEventStore now warnIfDropped() — the event is still persisted; only the live SharedFlow drops, and we surface it. ponytail: log-only; bounded rebuild-on-lag if divergence ever bites. Added slf4j-api to :infrastructure:persistence (already the standard logging dep across modules) for the warn. Green: :infrastructure:persistence + :apps:server compile+detekt+test (the one pre-existing ModelLifecycleWiringTest failure needs a real llama-server, fails identically on clean checkout).
21 lines
750 B
Groovy
21 lines
750 B
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'org.jetbrains.kotlin.jvm'
|
|
id 'org.jetbrains.kotlin.plugin.serialization'
|
|
}
|
|
|
|
dependencies {
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
|
|
implementation(project(":core:events"))
|
|
implementation(project(":core:sessions"))
|
|
implementation(project(":core:artifacts"))
|
|
implementation(project(":core:artifacts-store"))
|
|
implementation "org.xerial:sqlite-jdbc"
|
|
implementation "org.slf4j:slf4j-api:2.0.16"
|
|
testImplementation(testFixtures(project(":testing:contracts")))
|
|
testImplementation(project(":testing:fixtures"))
|
|
testImplementation "org.junit.jupiter:junit-jupiter"
|
|
}
|
|
|
|
tasks.named("koverVerify").configure { enabled = false }
|