feat: add hulk_clean_everything() and push_to_git() with clean-state guard#135
Draft
feat: add hulk_clean_everything() and push_to_git() with clean-state guard#135
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/Tryonme-com/tryonyou-app/sessions/5458efdb-ecc8-4829-9995-f0f2eb0bdeee Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Clean workspace and push changes to Git
feat: add hulk_clean_everything() and push_to_git() with clean-state guard
Apr 8, 2026
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.
Implements two public functions enabling a safe clean-then-push workflow: run cleanup first, push only if the repo is in a clean state.
New module:
hulk_git_operations.pyhulk_clean_everything()— delegates to existingBunkerCleanerto purge.next,node_modules/.cache,__pycache__(recursive), andtemp_logs; sets a session-scoped_cleanedflagpush_to_git()— enforces three guards before pushing:_cleanedisTrue(i.e.hulk_clean_everything()was called this session)E50_GIT_PUSH=1is set (accidental-push safeguard, consistent with all other push scripts)git status --porcelainis empty (no uncommitted changes)E50_FORCE_PUSH,E50_GIT_REMOTE,E50_GIT_BRANCH,E50_PROJECT_ROOTTests:
tests/test_hulk_git_operations.py10 unit tests covering each guard failure path, force-push flag propagation, git error handling, and the full success path.