Skip to content

Fix matrix evaluation deadlock and completion reporting - #124

Open
XinyuGuan wants to merge 1 commit into
CodeClash-ai:mainfrom
XinyuGuan:fix-matrix-deadlock
Open

XinyuGuan wants to merge 1 commit into
CodeClash-ai:mainfrom
XinyuGuan:fix-matrix-deadlock

Conversation

@XinyuGuan

Copy link
Copy Markdown

Matrix evaluation disables log copying before scoring and reacquires a non-reentrant save lock, causing missing-log failures or hangs after a successful cell.

Enable log copying and call _save() after releasing the update lock. Track worker exceptions so both matrices still run and the caller saves progress and cleans up. Failed evaluations log an incomplete status and omit the completion timestamp; retries clear any stale timestamp.

Validated with the real scheduler and BattleSnake scorer using fixture logs for 1 and 4 workers, covering success, single/multiple/all failures, and retries. All 211 existing tests and Ruff checks pass.

Fixes #123.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A deadlock bug in _save() and a bug masks it.

1 participant