feat(context): reasoning-thread continuity, L3 doc filtering, and gate hardening

Threads reasoning_content across inference calls and journal renders, filters
markdown noise out of L3 repo-knowledge retrieval, adds PlanLinter H3 checks,
and tightens filesystem tool output/dir-listing behavior surfaced by prior
live QA (see project_readloop_campaign memory).
This commit is contained in:
2026-07-10 11:13:43 +04:00
parent f51a8dada4
commit 3d5e05c1fb
32 changed files with 742 additions and 85 deletions
@@ -25,3 +25,18 @@ data class RepoKnowledgeRetrievedEvent(
val query: String,
val hits: List<RepoKnowledgeHit>,
) : EventPayload
/**
* Candidates that scored above the L3 index's own top-k cutoff but below the retriever's
* minimum-similarity floor, so were never rendered to the agent as "relevant." Without this,
* a hit below the floor is indistinguishable from one that was never a candidate — recorded
* per invariant #9 since the embedding-similarity score is itself an environment observation.
*/
@Serializable
@SerialName("RepoKnowledgeHitsFiltered")
data class RepoKnowledgeHitsFilteredEvent(
val sessionId: SessionId,
val query: String,
val threshold: Float,
val dropped: List<RepoKnowledgeHit>,
) : EventPayload
@@ -57,6 +57,7 @@ import com.correx.core.events.events.ModelUnloadedEvent
import com.correx.core.events.events.OrchestrationPausedEvent
import com.correx.core.events.events.OrchestrationResumedEvent
import com.correx.core.events.events.RefinementIterationEvent
import com.correx.core.events.events.RepoKnowledgeHitsFilteredEvent
import com.correx.core.events.events.RepoKnowledgeRetrievedEvent
import com.correx.core.events.events.RepoMapComputedEvent
import com.correx.core.events.events.RetryAttemptedEvent
@@ -154,6 +155,7 @@ val eventModule = SerializersModule {
subclass(RepoMapComputedEvent::class)
subclass(WorkspaceStateObservedEvent::class)
subclass(RepoKnowledgeRetrievedEvent::class)
subclass(RepoKnowledgeHitsFilteredEvent::class)
subclass(BriefGroundingCheckedEvent::class)
subclass(BriefEchoMismatchEvent::class)
subclass(StaticAnalysisCompletedEvent::class)