claude-dev-env 1.41.0 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +8 -0
- package/_shared/pr-loop/scripts/_claude_permissions_common.py +232 -8
- package/_shared/pr-loop/scripts/code_rules_gate.py +293 -8
- package/_shared/pr-loop/scripts/fix_hookspath.py +96 -5
- package/_shared/pr-loop/scripts/grant_project_claude_permissions.py +124 -20
- package/_shared/pr-loop/scripts/post_audit_thread.py +4 -4
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/claude_permissions_constants.py +90 -0
- package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/claude_settings_keys_constants.py +2 -0
- package/_shared/pr-loop/scripts/preflight.py +13 -31
- package/_shared/pr-loop/scripts/reviews_disabled.py +2 -16
- package/_shared/pr-loop/scripts/revoke_project_claude_permissions.py +76 -33
- package/_shared/pr-loop/scripts/tests/conftest.py +1 -51
- package/_shared/pr-loop/scripts/tests/test_agent_config_carveout.py +385 -0
- package/_shared/pr-loop/scripts/tests/test_claude_permissions_common.py +4 -2
- package/_shared/pr-loop/scripts/tests/test_claude_permissions_constants.py +37 -2
- package/_shared/pr-loop/scripts/tests/test_claude_settings_keys_constants.py +4 -2
- package/_shared/pr-loop/scripts/tests/test_code_rules_gate_constants.py +4 -2
- package/_shared/pr-loop/scripts/tests/test_fix_hookspath_constants.py +6 -2
- package/_shared/pr-loop/scripts/tests/test_grant_project_claude_permissions.py +2 -2
- package/_shared/pr-loop/scripts/tests/test_post_audit_thread.py +1 -2
- package/_shared/pr-loop/scripts/tests/test_post_audit_thread_constants.py +4 -2
- package/_shared/pr-loop/scripts/tests/test_preflight.py +17 -52
- package/_shared/pr-loop/scripts/tests/test_preflight_constants.py +6 -2
- package/_shared/pr-loop/scripts/tests/test_revoke_project_claude_permissions.py +5 -3
- package/agents/pr-description-writer.md +50 -140
- package/docs/PR_DESCRIPTION_GUIDE.md +101 -102
- package/hooks/_gh_pr_author_swap_utils.py +1 -1
- package/hooks/blocking/bot_mention_comment_blocker.py +4 -10
- package/hooks/blocking/code_rules_enforcer.py +217 -99
- package/hooks/blocking/code_rules_path_utils.py +8 -1
- package/hooks/blocking/destructive_command_blocker.py +1 -1
- package/hooks/blocking/es_exe_path_rewriter.py +7 -13
- package/hooks/blocking/gh_body_arg_blocker.py +6 -1
- package/hooks/blocking/gh_pr_author_enforcer.py +5 -5
- package/hooks/blocking/gh_pr_author_restore.py +5 -5
- package/hooks/blocking/hedging_language_blocker.py +4 -10
- package/hooks/blocking/md_path_exemptions.py +205 -0
- package/hooks/blocking/md_to_html_blocker.py +48 -20
- package/hooks/blocking/pr_converge_bugteam_enforcer.py +5 -11
- package/hooks/blocking/pr_description_enforcer.py +626 -41
- package/hooks/blocking/question_to_user_enforcer.py +4 -10
- package/hooks/blocking/state_description_blocker.py +6 -12
- package/hooks/blocking/tdd_enforcer.py +1 -1
- package/hooks/blocking/test_bot_mention_comment_blocker.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer.py +3 -3
- package/hooks/blocking/test_code_rules_enforcer_any_exempt_files.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_cap_meta.py +0 -2
- package/hooks/blocking/test_code_rules_enforcer_comment_string_awareness.py +184 -0
- package/hooks/blocking/test_code_rules_enforcer_type_checking_scope.py +82 -0
- package/hooks/blocking/test_code_rules_enforcer_unused_imports.py +29 -29
- package/hooks/blocking/test_gh_body_arg_blocker.py +7 -8
- package/hooks/blocking/test_gh_pr_author_enforcer.py +1 -1
- package/hooks/blocking/test_gh_pr_author_restore.py +1 -1
- package/hooks/blocking/test_hedging_language_blocker.py +2 -2
- package/hooks/blocking/test_md_to_html_blocker.py +463 -8
- package/hooks/blocking/test_pr_converge_bugteam_enforcer.py +1 -1
- package/hooks/blocking/test_pr_description_enforcer.py +1210 -13
- package/hooks/blocking/test_question_to_user_enforcer.py +1 -1
- package/hooks/blocking/windows_rmtree_blocker.py +5 -11
- package/hooks/diagnostic/hook_log_extractor.py +1 -1
- package/hooks/diagnostic/hook_log_init.py +1 -1
- package/hooks/diagnostic/hook_log_stop_wrapper.py +1 -1
- package/hooks/diagnostic/test_hook_log_extractor.py +1 -1
- package/hooks/diagnostic/test_hook_log_init.py +2 -2
- package/hooks/diagnostic/test_hook_log_stop_wrapper.py +1 -1
- package/hooks/git-hooks/gate_utils.py +1 -1
- package/hooks/git-hooks/pre_commit.py +1 -1
- package/hooks/git-hooks/pre_push.py +1 -1
- package/hooks/git-hooks/test_config.py +5 -5
- package/hooks/git-hooks/test_pre_push.py +6 -6
- package/hooks/{config → hooks_constants}/code_rules_enforcer_constants.py +37 -0
- package/hooks/hooks_constants/code_rules_path_utils_constants.py +28 -0
- package/hooks/hooks_constants/md_to_html_blocker_constants.py +82 -0
- package/hooks/{config → hooks_constants}/pr_converge_bugteam_enforcer_state.py +1 -1
- package/hooks/hooks_constants/pr_description_enforcer_constants.py +154 -0
- package/hooks/{config → hooks_constants}/pre_tool_use_stdin.py +1 -1
- package/hooks/{config → hooks_constants}/project_paths_reader.py +2 -2
- package/hooks/{config → hooks_constants}/test_banned_identifiers_constants.py +1 -1
- package/hooks/{config → hooks_constants}/test_dynamic_stderr_handler.py +1 -1
- package/hooks/{config → hooks_constants}/test_hardcoded_user_path_constants.py +1 -1
- package/hooks/{config → hooks_constants}/test_hook_log_extractor_constants.py +2 -2
- package/hooks/hooks_constants/test_md_to_html_blocker_constants.py +110 -0
- package/hooks/{config → hooks_constants}/test_messages.py +2 -6
- package/hooks/{config → hooks_constants}/test_path_rewriter_constants.py +1 -1
- package/hooks/hooks_constants/test_pr_description_enforcer_constants.py +292 -0
- package/hooks/{config → hooks_constants}/test_pre_tool_use_stdin.py +2 -2
- package/hooks/{config → hooks_constants}/test_project_paths_reader.py +3 -3
- package/hooks/{config → hooks_constants}/test_session_env_cleanup_constants.py +1 -1
- package/hooks/{config → hooks_constants}/test_setup_project_paths_constants.py +2 -2
- package/hooks/{config → hooks_constants}/test_unused_module_import_constants.py +1 -1
- package/hooks/lifecycle/pr_converge_bugteam_skill_tracker.py +5 -11
- package/hooks/lifecycle/test_pr_converge_bugteam_skill_tracker.py +1 -1
- package/hooks/session/gh_pr_author_session_cleanup.py +5 -6
- package/hooks/session/session_env_cleanup.py +4 -10
- package/hooks/session/test_gh_pr_author_session_cleanup.py +1 -1
- package/hooks/session/test_untracked_repo_detector.py +2 -2
- package/hooks/session/untracked_repo_detector.py +6 -12
- package/hooks/test__gh_pr_author_swap_utils.py +1 -1
- package/hooks/validators/run_all_validators.py +16 -5
- package/hooks/validators/test_output_formatter.py +46 -0
- package/hooks/workflow/doc_gist_auto_publish.py +1 -1
- package/hooks/workflow/md_to_html_companion.py +8 -15
- package/hooks/workflow/test_md_to_html_companion.py +184 -23
- package/package.json +1 -1
- package/rules/ask-user-question-required.md +1 -1
- package/rules/vault-context.md +1 -1
- package/scripts/{config → dev_env_scripts_constants}/timing.py +1 -1
- package/scripts/setup_project_paths.py +49 -11
- package/scripts/sweep_empty_dirs.py +10 -1
- package/scripts/test_setup_project_paths.py +2 -2
- package/scripts/test_sweep_empty_dirs.py +2 -6
- package/skills/_shared/pr-loop/scripts/_path_resolver.py +1 -1
- package/skills/_shared/pr-loop/scripts/build_audit_prompt.py +1 -1
- package/skills/_shared/pr-loop/scripts/build_fix_prompt.py +1 -1
- package/skills/_shared/pr-loop/scripts/init_loop_state.py +1 -1
- package/skills/_shared/pr-loop/scripts/teardown_worktrees.py +1 -1
- package/skills/_shared/pr-loop/scripts/write_audit_outcomes.py +2 -2
- package/skills/_shared/pr-loop/scripts/write_fix_outcomes.py +2 -2
- package/skills/bugteam/PROMPTS.md +1 -1
- package/skills/bugteam/SKILL.md +1 -1
- package/skills/bugteam/reference/github-pr-reviews.md +1 -1
- package/skills/bugteam/scripts/{_claude_permissions_common.py → _bugteam_permissions_common.py} +110 -13
- package/skills/bugteam/scripts/bugteam_code_rules_gate.py +1 -13
- package/skills/bugteam/scripts/bugteam_fix_hookspath.py +1 -16
- package/skills/bugteam/scripts/bugteam_preflight.py +1 -13
- package/skills/bugteam/scripts/bugteam_scripts_constants/claude_permissions_common_constants.py +69 -0
- package/skills/bugteam/scripts/grant_project_claude_permissions.py +117 -12
- package/skills/bugteam/scripts/probe_code_rules_enforcer_check.py +1 -1
- package/skills/bugteam/scripts/reflow_skill_md.py +1 -1
- package/skills/bugteam/scripts/revoke_project_claude_permissions.py +71 -25
- package/skills/bugteam/scripts/{test__claude_permissions_common.py → test__bugteam_permissions_common.py} +4 -4
- package/skills/bugteam/scripts/test_agent_config_carveout.py +356 -0
- package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +0 -26
- package/skills/bugteam/scripts/{test_claude_permissions_common.py → test_bugteam_permissions_common.py} +3 -66
- package/skills/bugteam/scripts/test_bugteam_preflight.py +2 -27
- package/skills/bugteam/scripts/windows_safe_rmtree.py +1 -1
- package/skills/doc-gist/SKILL.md +1 -1
- package/skills/doc-gist/scripts/gist_upload.py +1 -1
- package/skills/implement/SKILL.md +66 -0
- package/skills/implement/scripts/append_note.py +133 -0
- package/skills/implement/scripts/implement_scripts_constants/__init__.py +0 -0
- package/skills/implement/scripts/implement_scripts_constants/notes_constants.py +12 -0
- package/skills/implement/scripts/test_append_note.py +191 -0
- package/skills/pr-converge/pr_converge_skill_constants/__init__.py +0 -0
- package/skills/pr-converge/{config → pr_converge_skill_constants}/constants.py +6 -1
- package/skills/pr-converge/scripts/check_bugbot_ci.py +2 -2
- package/skills/pr-converge/scripts/check_convergence.py +175 -29
- package/skills/pr-converge/scripts/check_pending_reviews.py +2 -2
- package/skills/pr-converge/scripts/fetch_copilot_reviews.py +2 -2
- package/skills/pr-converge/scripts/post_fix_reply.py +2 -2
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/__init__.py +0 -0
- package/skills/pr-converge/scripts/{config → pr_converge_scripts_constants}/pr_converge_constants.py +1 -1
- package/skills/pr-converge/scripts/reflow_skill_md.py +90 -16
- package/skills/pr-converge/scripts/test_check_bugbot_ci.py +1 -1
- package/skills/pr-converge/scripts/test_check_convergence.py +324 -0
- package/skills/pr-converge/scripts/test_reflow_skill_md.py +0 -31
- package/skills/refine/SKILL.md +257 -0
- package/skills/refine/templates/implementation-notes-template.html +56 -0
- package/skills/refine/templates/plan-template.md +60 -0
- package/skills/session-log/SKILL.md +98 -233
- package/_shared/pr-loop/scripts/config/claude_permissions_constants.py +0 -36
- package/hooks/config/pr_description_enforcer_constants.py +0 -19
- package/hooks/config/test_pr_description_enforcer_constants.py +0 -82
- package/skills/bugteam/scripts/config/claude_permissions_common_constants.py +0 -20
- package/skills/bugteam/scripts/test_grant_project_claude_permissions.py +0 -55
- package/skills/bugteam/scripts/test_revoke_project_claude_permissions.py +0 -55
- package/skills/pr-converge/scripts/evict_cached_config_modules.py +0 -20
- package/skills/pr-converge/scripts/test_evict_cached_config_modules.py +0 -22
- /package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/__init__.py +0 -0
- /package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/code_rules_gate_constants.py +0 -0
- /package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/fix_hookspath_constants.py +0 -0
- /package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/post_audit_thread_constants.py +0 -0
- /package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/preflight_constants.py +0 -0
- /package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/reviews_disabled_constants.py +0 -0
- /package/hooks/git-hooks/{config.py → git_hooks_constants/__init__.py} +0 -0
- /package/hooks/{config → hooks_constants}/__init__.py +0 -0
- /package/hooks/{config → hooks_constants}/any_type_config.py +0 -0
- /package/hooks/{config → hooks_constants}/banned_identifiers_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/blocking_check_limits.py +0 -0
- /package/hooks/{config → hooks_constants}/bot_mention_comment_blocker_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/convergence_branch_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/doc_gist_auto_publish_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/dynamic_stderr_handler.py +0 -0
- /package/hooks/{config → hooks_constants}/gh_pr_author_swap_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/hardcoded_user_path_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/hook_log_extractor_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/html_companion_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/inline_tuple_string_magic_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/messages.py +0 -0
- /package/hooks/{config → hooks_constants}/path_rewriter_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/pr_converge_bugteam_enforcer_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/session_env_cleanup_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/setup_project_paths_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/state_description_blocker_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/stuttering_check_config.py +0 -0
- /package/hooks/{config → hooks_constants}/stuttering_import_binding_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/sys_path_insert_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/unused_module_import_constants.py +0 -0
- /package/hooks/{config → hooks_constants}/windows_rmtree_blocker_constants.py +0 -0
- /package/{skills/_shared/pr-loop/scripts/config → hooks/lifecycle}/__init__.py +0 -0
- /package/{skills/bugteam/scripts/config → hooks/session}/__init__.py +0 -0
- /package/scripts/{config → dev_env_scripts_constants}/__init__.py +0 -0
- /package/skills/{doc-gist/scripts/config → _shared/pr-loop/scripts/skills_pr_loop_constants}/__init__.py +0 -0
- /package/skills/_shared/pr-loop/scripts/{config → skills_pr_loop_constants}/path_resolver_constants.py +0 -0
- /package/skills/{pr-converge/config → bugteam/scripts/bugteam_scripts_constants}/__init__.py +0 -0
- /package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/bugteam_code_rules_gate_constants.py +0 -0
- /package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/bugteam_fix_hookspath_constants.py +0 -0
- /package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/bugteam_preflight_constants.py +0 -0
- /package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/probe_code_rules_enforcer_check_constants.py +0 -0
- /package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/reflow_skill_md_constants.py +0 -0
- /package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/windows_safe_rmtree_constants.py +0 -0
- /package/skills/{pr-converge/scripts/config → doc-gist/scripts/doc_gist_scripts_constants}/__init__.py +0 -0
- /package/skills/doc-gist/scripts/{config → doc_gist_scripts_constants}/gist_upload_constants.py +0 -0
- /package/skills/pr-converge/scripts/{config → pr_converge_scripts_constants}/reflow_skill_md_constants.py +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"""Regression tests for grant_project_claude_permissions module-import behavior.
|
|
2
|
-
|
|
3
|
-
Pins the loop1-2 fix: a defensive cache pop above sys.path.insert evicts every
|
|
4
|
-
cached `config` and `config.<submodule>` entry so the from-import binds against
|
|
5
|
-
scripts/config/ rather than a stale parent package shadowing it.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
import importlib
|
|
11
|
-
import sys
|
|
12
|
-
from pathlib import Path
|
|
13
|
-
from types import ModuleType
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
_script_directory = str(Path(__file__).resolve().parent)
|
|
17
|
-
if _script_directory not in sys.path:
|
|
18
|
-
sys.path.insert(0, _script_directory)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def _reload_grant_with_stale_config_cache() -> ModuleType:
|
|
22
|
-
fake_submodule_name = "config.claude_permissions_common_constants"
|
|
23
|
-
fake_parent_name = "config"
|
|
24
|
-
sentinel_module_a = ModuleType(fake_parent_name)
|
|
25
|
-
sentinel_module_b = ModuleType(fake_submodule_name)
|
|
26
|
-
sys.modules[fake_parent_name] = sentinel_module_a
|
|
27
|
-
sys.modules[fake_submodule_name] = sentinel_module_b
|
|
28
|
-
try:
|
|
29
|
-
target_module = sys.modules.get("grant_project_claude_permissions")
|
|
30
|
-
if target_module is None:
|
|
31
|
-
target_module = importlib.import_module("grant_project_claude_permissions")
|
|
32
|
-
else:
|
|
33
|
-
target_module = importlib.reload(target_module)
|
|
34
|
-
finally:
|
|
35
|
-
sys.modules.pop(fake_parent_name, None)
|
|
36
|
-
sys.modules.pop(fake_submodule_name, None)
|
|
37
|
-
return target_module
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def test_grant_module_imports_when_config_is_already_cached(tmp_path: Path) -> None:
|
|
41
|
-
"""Module import must succeed even when sys.modules carries a stale `config`.
|
|
42
|
-
|
|
43
|
-
Regression for loop1-2 — invokes is_valid_project_root after reload to
|
|
44
|
-
prove the binding came from scripts/config/ rather than the sentinel.
|
|
45
|
-
"""
|
|
46
|
-
reloaded_module = _reload_grant_with_stale_config_cache()
|
|
47
|
-
not_a_project_root = tmp_path / "empty_dir"
|
|
48
|
-
not_a_project_root.mkdir()
|
|
49
|
-
assert reloaded_module.is_valid_project_root(not_a_project_root) is False, (
|
|
50
|
-
"is_valid_project_root must run normally after the reload — proof that "
|
|
51
|
-
"the from-import bound real constants, not the stale cached ones"
|
|
52
|
-
)
|
|
53
|
-
a_git_project_root = tmp_path / "git_project"
|
|
54
|
-
(a_git_project_root / ".git").mkdir(parents=True)
|
|
55
|
-
assert reloaded_module.is_valid_project_root(a_git_project_root) is True
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"""Regression tests for revoke_project_claude_permissions module-import behavior.
|
|
2
|
-
|
|
3
|
-
Pins the loop1-3 fix: a defensive cache pop above sys.path.insert evicts every
|
|
4
|
-
cached `config` and `config.<submodule>` entry so the from-import binds against
|
|
5
|
-
scripts/config/ rather than a stale parent package shadowing it.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
import importlib
|
|
11
|
-
import sys
|
|
12
|
-
from pathlib import Path
|
|
13
|
-
from types import ModuleType
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
_script_directory = str(Path(__file__).resolve().parent)
|
|
17
|
-
if _script_directory not in sys.path:
|
|
18
|
-
sys.path.insert(0, _script_directory)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def _reload_revoke_with_stale_config_cache() -> ModuleType:
|
|
22
|
-
fake_submodule_name = "config.claude_permissions_common_constants"
|
|
23
|
-
fake_parent_name = "config"
|
|
24
|
-
sentinel_module_a = ModuleType(fake_parent_name)
|
|
25
|
-
sentinel_module_b = ModuleType(fake_submodule_name)
|
|
26
|
-
sys.modules[fake_parent_name] = sentinel_module_a
|
|
27
|
-
sys.modules[fake_submodule_name] = sentinel_module_b
|
|
28
|
-
try:
|
|
29
|
-
target_module = sys.modules.get("revoke_project_claude_permissions")
|
|
30
|
-
if target_module is None:
|
|
31
|
-
target_module = importlib.import_module("revoke_project_claude_permissions")
|
|
32
|
-
else:
|
|
33
|
-
target_module = importlib.reload(target_module)
|
|
34
|
-
finally:
|
|
35
|
-
sys.modules.pop(fake_parent_name, None)
|
|
36
|
-
sys.modules.pop(fake_submodule_name, None)
|
|
37
|
-
return target_module
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def test_revoke_module_imports_when_config_is_already_cached(tmp_path: Path) -> None:
|
|
41
|
-
"""Module import must succeed even when sys.modules carries a stale `config`.
|
|
42
|
-
|
|
43
|
-
Regression for loop1-3 — invokes is_valid_project_root after reload to
|
|
44
|
-
prove the binding came from scripts/config/ rather than the sentinel.
|
|
45
|
-
"""
|
|
46
|
-
reloaded_module = _reload_revoke_with_stale_config_cache()
|
|
47
|
-
not_a_project_root = tmp_path / "empty_dir"
|
|
48
|
-
not_a_project_root.mkdir()
|
|
49
|
-
assert reloaded_module.is_valid_project_root(not_a_project_root) is False, (
|
|
50
|
-
"is_valid_project_root must run normally after the reload — proof that "
|
|
51
|
-
"the from-import bound real constants, not the stale cached ones"
|
|
52
|
-
)
|
|
53
|
-
a_claude_project_root = tmp_path / "claude_project"
|
|
54
|
-
(a_claude_project_root / ".claude").mkdir(parents=True)
|
|
55
|
-
assert reloaded_module.is_valid_project_root(a_claude_project_root) is True
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"""Evict cached ``config`` package bindings before local ``config`` imports.
|
|
2
|
-
|
|
3
|
-
Mirrors ``_evict_config_module`` in the repository root ``conftest.py``: stale
|
|
4
|
-
``config`` or ``config.*`` entries from other packages must not satisfy
|
|
5
|
-
``from config.…`` in these scripts after ``sys.path`` inserts the script directory.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
import importlib
|
|
11
|
-
import sys
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def evict_cached_config_modules() -> None:
|
|
15
|
-
for each_cached_module_name in list(sys.modules):
|
|
16
|
-
is_config_root = each_cached_module_name == "config"
|
|
17
|
-
is_config_submodule = each_cached_module_name.startswith("config.")
|
|
18
|
-
if is_config_root or is_config_submodule:
|
|
19
|
-
sys.modules.pop(each_cached_module_name, None)
|
|
20
|
-
importlib.invalidate_caches()
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"""Tests for evict_cached_config_modules."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import sys
|
|
6
|
-
import types
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
|
|
9
|
-
_scripts_directory = Path(__file__).resolve().parent
|
|
10
|
-
if str(_scripts_directory) not in sys.path:
|
|
11
|
-
sys.path.insert(0, str(_scripts_directory))
|
|
12
|
-
|
|
13
|
-
from evict_cached_config_modules import evict_cached_config_modules
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def test_should_remove_root_config_and_submodules() -> None:
|
|
17
|
-
fake = types.ModuleType("config")
|
|
18
|
-
sys.modules["config"] = fake
|
|
19
|
-
sys.modules["config.stale_submodule"] = types.ModuleType("config.stale_submodule")
|
|
20
|
-
evict_cached_config_modules()
|
|
21
|
-
assert "config" not in sys.modules
|
|
22
|
-
assert "config.stale_submodule" not in sys.modules
|
|
File without changes
|
/package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/code_rules_gate_constants.py
RENAMED
|
File without changes
|
/package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/fix_hookspath_constants.py
RENAMED
|
File without changes
|
/package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/post_audit_thread_constants.py
RENAMED
|
File without changes
|
|
File without changes
|
/package/_shared/pr-loop/scripts/{config → pr_loop_shared_constants}/reviews_disabled_constants.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/skills/{pr-converge/config → bugteam/scripts/bugteam_scripts_constants}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/bugteam_preflight_constants.py
RENAMED
|
File without changes
|
|
File without changes
|
/package/skills/bugteam/scripts/{config → bugteam_scripts_constants}/reflow_skill_md_constants.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/skills/doc-gist/scripts/{config → doc_gist_scripts_constants}/gist_upload_constants.py
RENAMED
|
File without changes
|
|
File without changes
|