From 81e27e534c86646900a14de437b7cccc8620c88e Mon Sep 17 00:00:00 2001 From: takeokunn Date: Sun, 19 Jul 2026 20:14:01 +0900 Subject: [PATCH] refactor: build the option-relation rulebase via copy-rulebase make-option-relation-rulebase reconstructed a fresh rulebase from *option-relation-rules*'s visible clauses by hand. cl-prolog exposes copy-rulebase for exactly this (a detached copy including full runtime state, not just clauses), so use it instead of hand-rolling the same result from rulebase-visible-clauses. Recovered while auditing every branch/worktree in this checkout for fixes that never made it to main: this was one half of 159eb01 "ci: enforce dogfood coverage thresholds" on the feat/cl-prolog-cl-weave reference branch. The other half of that commit (a coverage-threshold CI gate) targets cl-weave APIs (make-coverage-summary, ensure-coverage-thresholds, coverage-summary-plist) that no longer exist in the cl-weave version main now depends on, so it isn't a like-for-like port and is left out. --- src/option-relations.lisp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/option-relations.lisp b/src/option-relations.lisp index 19124c0..bc4130b 100644 --- a/src/option-relations.lisp +++ b/src/option-relations.lisp @@ -22,10 +22,7 @@ (:conflicts ?left ?right)))))) (defun make-option-relation-rulebase (specs) - (let ((rulebase - (cl-prolog:make-rulebase - :clauses - (cl-prolog:rulebase-visible-clauses *option-relation-rules*)))) + (let ((rulebase (cl-prolog:copy-rulebase *option-relation-rules*))) (dolist (spec specs rulebase) (dolist (target (option-requires spec)) (let ((dependency (resolve-related-option-spec specs target)))