Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.

perf(tests): share canonical humaneval-multiturn rollout + widen secret gitignore - #8

Merged
stelioszach03 merged 1 commit into
mainfrom
audit/envs-cartography-20260608
Jun 10, 2026
Merged

perf(tests): share canonical humaneval-multiturn rollout + widen secret gitignore#8
stelioszach03 merged 1 commit into
mainfrom
audit/envs-cartography-20260608

Conversation

@stelioszach03

Copy link
Copy Markdown
Collaborator

Two approved items from the repo audit (P-1 perf + L-1 hygiene). No audit documents are in this PR — only the fixes.

P-1 — shared rollout fixture (measured)

tests/test_code_humaneval_multiturn.py ran five full 3-turn rollouts; each turn spawns a sandboxed pytest subprocess (~7 s/rollout). Three of the five assert different properties of the SAME canonical [bad, gold, gold] run — they now share one module-scoped fixture.

before after
3 shareable tests 22.5 s 7.7 s (one fixture setup)
file wall ~40 s 24.8 s
tests in file 22 22 (unchanged)
full suite 1917/7/2/0 1917/7/2/0

Kept separate by design: turn-penalty (needs gold×3 for base_reward == 1.0) and max_turns-override (different rollout params).

L-1 — .gitignore secret-pattern widening

Secrets block grew from {.env, .env.local, *.key} to the standard credential-shaped set (.env.*, secrets.*, credentials.*, .netrc, *.pem, *.p12, *.pfx, SSH key names, cloud-CLI cred dirs). Verified zero tracked files match any new pattern — purely preventive.

Audit corrections for the record

  • L-2/L-3 ("tracked .ruff_cache") were false positivesgit ls-files shows 0 tracked cache files; nothing to untrack.
  • Secret scan over this diff: clean.

…secret gitignore

Audit P-1: tests/test_code_humaneval_multiturn.py ran FIVE full 3-turn
rollouts, each spawning a sandboxed pytest subprocess per turn (~7 s
per rollout, 22.5 s across the three that exercise the SAME canonical
run). The three tests asserting different properties of one
[bad, gold, gold] rollout (canonical dict shape, history growth,
per-turn components) now consume a single module-scoped fixture.

Measured: 22.5 s -> 7.7 s for those three (-14.8 s, -60%); file wall
40 s -> 24.8 s. Test count unchanged (22 in file; suite stays
1917 passed / 7 skipped / 2 deselected / 0 failed).

Kept separate on purpose: the turn-penalty test (needs base_reward
exactly 1.0 -> gold x3 script) and the max_turns-override test
(different rollout params).

Audit L-1: the Secrets block of .gitignore covered only .env,
.env.local, *.key. Widened to the standard credential-shaped set
(.env.*, secrets.*, credentials.*, .netrc, *.pem, *.p12, *.pfx,
id_rsa*/ed25519*/ecdsa*, .aws/.gcp/.azure dirs). No tracked file
matches any new pattern (verified), so this is purely preventive.
@stelioszach03
stelioszach03 merged commit a56e265 into main Jun 10, 2026
3 checks passed
@stelioszach03
stelioszach03 deleted the audit/envs-cartography-20260608 branch June 10, 2026 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant