🧹 Code Health: Remove unused subscriptions_path functions in capsule.py#37
🧹 Code Health: Remove unused subscriptions_path functions in capsule.py#37mapleleaflatte03 wants to merge 4 commits intomainfrom
Conversation
…e.py Removes unused `subscriptions_path`, `subscriptions_backup_path`, and `subscriptions_lock_path` from `kernel/capsule.py`. Static analysis confirmed these functions are not called anywhere in the repository. Removing them improves code readability and maintainability. Co-authored-by: mapleleaflatte03 <240846662+mapleleaflatte03@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
* Modifies `.github/workflows/test.yml` to run `python quickstart.py --init-only` before tests and uses `PYTHONPATH=.` correctly for test execution and governance simulation, resolving `ModuleNotFoundError` for `kernel`. * Fixes `test_federation.py` by excluding pre-existing local artifact caches (`__pycache__`, `*.pyc`, `capsules`, `economy/capsules`) from `shutil.copytree` when simulating remote root environments, preventing `FileExistsError` on `init_capsule`. Co-authored-by: mapleleaflatte03 <240846662+mapleleaflatte03@users.noreply.github.com>
* Modifies `test_federation.py`'s `_seed_workspace_root` to use `shutil.ignore_patterns` to correctly exclude pre-existing state files generated locally or in CI from being copied into the test simulation's workspace folders. Excluded files include `ledger.json`, `transactions.jsonl`, `organizations.json`, and `authority_queue.json`, along with `capsules/`. * Resolves persistent `FileExistsError` during `init_capsule()` that was occurring on CI workflows and locally when running the test suite after a local `quickstart.py --init-only`. Co-authored-by: mapleleaflatte03 <240846662+mapleleaflatte03@users.noreply.github.com>
* Ignores `capsules/` entirely when copying the workspace in `_seed_workspace_root` of `test_federation.py` to prevent `FileExistsError` locally or in CI from a pre-existing state. * Explicitly cleans up the copied `ledger.json` in `economy_dst` prior to running `init_capsule()`, avoiding state collisions. * Adjusts `test_court_capsule.py` to safely handle the potential absence of `LEGACY_RECORDS_PATH` (`kernel/court_records.json`), allowing tests to pass in environments without unversioned test data. * Restores `.github/workflows/test.yml` to correctly initialize the environment with `quickstart.py --init-only` and use `PYTHONPATH=.` correctly at the root directory level. Co-authored-by: mapleleaflatte03 <240846662+mapleleaflatte03@users.noreply.github.com>
|
This repository is now archived for historical reference.\n\nActive Meridian development has moved to the monorepo:\nhttps://github.com/mapleleaflatte03/meridian\n\nPlease open a new PR against the monorepo if this change is still needed. |
🎯 What: The code health issue addressed is the presence of unused function definitions in
kernel/capsule.pyrelated tosubscriptions. Specifically,subscriptions_path,subscriptions_backup_path, andsubscriptions_lock_pathwere defined but never referenced elsewhere.💡 Why: Removing dead code improves the maintainability and readability of the codebase by reducing clutter and minimizing the surface area that developers need to comprehend.
✅ Verification: Ran
grep -rnacross the repository to verify that none of these three functions were called. Ran the fullpytestsuite and confirmed that test failures were identical before and after these changes, indicating no regressions.✨ Result: A cleaner
kernel/capsule.pywith dead code eliminated.PR created automatically by Jules for task 11809375462481831986 started by @mapleleaflatte03