tier3: contracts + tests for 12 remaining modules (all 39 files now have Contracts)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 3s

This commit is contained in:
2026-05-05 12:36:42 -04:00
parent dcb5a1f1a6
commit a34b598858
21 changed files with 474 additions and 39 deletions

View File

@@ -1,5 +1,7 @@
(in-package :passepartout)
(in-package :passepartout)
(defvar *archivist-last-scribe* 0
"Universal time of the last Scribe distillation run.")
@@ -237,3 +239,28 @@ and dispatches as needed. Called by the deterministic gate."
:priority 100
:trigger (lambda (ctx) (eq (getf (getf ctx :payload) :sensor) :heartbeat))
:deterministic #'archivist-run)
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload :fiveam :silent t))
(defpackage :passepartout-system-archivist-tests
(:use :cl :fiveam :passepartout)
(:export #:archivist-suite))
(in-package :passepartout-system-archivist-tests)
(def-suite archivist-suite :description "Verification of the Archivist skill")
(in-suite archivist-suite)
(test test-extract-headlines
"Contract 1: archivist-extract-headlines parses Org content."
(let* ((content "* My Headline :tag1:tag2:~%Body text here~%* Another Headline")
(headlines (archivist-extract-headlines content)))
(is (listp headlines))
(is (>= (length headlines) 1))))
(test test-headline-to-filename
"Contract 2: archivist-headline-to-filename sanitizes titles."
(let ((filename (archivist-headline-to-filename "My Project: Overview")))
(is (search "my_project_overview" filename :test #'char-equal))
(is (not (search ":" filename)))))