Skip to content

tsb-perf-evolve: add Series.sortValues validity-oracle tests#187

Merged
mrjf merged 2 commits intomainfrom
copilot/close-end-to-end-gaps
Apr 23, 2026
Merged

tsb-perf-evolve: add Series.sortValues validity-oracle tests#187
mrjf merged 2 commits intomainfrom
copilot/close-end-to-end-gaps

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

The tsb-perf-evolve AlphaEvolve program runs bun test tests/core/series.sortValues.test.ts as the correctness gate for every candidate, but that file did not exist — every candidate would fail validity on the first command.

Changes

  • New file tests/core/series.sortValues.test.ts — 29 tests pinning the observable behaviour of Series.sortValues (anchored to src/core/series.ts:714 and pandas Series.sort_values where the spec is ambiguous):
    • Numeric-with-NaN across all four (ascending, naPosition) combinations, asserting both values and originating-row indices.
    • String dtype ascending/descending, with nulls in either position.
    • Mixed dtype: all-NaN stable order, no-NaN permutation, integer dtype preservation.
    • Empty Series: dtype and name preserved across every option combination.
    • Index-alignment invariant: output index at position i is the originating row's label, not the sorted index array (catches a common candidate bug).
    • Public signature: defaults check + a compile-time const r: Series<T> = s.sortValues() assertion so a signature change fails tsc --noEmit.
    • fast-check properties: length, permutation, monotonicity, idempotence-up-to-ties, label/value pairing, and stability (equal values keep input order).

Out of scope

Gaps #2#5 in the issue (metric_direction frontmatter, releaseassets.githubusercontent.com firewall allowlist, loud-fail pandas install, scheduler starvation) live under .autoloop/programs/** and .github/workflows/autoloop.md, which AGENTS.md forbids this agent from modifying. They need a separate PR from autoloop maintainers before the program can be enabled end-to-end.

Copilot AI changed the title [WIP] Close gaps for end-to-end AlphaEvolve loop on Series.sortValues tsb-perf-evolve: add Series.sortValues validity-oracle tests Apr 23, 2026
Copilot finished work on behalf of mrjf April 23, 2026 03:59
Copilot AI requested a review from mrjf April 23, 2026 03:59
@mrjf mrjf marked this pull request as ready for review April 23, 2026 05:49
@mrjf mrjf merged commit 09c9ba2 into main Apr 23, 2026
17 checks passed
@mrjf mrjf deleted the copilot/close-end-to-end-gaps branch April 23, 2026 06:04
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.

tsb-perf-evolve: close the gaps for end-to-end AlphaEvolve loop on Series.sortValues

2 participants