fix(continual-learning): harden wasRealCollision verifier (Codex review)
Addresses the P1 brittleness in the Step 3 verifier so learned_from edges (graph/live.ts:413) can't be silently zeroed on stage. - Capture overlap AT detection time as Collision.gitOverlap (podman.ts), while engineer_states are still fresh, instead of re-deriving from possibly-stale state when the user clicks. deriveWasRealCollision() now prefers this stored evidence and only falls back to a live re-derivation for older collisions. - Canonicalize engineer names (trim + lowercase) on both the capture and the fallback path, so "Karti" vs "karti" no longer misses the git state. - conflictKey now reuses the shared comparableBasename() helper (dedupe). shared/src/collision.ts gains optional `gitOverlap?: boolean` (additive). shared rebuilt; backend+frontend typecheck + eslint pass. PLAN.md rung 3 updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,14 @@ export interface Collision {
|
||||
severity: CollisionSeverity;
|
||||
/** Snapshot of relevant GitHub state at detection time. */
|
||||
githubState?: GithubStateSnapshot;
|
||||
/**
|
||||
* Git ground-truth overlap captured AT detection time, while engineer_states
|
||||
* are still fresh: true when every involved engineer had `file` in their git
|
||||
* changedFiles. Read as the authoritative wasRealCollision evidence at outcome
|
||||
* time, so a late click, a stale sidecar, or the engineer_states freshness TTL
|
||||
* cannot retroactively zero it out.
|
||||
*/
|
||||
gitOverlap?: boolean;
|
||||
detectedAt: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user