{"action":"created","comment":{"url":"https://api.github.com/repos/cerner/clara-rules/pulls/comments/136121902","pull_request_review_id":59617095,"id":136121902,"diff_hunk":"@@ -47,8 +49,41 @@\n ;; the intent of these tests is to create patterns in the engine that cover edge cases and other paths\n ;; of concern in clara.rules.memory.\n \n-(def-rules-test test-query-for-many-added-elements\n+(def-rules-test test-negation-complex-join-with-numerous-non-matching-facts-inserted-after-descendant-negation\n+  {:rules []\n+   :queries [query1 [[]\n+                     [[Hot (= ?t temperature)]\n+                      [:not [Cold (tu/join-filter-equals ?t temperature)]]]]]\n+   :sessions [empty-session [query1] {}]}\n+  (let [lots-of-hot (doall (for [_ (range 100)]\n+                             (->Hot 20)))]\n+    (is (= (repeat 100 {:?t 20})\n+           (-> empty-session\n+               (insert (->Cold 10))\n+               fire-rules\n+               (insert-all lots-of-hot)\n+               fire-rules\n+               (query query1))))))\n+;; These tests are here to verify https://github.com/cerner/clara-rules/issues/303\n+(def-rules-test test-negation-complex-join-with-numerous-non-matching-facts-inserted-after-descendant-negation-with-equals\n+  {:rules []\n+   :queries [query1 [[]\n+                     [[Hot (= ?t temperature)]\n+                      [:not [Cold (= ?t temperature)]]]]]\n+   :sessions [empty-session [query1] {}]}\n+  (let [lots-of-hot (doall (for [_ (range 100)]\n+                             (->Hot 20)))]\n+    (is (= (repeat 100 {:?t 20})\n+           (-> empty-session\n+               (insert (->Cold 10))\n+               fire-rules\n+               (insert-all lots-of-hot)\n+               fire-rules\n+               (query query1))))))\n \n+;; This is the same test as above except using `=` istead of `join-filter-equals`.\n+;; The two tests are supposed to be in sync.","path":"src/test/common/clara/test_memory.cljc","position":69,"original_position":69,"commit_id":"7b8454f971ee20b512027cb80df85a1f328c38f0","original_commit_id":"7b8454f971ee20b512027cb80df85a1f328c38f0","user":{"login":"WilliamParker","id":5178123,"avatar_url":"https://avatars0.githubusercontent.com/u/5178123?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamParker","html_url":"https://github.com/WilliamParker","followers_url":"https://api.github.com/users/WilliamParker/followers","following_url":"https://api.github.com/users/WilliamParker/following{/other_user}","gists_url":"https://api.github.com/users/WilliamParker/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamParker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamParker/subscriptions","organizations_url":"https://api.github.com/users/WilliamParker/orgs","repos_url":"https://api.github.com/users/WilliamParker/repos","events_url":"https://api.github.com/users/WilliamParker/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamParker/received_events","type":"User","site_admin":false},"body":"This comment looks like it applies to the preexisting test below.  Addressing https://github.com/cerner/clara-rules/pull/335/files#r136121745 should take care of this.","created_at":"2017-08-30T16:33:08Z","updated_at":"2017-08-30T16:33:08Z","html_url":"https://github.com/cerner/clara-rules/pull/335#discussion_r136121902","pull_request_url":"https://api.github.com/repos/cerner/clara-rules/pulls/335","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cerner/clara-rules/pulls/comments/136121902"},"html":{"href":"https://github.com/cerner/clara-rules/pull/335#discussion_r136121902"},"pull_request":{"href":"https://api.github.com/repos/cerner/clara-rules/pulls/335"}}},"pull_request":{"url":"https://api.github.com/repos/cerner/clara-rules/pulls/335","id":136265411,"html_url":"https://github.com/cerner/clara-rules/pull/335","diff_url":"https://github.com/cerner/clara-rules/pull/335.diff","patch_url":"https://github.com/cerner/clara-rules/pull/335.patch","issue_url":"https://api.github.com/repos/cerner/clara-rules/issues/335","number":335,"state":"open","locked":false,"title":"Issue 303: Clara transient memory and memory getter mutable return values should not be used lazily","user":{"login":"ris5438","id":13489461,"avatar_url":"https://avatars1.githubusercontent.com/u/13489461?v=4","gravatar_id":"","url":"https://api.github.com/users/ris5438","html_url":"https://github.com/ris5438","followers_url":"https://api.github.com/users/ris5438/followers","following_url":"https://api.github.com/users/ris5438/following{/other_user}","gists_url":"https://api.github.com/users/ris5438/gists{/gist_id}","starred_url":"https://api.github.com/users/ris5438/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ris5438/subscriptions","organizations_url":"https://api.github.com/users/ris5438/orgs","repos_url":"https://api.github.com/users/ris5438/repos","events_url":"https://api.github.com/users/ris5438/events{/privacy}","received_events_url":"https://api.github.com/users/ris5438/received_events","type":"User","site_admin":false},"body":"Issue 303: Replaced all instances of for in engine to eager-for\r\n\r\nIssue 303: moved macro to platform, added cljc support, added tests\r\n\r\nIssue 303: Fix indentation of eager-for's\r\n\r\nIssue 303: Moved the get-elements calls in NegationWithJoinFilterNode out of the :when predicate\r\n\r\nIssue 303: Fixed ns header and made the macro non platform specific\r\n\r\nIssue 303: Moved join-filter-equals to a common ns clara.tools.testing-utils\r\n\r\nIssue 303: Made testing_utils from clj to cljc\r\n\r\nBrief summary: Replaced all instances of for in engine with an eager-for macro which forces realization. Also moved the get-elements calls in NegationWithJoinFilterNode out of the :when predicate forcing them to occur before passing the lazy sequence of tokens on.","created_at":"2017-08-17T14:04:13Z","updated_at":"2017-08-30T16:33:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39444d30c9ef7ce422edf7a26cb4e16acabf101e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/cerner/clara-rules/pulls/335/commits","review_comments_url":"https://api.github.com/repos/cerner/clara-rules/pulls/335/comments","review_comment_url":"https://api.github.com/repos/cerner/clara-rules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cerner/clara-rules/issues/335/comments","statuses_url":"https://api.github.com/repos/cerner/clara-rules/statuses/7b8454f971ee20b512027cb80df85a1f328c38f0","head":{"label":"ris5438:Issue303","ref":"Issue303","sha":"7b8454f971ee20b512027cb80df85a1f328c38f0","user":{"login":"ris5438","id":13489461,"avatar_url":"https://avatars1.githubusercontent.com/u/13489461?v=4","gravatar_id":"","url":"https://api.github.com/users/ris5438","html_url":"https://github.com/ris5438","followers_url":"https://api.github.com/users/ris5438/followers","following_url":"https://api.github.com/users/ris5438/following{/other_user}","gists_url":"https://api.github.com/users/ris5438/gists{/gist_id}","starred_url":"https://api.github.com/users/ris5438/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ris5438/subscriptions","organizations_url":"https://api.github.com/users/ris5438/orgs","repos_url":"https://api.github.com/users/ris5438/repos","events_url":"https://api.github.com/users/ris5438/events{/privacy}","received_events_url":"https://api.github.com/users/ris5438/received_events","type":"User","site_admin":false},"repo":{"id":99698749,"name":"clara-rules","full_name":"ris5438/clara-rules","owner":{"login":"ris5438","id":13489461,"avatar_url":"https://avatars1.githubusercontent.com/u/13489461?v=4","gravatar_id":"","url":"https://api.github.com/users/ris5438","html_url":"https://github.com/ris5438","followers_url":"https://api.github.com/users/ris5438/followers","following_url":"https://api.github.com/users/ris5438/following{/other_user}","gists_url":"https://api.github.com/users/ris5438/gists{/gist_id}","starred_url":"https://api.github.com/users/ris5438/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ris5438/subscriptions","organizations_url":"https://api.github.com/users/ris5438/orgs","repos_url":"https://api.github.com/users/ris5438/repos","events_url":"https://api.github.com/users/ris5438/events{/privacy}","received_events_url":"https://api.github.com/users/ris5438/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ris5438/clara-rules","description":"Forward-chaining rules in Clojure","fork":true,"url":"https://api.github.com/repos/ris5438/clara-rules","forks_url":"https://api.github.com/repos/ris5438/clara-rules/forks","keys_url":"https://api.github.com/repos/ris5438/clara-rules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ris5438/clara-rules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ris5438/clara-rules/teams","hooks_url":"https://api.github.com/repos/ris5438/clara-rules/hooks","issue_events_url":"https://api.github.com/repos/ris5438/clara-rules/issues/events{/number}","events_url":"https://api.github.com/repos/ris5438/clara-rules/events","assignees_url":"https://api.github.com/repos/ris5438/clara-rules/assignees{/user}","branches_url":"https://api.github.com/repos/ris5438/clara-rules/branches{/branch}","tags_url":"https://api.github.com/repos/ris5438/clara-rules/tags","blobs_url":"https://api.github.com/repos/ris5438/clara-rules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ris5438/clara-rules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ris5438/clara-rules/git/refs{/sha}","trees_url":"https://api.github.com/repos/ris5438/clara-rules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ris5438/clara-rules/statuses/{sha}","languages_url":"https://api.github.com/repos/ris5438/clara-rules/languages","stargazers_url":"https://api.github.com/repos/ris5438/clara-rules/stargazers","contributors_url":"https://api.github.com/repos/ris5438/clara-rules/contributors","subscribers_url":"https://api.github.com/repos/ris5438/clara-rules/subscribers","subscription_url":"https://api.github.com/repos/ris5438/clara-rules/subscription","commits_url":"https://api.github.com/repos/ris5438/clara-rules/commits{/sha}","git_commits_url":"https://api.github.com/repos/ris5438/clara-rules/git/commits{/sha}","comments_url":"https://api.github.com/repos/ris5438/clara-rules/comments{/number}","issue_comment_url":"https://api.github.com/repos/ris5438/clara-rules/issues/comments{/number}","contents_url":"https://api.github.com/repos/ris5438/clara-rules/contents/{+path}","compare_url":"https://api.github.com/repos/ris5438/clara-rules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ris5438/clara-rules/merges","archive_url":"https://api.github.com/repos/ris5438/clara-rules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ris5438/clara-rules/downloads","issues_url":"https://api.github.com/repos/ris5438/clara-rules/issues{/number}","pulls_url":"https://api.github.com/repos/ris5438/clara-rules/pulls{/number}","milestones_url":"https://api.github.com/repos/ris5438/clara-rules/milestones{/number}","notifications_url":"https://api.github.com/repos/ris5438/clara-rules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ris5438/clara-rules/labels{/name}","releases_url":"https://api.github.com/repos/ris5438/clara-rules/releases{/id}","deployments_url":"https://api.github.com/repos/ris5438/clara-rules/deployments","created_at":"2017-08-08T13:56:32Z","updated_at":"2017-08-08T13:56:33Z","pushed_at":"2017-08-17T14:02:25Z","git_url":"git://github.com/ris5438/clara-rules.git","ssh_url":"git@github.com:ris5438/clara-rules.git","clone_url":"https://github.com/ris5438/clara-rules.git","svn_url":"https://github.com/ris5438/clara-rules","homepage":"http://www.clara-rules.org","size":1976,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cerner:master","ref":"master","sha":"8b366344338e8ea86c5495574e28f2f9438b13fa","user":{"login":"cerner","id":1873208,"avatar_url":"https://avatars1.githubusercontent.com/u/1873208?v=4","gravatar_id":"","url":"https://api.github.com/users/cerner","html_url":"https://github.com/cerner","followers_url":"https://api.github.com/users/cerner/followers","following_url":"https://api.github.com/users/cerner/following{/other_user}","gists_url":"https://api.github.com/users/cerner/gists{/gist_id}","starred_url":"https://api.github.com/users/cerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cerner/subscriptions","organizations_url":"https://api.github.com/users/cerner/orgs","repos_url":"https://api.github.com/users/cerner/repos","events_url":"https://api.github.com/users/cerner/events{/privacy}","received_events_url":"https://api.github.com/users/cerner/received_events","type":"Organization","site_admin":false},"repo":{"id":11697963,"name":"clara-rules","full_name":"cerner/clara-rules","owner":{"login":"cerner","id":1873208,"avatar_url":"https://avatars1.githubusercontent.com/u/1873208?v=4","gravatar_id":"","url":"https://api.github.com/users/cerner","html_url":"https://github.com/cerner","followers_url":"https://api.github.com/users/cerner/followers","following_url":"https://api.github.com/users/cerner/following{/other_user}","gists_url":"https://api.github.com/users/cerner/gists{/gist_id}","starred_url":"https://api.github.com/users/cerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cerner/subscriptions","organizations_url":"https://api.github.com/users/cerner/orgs","repos_url":"https://api.github.com/users/cerner/repos","events_url":"https://api.github.com/users/cerner/events{/privacy}","received_events_url":"https://api.github.com/users/cerner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cerner/clara-rules","description":"Forward-chaining rules in Clojure","fork":false,"url":"https://api.github.com/repos/cerner/clara-rules","forks_url":"https://api.github.com/repos/cerner/clara-rules/forks","keys_url":"https://api.github.com/repos/cerner/clara-rules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cerner/clara-rules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cerner/clara-rules/teams","hooks_url":"https://api.github.com/repos/cerner/clara-rules/hooks","issue_events_url":"https://api.github.com/repos/cerner/clara-rules/issues/events{/number}","events_url":"https://api.github.com/repos/cerner/clara-rules/events","assignees_url":"https://api.github.com/repos/cerner/clara-rules/assignees{/user}","branches_url":"https://api.github.com/repos/cerner/clara-rules/branches{/branch}","tags_url":"https://api.github.com/repos/cerner/clara-rules/tags","blobs_url":"https://api.github.com/repos/cerner/clara-rules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cerner/clara-rules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cerner/clara-rules/git/refs{/sha}","trees_url":"https://api.github.com/repos/cerner/clara-rules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cerner/clara-rules/statuses/{sha}","languages_url":"https://api.github.com/repos/cerner/clara-rules/languages","stargazers_url":"https://api.github.com/repos/cerner/clara-rules/stargazers","contributors_url":"https://api.github.com/repos/cerner/clara-rules/contributors","subscribers_url":"https://api.github.com/repos/cerner/clara-rules/subscribers","subscription_url":"https://api.github.com/repos/cerner/clara-rules/subscription","commits_url":"https://api.github.com/repos/cerner/clara-rules/commits{/sha}","git_commits_url":"https://api.github.com/repos/cerner/clara-rules/git/commits{/sha}","comments_url":"https://api.github.com/repos/cerner/clara-rules/comments{/number}","issue_comment_url":"https://api.github.com/repos/cerner/clara-rules/issues/comments{/number}","contents_url":"https://api.github.com/repos/cerner/clara-rules/contents/{+path}","compare_url":"https://api.github.com/repos/cerner/clara-rules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cerner/clara-rules/merges","archive_url":"https://api.github.com/repos/cerner/clara-rules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cerner/clara-rules/downloads","issues_url":"https://api.github.com/repos/cerner/clara-rules/issues{/number}","pulls_url":"https://api.github.com/repos/cerner/clara-rules/pulls{/number}","milestones_url":"https://api.github.com/repos/cerner/clara-rules/milestones{/number}","notifications_url":"https://api.github.com/repos/cerner/clara-rules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cerner/clara-rules/labels{/name}","releases_url":"https://api.github.com/repos/cerner/clara-rules/releases{/id}","deployments_url":"https://api.github.com/repos/cerner/clara-rules/deployments","created_at":"2013-07-27T01:17:19Z","updated_at":"2017-08-30T14:41:12Z","pushed_at":"2017-08-20T04:51:52Z","git_url":"git://github.com/cerner/clara-rules.git","ssh_url":"git@github.com:cerner/clara-rules.git","clone_url":"https://github.com/cerner/clara-rules.git","svn_url":"https://github.com/cerner/clara-rules","homepage":"http://www.clara-rules.org","size":1975,"stargazers_count":641,"watchers_count":641,"language":"Clojure","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":66,"mirror_url":null,"open_issues_count":48,"forks":66,"open_issues":48,"watchers":641,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cerner/clara-rules/pulls/335"},"html":{"href":"https://github.com/cerner/clara-rules/pull/335"},"issue":{"href":"https://api.github.com/repos/cerner/clara-rules/issues/335"},"comments":{"href":"https://api.github.com/repos/cerner/clara-rules/issues/335/comments"},"review_comments":{"href":"https://api.github.com/repos/cerner/clara-rules/pulls/335/comments"},"review_comment":{"href":"https://api.github.com/repos/cerner/clara-rules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cerner/clara-rules/pulls/335/commits"},"statuses":{"href":"https://api.github.com/repos/cerner/clara-rules/statuses/7b8454f971ee20b512027cb80df85a1f328c38f0"}},"author_association":"NONE"}}
{"actor":{"display_login":"WilliamParker"}}