Skip to content

test(skills): add issue-derived Pythonic code evals - #1099

Merged
phernandez merged 5 commits into
mainfrom
codex/pythonic-code-evals
Jul 18, 2026
Merged

test(skills): add issue-derived Pythonic code evals#1099
phernandez merged 5 commits into
mainfrom
codex/pythonic-code-evals

Conversation

@phernandez

Copy link
Copy Markdown
Member

Why

PR #1095 introduced the /pythonic-code skill, but the skill had no repeatable evaluation surface. Real cleanup issues #1096, #1097, and #1098 provide representative architecture, persistence-invariant, and abstraction-simplification cases without relying on toy Python examples.

What Changed

  • Add three issue-derived eval cases with self-contained fixtures and assertion rubrics.
  • Add a skill-local justfile for listing, validating, dry-running, and running paired trials.
  • Add an isolated runner that executes each case with and without the skill, excludes eval answers from the agent workspace, and records outputs, events, timing, and grading input.
  • Add minimal shared workspace instructions and Ruff/pytest configuration so both variants receive realistic repository context.
  • Clarify the skill guidance: use Protocol for replaceable behavior, not property-only internal result shapes.

Implementation Details

The runner copies only the selected fixture files into a fresh temporary workspace. Skill-guided trials receive SKILL.md but not the eval definitions, assertions, expected outputs, runner, or prior results.

The first fair-context run exposed a concrete weakness: the skill-guided #1098 patch retained two property-only result protocols and scored 3/5 while the baseline scored 5/5. After adding the focused protocol rule, the unchanged #1098 retest scored 5/5; its concurrent baseline scored 4/5 because it introduced an AcceptedNotePreparer class instead of direct module-level behavior.

Using the latest result for each unchanged case, the revised skill scored 15/15 versus 14/15 for the baseline. These are directional single-run results; the code-shape difference is the useful signal, while timing and token counts remain stochastic.

Testing

Passed:

  • cd .agents/skills/pythonic-code && just validate
  • PYTHONPATH=evals/files uv run pytest -q evals/files/test_accepted_snapshot.py evals/files/test_accepted_preparation.py — 5 passed
  • uv run python /Users/phernandez/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/pythonic-code
  • just package-check
  • Paired Codex eval runs for all three cases, plus the focused refactor(core): simplify the accepted-note preparation and protocol surface #1098 retest

Risks / Follow-ups

Related to #1096, #1097, and #1098.

Signed-off-by: phernandez <paul@basicmachines.co>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: befe112be0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/pythonic-code/evals/context/pyproject.toml
Signed-off-by: phernandez <paul@basicmachines.co>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f83bfd9c98

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/pythonic-code/scripts/run_evals.py
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8fca87a5f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/pythonic-code/scripts/run_evals.py
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 081abd48c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/pythonic-code/scripts/run_evals.py
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: a3a8b24916

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@phernandez
phernandez merged commit bcd47d4 into main Jul 18, 2026
16 checks passed
@phernandez
phernandez deleted the codex/pythonic-code-evals branch July 18, 2026 05:12
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.

refactor(core): clarify shared runtime package ownership and dependency direction

1 participant