docs: add Contract sections + tag tests to contract items (Tier 2 — 10 files)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
This commit is contained in:
@@ -199,6 +199,7 @@ sorted by priority (highest first). Returns a rejection plist or the action."
|
||||
(in-suite pipeline-reason-suite)
|
||||
|
||||
(test test-decide-gate-safety
|
||||
"Contract 1: cognitive-verify blocks unsafe actions with :LOG rejection."
|
||||
(clrhash passepartout::*skill-registry*)
|
||||
(passepartout::defskill :mock-safety
|
||||
:priority 50
|
||||
@@ -214,7 +215,7 @@ sorted by priority (highest first). Returns a rejection plist or the action."
|
||||
(is (eq :LOG (getf result :type)))))
|
||||
|
||||
(test test-cognitive-verify-pass-through
|
||||
"Safe actions should pass through cognitive-verify unchanged."
|
||||
"Contract 1: safe actions pass through cognitive-verify unchanged."
|
||||
(clrhash passepartout::*skill-registry*)
|
||||
(passepartout::defskill :mock-passthrough
|
||||
:priority 50
|
||||
@@ -228,7 +229,7 @@ sorted by priority (highest first). Returns a rejection plist or the action."
|
||||
(is (equal candidate result))))
|
||||
|
||||
(test test-cognitive-verify-empty-registry
|
||||
"When no gates are registered, the action passes through unchanged."
|
||||
"Contract 1: with no gates registered, action passes through unchanged."
|
||||
(clrhash passepartout::*skill-registry*)
|
||||
(let* ((candidate '(:type :REQUEST :payload (:action :shell :cmd "ls")))
|
||||
(signal '(:type :EVENT :payload (:sensor :user-input)))
|
||||
@@ -236,7 +237,7 @@ sorted by priority (highest first). Returns a rejection plist or the action."
|
||||
(is (equal candidate result))))
|
||||
|
||||
(test test-cognitive-verify-approval-required
|
||||
"A gate returning :level :approval-required should produce an approval event."
|
||||
"Contract 1: gate returning :approval-required produces an approval event."
|
||||
(clrhash passepartout::*skill-registry*)
|
||||
(passepartout::defskill :mock-approval
|
||||
:priority 50
|
||||
|
||||
Reference in New Issue
Block a user