You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FIX]: Apply the _async naming convention repo-wide
Clears the .flake8 baseline added in the previous commit, so RMP001 is now
enforced everywhere with no exemptions.
Renames 8 async functions in rampart/ and 139 async test functions, plus all
call sites, tests and docs. The test standards already required the suffix on
async test names and 99 tests already followed it; this makes the rest
consistent. pytest discovers tests by the test_ prefix, so the suffix does not
affect collection and the test count is unchanged.
InjectionHandle is a @runtime_checkable Protocol, so renaming wait_until_ready
changes what isinstance() accepts. Attacks.xpia had an unguarded else branch
that treated a non-conforming handle as a list, producing an unrelated
"not iterable" TypeError deep in execution instead of a clear error at the
boundary. That branch is now guarded and covered by tests.
1.**Inject** — Place payloads into the agent's data sources via surfaces. Each `surface.inject(payload)` returns an [`InjectionHandle`][rampart.core.injection.InjectionHandle].
31
-
2.**Wait** — Handles call `wait_until_ready()` to allow indexing. Runs concurrently for multiple surfaces.
31
+
2.**Wait**: Handles call `wait_until_ready_async()` to allow indexing. Runs concurrently for multiple surfaces.
32
32
3.**Trigger** — Send benign prompts that cause the agent to retrieve the injected content. Triggers are never adversarial — the attack is in the payload, not the prompt.
33
33
4.**Evaluate** — Check each turn for the attack objective. Early-stops on detection.
34
34
5.**Clean up** — Remove injected content. Guaranteed via `AsyncExitStack`, even on exceptions.
Copy file name to clipboardExpand all lines: docs/contributing/extending-rampart.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -337,7 +337,7 @@ For the basic protocol skeleton, see [Implementing Surfaces](../usage/authoring-
337
337
338
338
-**`Surface.inject` does not activate** — it only prepares the handle. Activation happens when an execution strategy enters the handle as an async context manager.
339
339
-**`__aexit__` must be idempotent and must not raise** — cleanup runs even on exceptions, and a failing cleanup must not mask the original error.
340
-
-**`wait_until_ready` should bound itself** with `TimeoutError` rather than block indefinitely. For simple delay-based waits, call `sleep_until_ready` from `rampart.core.injection`.
340
+
-**`wait_until_ready_async` should bound itself** with `TimeoutError` rather than block indefinitely. For simple delay-based waits, call `sleep_until_ready_async` from `rampart.core.injection`.
341
341
-**Raise `InfrastructureError`** for transient, external failures (timeouts, rate limits, service outages). It's the documented convention for surfaces and adapters to signal "not a safety signal" — `BaseExecution` catches all exceptions and produces an `ERROR` result either way, but the exception type is preserved in metadata for triage.
342
342
343
343
For a complete reference, see [`OneDriveSurface`](https://github.com/microsoft/RAMPART/blob/main/rampart/surfaces/onedrive.py).
0 commit comments