refactor: harden generative compilation pipeline#71
Merged
Conversation
…eAuditor - TrapPruner: statistical profiling + LLM verification of Gaussian noise columns - MissingnessRecognizer: MNAR pattern detection with sandbox-compiled encoders - TargetLeakageAuditor: semantic timeline evaluation for target leakage
…o public API - Add all three to extraction/__init__.py lazy imports - Add Loclean class methods + module-level convenience functions - Update __all__ in loclean/__init__.py
…r, TargetLeakageAuditor - 13 tests each (39 total) covering profiling, prompt construction, verdict parsing, verification, and mock-LLM integration
- Strip markdown fences, prose, and backticks - Fix unicode operators and invalid numeric literals - 17 unit tests covering all transformation stages
- LLM-generated import statements now only work for explicitly allowed modules; all others raise ImportError - Preload modules into safe_globals for direct namespace access - Updated docstring to document the restriction
- Wrap initial compile in try/except to catch ValueErrors - Add per-retry logging with attempt counter - Replace vague failure messages with actionable guidance (model suggestions, max_retries hint) - Add concrete code examples to LLM prompts for better output
- Add module-level _verified_models set for deduplication - Fix model_exists to handle both dict and object API responses - Use model attribute (not name) for correct Ollama registry matching
Superseded by examples/README.md and module docstrings.
Pull Request Summary by devActivityMetricsAchievements
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens the LLM code-generation pipeline with better sandboxing, error handling, and developer experience.
Changes
source_sanitizer.py[NEW]sandbox.py__import__— only explicitly allowed modules can be importedfeature_discovery.py,shredder.pyValueErrorfrom compile, per-retry logging, actionable error messages with model suggestionsmodel_manager.pyLIBRARY_SUMMARY.md[DELETE]examples/README.mdDesign Decisions
subprocess,os). Only modules in theallowed_moduleslist are permitted.ollama listcalls within the same process, useful for batch pipelines.Tests
42 tests across
test_source_sanitizer.py,test_sandbox.py,test_model_manager.py.