Skip to content

fix: make gene selector ordering deterministic - #26

Open
Gavriel-lab wants to merge 1 commit into
Clawland-AI:mainfrom
Gavriel-lab:codex/fix-gene-selector-tiebreak
Open

fix: make gene selector ordering deterministic#26
Gavriel-lab wants to merge 1 commit into
Clawland-AI:mainfrom
Gavriel-lab:codex/fix-gene-selector-tiebreak

Conversation

@Gavriel-lab

Copy link
Copy Markdown

Summary

Fixes the existing pkg/gene selector ordering failure that currently prevents the full PicClaw test suite from passing on main.

ScoreGene caps scores at 1.0, so two strong candidates can tie after scoring. SelectGenes previously sorted only by score, which left tied candidates in input order. That made TestSelectGenes_SortedByScore return the lower-confidence gene first when both candidates reached the score cap.

This PR keeps score as the primary ordering signal, then uses confidence and verification count as deterministic tie-breakers.

Validation

$ go test ./pkg/gene
ok  	github.com/sipeed/picoclaw/pkg/gene	0.468s

$ go test ./...
ok / no test files across the full suite

I kept this intentionally small so it can unblock baseline validation without pulling in unrelated edge API changes.

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.

1 participant