wip: paren balance fixes in policy blocks + engineering standards scaffolding
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 16s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 16s
- Fix unbalanced parens in org-skill-policy.org (8 blocks) - Add org-skill-engineering-standards.lisp scaffolding - Add org-skill-self-fix.lisp helper - Add test runners and tool-permissions tests Note: Some fixes may be over-corrections. Full structural audit needed.
This commit is contained in:
40
tests/tool-permissions-tests.lisp
Normal file
40
tests/tool-permissions-tests.lisp
Normal file
@@ -0,0 +1,40 @@
|
||||
(defpackage :opencortex-tool-permissions-tests
|
||||
(:use :cl :fiveam :opencortex)
|
||||
(:export #:tool-permissions-suite))
|
||||
|
||||
(in-package :opencortex-tool-permissions-tests)
|
||||
|
||||
(def-suite tool-permissions-suite
|
||||
:description "Tests for Tool Permission Tiers.")
|
||||
|
||||
(in-suite tool-permissions-suite)
|
||||
|
||||
(test default-permission-is-allow
|
||||
"Unknown tools default to :allow."
|
||||
(is (eq (get-tool-permission :unknown-tool-xyz) :allow)))
|
||||
|
||||
(test set-and-get-permission
|
||||
"Verify :allow, :deny, :ask persist correctly."
|
||||
(set-tool-permission :test-tool-abc :deny)
|
||||
(is (eq (get-tool-permission :test-tool-abc) :deny))
|
||||
(set-tool-permission :test-tool-abc :ask)
|
||||
(is (eq (get-tool-permission :test-tool-abc) :ask))
|
||||
(set-tool-permission :test-tool-abc :allow)
|
||||
(is (eq (get-tool-permission :test-tool-abc) :allow)))
|
||||
|
||||
(test permission-gate-allow
|
||||
":allow returns :allow."
|
||||
(set-tool-permission :gate-allow-tool :allow)
|
||||
(is (eq (check-tool-permission-gate :gate-allow-tool nil) :allow)))
|
||||
|
||||
(test permission-gate-deny
|
||||
":deny returns :deny."
|
||||
(set-tool-permission :gate-deny-tool :deny)
|
||||
(is (eq (check-tool-permission-gate :gate-deny-tool nil) :deny)))
|
||||
|
||||
(test permission-gate-ask
|
||||
":ask returns a signal list."
|
||||
(set-tool-permission :gate-ask-tool :ask)
|
||||
(let ((result (check-tool-permission-gate :gate-ask-tool nil)))
|
||||
(is (listp result))
|
||||
(is (eq (car result) :ask))))
|
||||
Reference in New Issue
Block a user