kibi-core 0.22.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/kb.pl +25 -1
- package/src/rule_registry.pl +1 -1
package/package.json
CHANGED
package/src/kb.pl
CHANGED
|
@@ -2466,12 +2466,36 @@ coverage_gap(Req, missing_test) :-
|
|
|
2466
2466
|
has_scenario(Req),
|
|
2467
2467
|
\+ has_test(Req).
|
|
2468
2468
|
|
|
2469
|
+
% implements REQ-core-validation-rules
|
|
2470
|
+
% Only a current must-priority requirement owes scenario and test coverage.
|
|
2469
2471
|
must_requirement(Req) :-
|
|
2470
2472
|
kb_entity(Req, req, Props),
|
|
2471
2473
|
memberchk(priority=Priority, Props),
|
|
2472
2474
|
normalize_term_atom(Priority, PriorityAtom),
|
|
2473
2475
|
atom_string(PriorityAtom, PriorityStr),
|
|
2474
|
-
sub_string(PriorityStr, _, 4, 0, "must")
|
|
2476
|
+
sub_string(PriorityStr, _, 4, 0, "must"),
|
|
2477
|
+
coverage_current_requirement(Req, Props).
|
|
2478
|
+
|
|
2479
|
+
%% coverage_current_requirement(+Req, +Props)
|
|
2480
|
+
% A requirement is still owed coverage unless it is retired: superseded by
|
|
2481
|
+
% another requirement (the target of `supersedes`), carrying a retired status,
|
|
2482
|
+
% or `closed` without the `implemented` tag (a closed requirement is retired
|
|
2483
|
+
% work unless it records that it was implemented, the same rule the
|
|
2484
|
+
% coverage-depth review applies). A requirement without a status keeps the
|
|
2485
|
+
% obligation.
|
|
2486
|
+
coverage_current_requirement(Req, Props) :-
|
|
2487
|
+
\+ kb_relationship(supersedes, _, Req),
|
|
2488
|
+
( memberchk(status=RawStatus, Props)
|
|
2489
|
+
-> normalize_term_atom(RawStatus, Status)
|
|
2490
|
+
; Status = missing
|
|
2491
|
+
),
|
|
2492
|
+
\+ memberchk(Status, [deprecated, superseded, archived, removed, deleted, rejected]),
|
|
2493
|
+
( Status == closed
|
|
2494
|
+
-> memberchk(tags=RawTags, Props),
|
|
2495
|
+
normalize_term_atom_list(RawTags, Tags),
|
|
2496
|
+
memberchk(implemented, Tags)
|
|
2497
|
+
; true
|
|
2498
|
+
).
|
|
2475
2499
|
|
|
2476
2500
|
has_scenario(Req) :-
|
|
2477
2501
|
once(kb_relationship(specified_by, Req, _)).
|
package/src/rule_registry.pl
CHANGED
|
@@ -243,7 +243,7 @@ rule_predicate_arity('symbol-owner-superseded', 1).
|
|
|
243
243
|
rule_predicate_arity('adr-unlinked', 1).
|
|
244
244
|
rule_predicate_arity('adr-proposed', 1).
|
|
245
245
|
|
|
246
|
-
rule_description('must-priority-coverage', 'Every must-priority requirement must have a scenario and a test').
|
|
246
|
+
rule_description('must-priority-coverage', 'Every current must-priority requirement (not superseded, retired, or closed without the implemented tag) must have a scenario and a test').
|
|
247
247
|
rule_description('symbol-coverage', 'Production symbols need qualifying coverage via covered_by plus a canonical requirement/scenario test path').
|
|
248
248
|
rule_description('symbol-traceability', 'Production symbols must directly implement requirements for ownership; covered_by is coverage only and executable_for is test identity only').
|
|
249
249
|
rule_description('symbol-granularity', 'A symbol with traceability relationships must not link its source file coarsely while narrower behavioral symbols are available, unless it carries an allowed granularity_reason; the staged gate\'s symbol_granularity_violation evaluated KB-wide').
|