Rebase onto upstream (a4d95fd) #12

Closed
wylab wants to merge 144 commits from rebase-onto-upstream into main
Showing only changes of commit aba9a23cd9 - Show all commits
+12
View File
@@ -73,3 +73,15 @@ def test_strip_all_hidden_markers_removes_markers():
forged = "[HIDDEN:deadbeef] Message"
stripped = strip_all_hidden_markers(forged)
assert stripped == "Message"
def test_system_prompt_includes_visibility_docs(tmp_path):
"""Test that system prompt documents visibility markers."""
from nanobot.agent.context import ContextBuilder
builder = ContextBuilder(workspace=tmp_path)
prompt = builder.build_system_prompt()
# Should document visibility markers
assert "[HIDDEN:" in prompt
assert "cryptographically signed" in prompt.lower()
assert "do not generate" in prompt.lower() or "don't generate" in prompt.lower()