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: inject detection guard condition into custom steps and improve test ordering assertions
- Inject detectionStepCondition into custom threat detection steps (pre/post) unless the user already provides an if: condition. This ensures custom steps are skipped when detection_guard says run_detection is false.
- Update test to verify post-step ordering relative to id: detection_agentic_execution (stable engine step marker) instead of just "Setup threat detection"
- Add TestCustomThreatDetectionStepsGuardCondition to explicitly test condition injection and preservation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/db33799b-37fd-4489-96df-09ea24078ed9
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
t.Error("Expected to find 'Parse and conclude threat detection' step")
465
466
}
466
467
467
-
// Verify ordering: post-steps should come after setup and before upload/conclude
468
-
ifpostStepPos<setupStepPos {
469
-
t.Errorf("Custom post-steps should come after 'Setup threat detection'. Got post-step at position %d, setup at position %d", postStepPos, setupStepPos)
468
+
// Verify ordering: post-steps should come after the engine execution step
469
+
ifpostStepPos<engineStepPos {
470
+
t.Errorf("Custom post-steps should come after engine execution step. Got post-step at position %d, engine at position %d", postStepPos, engineStepPos)
470
471
}
471
472
ifpostStepPos>uploadStepPos {
472
473
t.Errorf("Custom post-steps should come before 'Upload threat detection log'. Got post-step at position %d, upload at position %d", postStepPos, uploadStepPos)
0 commit comments