Skip to content

Add archive-guided mutation prompts via TreeSHAP#116

Merged
nikivanstein merged 6 commits intomainfrom
feature/codex-add-toggled-feature-for-xgboost-model-training
Jan 27, 2026
Merged

Add archive-guided mutation prompts via TreeSHAP#116
nikivanstein merged 6 commits intomainfrom
feature/codex-add-toggled-feature-for-xgboost-model-training

Conversation

@nikivanstein
Copy link
Collaborator

@nikivanstein nikivanstein commented Nov 9, 2025

Summary

  • add a feature-guided mutation mode that trains an XGBoost model on AST features and steers prompts with TreeSHAP insights
  • expose reusable AST and complexity feature extraction utilities and a lightweight TreeSHAP wrapper
  • expand automated tests to cover the new guidance workflow and ensure mutation prompts include guidance

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 82.33438% with 56 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
llamea/feature_guidance.py 80.14% 28 Missing ⚠️
llamea/ast_features.py 82.57% 23 Missing ⚠️
llamea/llamea.py 86.66% 4 Missing ⚠️
llamea/treeshap.py 92.85% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

* Add parent-aware feature guidance

* black

* added meta data
)

* Add parent-aware feature guidance

* black

* added meta data

* added metadata for logging
@nikivanstein nikivanstein marked this pull request as ready for review January 20, 2026 14:48
@nikivanstein nikivanstein self-assigned this Jan 20, 2026
@nikivanstein nikivanstein added enhancement New feature or request and removed codex labels Jan 20, 2026
Copy link

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

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: 7ead1c592d

ℹ️ 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 on lines +545 to +549
self.feature_guidance = guidance
if guidance:
self.feature_guidance_message = guidance.message
elif parent is None:
self.feature_guidance_message = ""

Choose a reason for hiding this comment

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

P2 Badge Clear stale guidance when parent guidance fails

In _update_feature_guidance, when compute_feature_guidance(...) returns None for a specific parent, the code only clears feature_guidance_message if parent is None. That means a parent-specific guidance failure leaves the previous message intact, and construct_prompt will append stale guidance to the mutation prompt for a different parent. This misguides mutations whenever guidance cannot be computed for a parent (e.g., insufficient training data or SHAP failure), so the guidance should be reset even when parent is provided.

Useful? React with 👍 / 👎.

@nikivanstein nikivanstein merged commit 6c9ee29 into main Jan 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants