feat: seedgo 100% compliance across all 12 branches + close-pr command

This commit is contained in:
AIOSAI
2026-05-16 19:55:47 -07:00
parent 07cc88891b
commit 60c36cccc6
56 changed files with 1305 additions and 1460 deletions
+2 -2
View File
@@ -189,7 +189,7 @@ trigger/
## Testing
551 tests across 18 test modules, all passing. Coverage: 74/74 public functions (100%).
551 tests across 18 test modules, all passing. Coverage: 76/76 public functions (100%).
```bash
cd src/aipass/trigger && pytest # Run all tests
@@ -199,7 +199,7 @@ Test files: `test_core`, `test_errors`, `test_medic`, `test_error_registry`, `te
## Compliance
Seedgo: 99%. Zero type errors. All core categories at 100%.
Seedgo: 100% (34/34 standards). Zero type errors. All categories at 100%.
---
+13
View File
@@ -96,6 +96,19 @@ def json_file_lock(path: Path):
fcntl.flock(lock_f, fcntl.LOCK_UN)
def read_text_file(path: Path, encoding: str = "utf-8") -> str:
"""Read a text file safely with encoding specification."""
with open(path, "r", encoding=encoding) as f:
return f.read()
def write_text_file(path: Path, content: str, encoding: str = "utf-8") -> None:
"""Write text content to a file, creating parent directories as needed."""
path.parent.mkdir(parents=True, exist_ok=True)
with open(path, "w", encoding=encoding) as f:
f.write(content)
def print_introspection():
"""Display module introspection info."""
try:
+4 -3
View File
@@ -72,11 +72,12 @@ def _ensure_service_installed() -> bool:
return False
aipass_home = _get_aipass_home()
template = _TEMPLATE_PATH.read_text()
from aipass.trigger.apps.config import read_text_file, write_text_file
template = read_text_file(_TEMPLATE_PATH)
rendered = template.replace("{{AIPASS_HOME}}", str(aipass_home))
_SERVICE_UNIT_PATH.parent.mkdir(parents=True, exist_ok=True)
_SERVICE_UNIT_PATH.write_text(rendered)
write_text_file(_SERVICE_UNIT_PATH, rendered)
logger.info("[MEDIC] Installed systemd unit to %s", _SERVICE_UNIT_PATH)
_systemctl("daemon-reload")
@@ -0,0 +1,2 @@
# Project-specific Python dependencies beyond the base AIPass install.
# Add packages here that trigger branch requires but are not in the shared pyproject.toml.