mirror of
https://github.com/Strategic-Automation/violin.git
synced 2026-08-14 12:33:37 +02:00
33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
SKILL = ROOT / "skills/pentest/SKILL.md"
|
|
SOUL = ROOT / "SOUL.md"
|
|
BOOTSTRAP = ROOT / "plugins/violin_guard/bootstrap.py"
|
|
SYNC = ROOT / "plugins/violin_guard/state.py"
|
|
|
|
|
|
def test_profile_docs_never_recommend_new_session_for_compression():
|
|
text = "\n".join(
|
|
path.read_text(encoding="utf-8") for path in [SKILL, SOUL, BOOTSTRAP, SYNC]
|
|
).lower()
|
|
forbidden = [
|
|
"recommend `/new`",
|
|
"after `/goal set`, `/new`, or context compression",
|
|
"after `/new`, `/goal set`, or context compression",
|
|
"after starting a fresh session",
|
|
"fresh session or after",
|
|
"fresh session",
|
|
"session boundaries that invalidate",
|
|
]
|
|
for phrase in forbidden:
|
|
assert phrase not in text
|
|
|
|
|
|
def test_compression_guidance_resumes_in_current_session_from_state():
|
|
text = SKILL.read_text(encoding="utf-8")
|
|
assert "Continue in the current session" in text
|
|
assert "$ENG_DIR/state/checkpoint.json" in text
|
|
assert "$ENG_DIR/state/ptt.md" in text
|
|
assert "$ENG_DIR/state/phase-summary.md" in text
|