Skip to content

Refactor static analyses and config patchers into pyplugins#765

Open
lacraig2 wants to merge 1 commit intomainfrom
jules-plugin-refactor-9621120310990343842
Open

Refactor static analyses and config patchers into pyplugins#765
lacraig2 wants to merge 1 commit intomainfrom
jules-plugin-refactor-9621120310990343842

Conversation

@lacraig2
Copy link
Copy Markdown
Collaborator

@lacraig2 lacraig2 commented Apr 6, 2026

Refactor static analyses and config patchers to use plugin architecture


PR created automatically by Jules for task 9621120310990343842 started by @lacraig2

- Created StaticPlugin base class and StaticPluginManager to dynamically load plugins.
- Migrated all analyses and patchers to pyplugins/static_analysis/ and pyplugins/config_patchers/.
- Implemented topological sorting with alphabetic tie-breaking for deterministic execution order.
- Track plugin state with a SHA256 hash to automatically regenerate configuration when a plugin is modified or added.
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Lintly has detected code quality issues in this pull request.


logger = getColoredLogger("penguin.static_plugin_manager")

class StaticPluginManager:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

"""
pass

class ConfigPatcherPlugin(StaticPlugin):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

@@ -0,0 +1,37 @@
from abc import ABC

class StaticPlugin(ABC):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

if saved_hash != current_hash:
logger.warning("Static plugins have changed. Auto-regenerating the config...")
from .gen_config import initialize_and_build_config
fs_tar = conf["core"].get("fs", "")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

F821: undefined name 'conf'

import re
from penguin.static_plugin import StaticAnalysisPlugin

class PseudofileFinder(StaticAnalysisPlugin):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

from collections import defaultdict
from penguin.static_plugin import ConfigPatcherPlugin

class GenerateMissingFiles(ConfigPatcherPlugin):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1


logger = getColoredLogger("penguin.config_patchers")

class GenerateMissingDirs(ConfigPatcherPlugin):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

import os
from penguin.static_plugin import ConfigPatcherPlugin

class ForceWWW(ConfigPatcherPlugin):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

import re
from pathlib import Path

class FileHelper:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

@@ -0,0 +1,28 @@
from penguin.static_plugin import ConfigPatcherPlugin

class DynamicExploration(ConfigPatcherPlugin):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E302: expected 2 blank lines, found 1

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.

1 participant