bug(uko): uko_runtime.feature missing layer 2 (paradigm/format specializations) indexing scenario — four-layer spec not fully verified at runtime #9351

Closed
opened 2026-04-14 15:21:00 +00:00 by HAL9000 · 2 comments
Owner

Summary

features/uko_runtime.feature verifies that indexing a Python file populates layers 0, 1, and 3 of the UKO ontology, but layer 2 (paradigm/format specializations) is not tested. The specification requires all four layers to be verified: universal foundation (0), domain specializations (1), paradigm/format specializations (2), and technology-specific (3).

Metadata

  • Commit Message: bug(uko): add missing layer 2 indexing scenario to uko_runtime.feature
  • Branch: bugfix/uko-runtime-feature-missing-layer-2-indexing-scenario

Background and Context

features/uko_runtime.feature contains layer-population scenarios for layers 0, 1, and 3, but the layer 2 (paradigm/format specializations) scenario is absent. The UKO ontology specification mandates all four layers be verified at the runtime/indexing level. While features/uko_ontology.feature tests layer 2 nodes (e.g., Class, Interface, Method, Attribute) at the ontology parsing level, the runtime indexing path for layer 2 is not covered, leaving a gap in the four-layer guarantee.

Evidence

features/uko_runtime.feature contains these layer-population scenarios:

Scenario: Indexing a Python file populates layer 0 (universal)
  ...
  Then uko the graph has a predicate-object pair "uko:layer" "0"

Scenario: Indexing a Python file populates layer 1 (domain)
  ...
  Then uko the graph has a predicate-object pair "uko:layer" "1"

Scenario: Indexing a Python file populates layer 3 (technology)
  ...
  Then uko the graph has a predicate-object pair "uko:layer" "3"

Missing scenario:

Scenario: Indexing a Python file populates layer 2 (paradigm)
  Given uko a PythonAnalyzer is registered
  And uko a UKOIndexer with all backends
  When uko I index a Python resource "01HQ8ZDRX50000000000000XXX" with content "class Foo:\n    pass"
  Then uko the graph has a predicate-object pair "uko:layer" "2"

Note: features/uko_ontology.feature does test layer 2 nodes (e.g., Class, Interface, Method, Attribute) at the ontology parsing level, but the runtime indexing path for layer 2 is not covered.

Expected Behavior

features/uko_runtime.feature contains a passing scenario for layer 2 (paradigm/format specializations) indexing, ensuring all four layers (0, 1, 2, 3) are verified at the runtime/indexing level.

Acceptance Criteria

  • A Scenario: Indexing a Python file populates layer 2 (paradigm) exists in features/uko_runtime.feature
  • The scenario uses a Python class definition as input to trigger layer 2 triple emission
  • The step uko the graph has a predicate-object pair "uko:layer" "2" passes
  • UKOIndexer is confirmed to emit layer 2 triples when indexing Python OOP constructs (classes, interfaces)
  • All four layers (0, 1, 2, 3) are verified in uko_runtime.feature
  • CI passes with the new scenario

Impact

  • The four-layer guarantee is not fully verified at the runtime/indexing level
  • A regression in layer 2 triple emission by UKOIndexer would go undetected
  • The UAT test specification requirement "Verify UKO ontology has four layers" is only partially satisfied by uko_runtime.feature

Subtasks

  • Add a Scenario: Indexing a Python file populates layer 2 (paradigm) to features/uko_runtime.feature
  • Verify that UKOIndexer actually emits layer 2 triples when indexing Python OOP constructs (classes, interfaces)
  • Ensure the step uko the graph has a predicate-object pair "uko:layer" "2" passes with a Python class definition as input
  • Run nox -s unit_tests -- features/uko_runtime.feature to confirm the new scenario passes

Definition of Done

  • features/uko_runtime.feature contains a passing scenario for layer 2 (paradigm) indexing
  • All four layers (0, 1, 2, 3) are verified in uko_runtime.feature
  • CI passes with the new scenario

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
Agent: new-issue-creator

## Summary `features/uko_runtime.feature` verifies that indexing a Python file populates layers 0, 1, and 3 of the UKO ontology, but **layer 2 (paradigm/format specializations)** is not tested. The specification requires all four layers to be verified: universal foundation (0), domain specializations (1), paradigm/format specializations (2), and technology-specific (3). ## Metadata - **Commit Message**: `bug(uko): add missing layer 2 indexing scenario to uko_runtime.feature` - **Branch**: `bugfix/uko-runtime-feature-missing-layer-2-indexing-scenario` ## Background and Context `features/uko_runtime.feature` contains layer-population scenarios for layers 0, 1, and 3, but the layer 2 (paradigm/format specializations) scenario is absent. The UKO ontology specification mandates all four layers be verified at the runtime/indexing level. While `features/uko_ontology.feature` tests layer 2 nodes (e.g., `Class`, `Interface`, `Method`, `Attribute`) at the ontology parsing level, the **runtime indexing** path for layer 2 is not covered, leaving a gap in the four-layer guarantee. ## Evidence `features/uko_runtime.feature` contains these layer-population scenarios: ```gherkin Scenario: Indexing a Python file populates layer 0 (universal) ... Then uko the graph has a predicate-object pair "uko:layer" "0" Scenario: Indexing a Python file populates layer 1 (domain) ... Then uko the graph has a predicate-object pair "uko:layer" "1" Scenario: Indexing a Python file populates layer 3 (technology) ... Then uko the graph has a predicate-object pair "uko:layer" "3" ``` **Missing scenario:** ```gherkin Scenario: Indexing a Python file populates layer 2 (paradigm) Given uko a PythonAnalyzer is registered And uko a UKOIndexer with all backends When uko I index a Python resource "01HQ8ZDRX50000000000000XXX" with content "class Foo:\n pass" Then uko the graph has a predicate-object pair "uko:layer" "2" ``` Note: `features/uko_ontology.feature` does test layer 2 nodes (e.g., `Class`, `Interface`, `Method`, `Attribute`) at the ontology parsing level, but the **runtime indexing** path for layer 2 is not covered. ## Expected Behavior `features/uko_runtime.feature` contains a passing scenario for layer 2 (paradigm/format specializations) indexing, ensuring all four layers (0, 1, 2, 3) are verified at the runtime/indexing level. ## Acceptance Criteria - [ ] A `Scenario: Indexing a Python file populates layer 2 (paradigm)` exists in `features/uko_runtime.feature` - [ ] The scenario uses a Python class definition as input to trigger layer 2 triple emission - [ ] The step `uko the graph has a predicate-object pair "uko:layer" "2"` passes - [ ] `UKOIndexer` is confirmed to emit layer 2 triples when indexing Python OOP constructs (classes, interfaces) - [ ] All four layers (0, 1, 2, 3) are verified in `uko_runtime.feature` - [ ] CI passes with the new scenario ## Impact - The four-layer guarantee is not fully verified at the runtime/indexing level - A regression in layer 2 triple emission by `UKOIndexer` would go undetected - The UAT test specification requirement "Verify UKO ontology has four layers" is only partially satisfied by `uko_runtime.feature` ## Subtasks - [ ] Add a `Scenario: Indexing a Python file populates layer 2 (paradigm)` to `features/uko_runtime.feature` - [ ] Verify that `UKOIndexer` actually emits layer 2 triples when indexing Python OOP constructs (classes, interfaces) - [ ] Ensure the step `uko the graph has a predicate-object pair "uko:layer" "2"` passes with a Python class definition as input - [ ] Run `nox -s unit_tests -- features/uko_runtime.feature` to confirm the new scenario passes ## Definition of Done - [ ] `features/uko_runtime.feature` contains a passing scenario for layer 2 (paradigm) indexing - [ ] All four layers (0, 1, 2, 3) are verified in `uko_runtime.feature` - [ ] CI passes with the new scenario --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor Agent: new-issue-creator
HAL9000 added this to the v3.4.0 milestone 2026-04-14 15:24:13 +00:00
Author
Owner

Triage: Verified [AUTO-OWNR-1]

Valid testing gap: features/uko_runtime.feature verifies layers 0, 1, and 3 of the UKO ontology at runtime but is missing the layer 2 (paradigm/format specializations) scenario. The four-layer guarantee is not fully verified at the runtime/indexing level, leaving a potential regression blind spot.

Assigning to v3.4.0 (ACMS v1 + Context Scaling) as UKO is part of the ACMS pipeline. Priority Medium — test coverage gap.

MoSCoW: Should Have — complete four-layer verification is important for the UKO ontology guarantee.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Triage: Verified** [AUTO-OWNR-1] Valid testing gap: `features/uko_runtime.feature` verifies layers 0, 1, and 3 of the UKO ontology at runtime but is missing the layer 2 (paradigm/format specializations) scenario. The four-layer guarantee is not fully verified at the runtime/indexing level, leaving a potential regression blind spot. Assigning to **v3.4.0** (ACMS v1 + Context Scaling) as UKO is part of the ACMS pipeline. Priority **Medium** — test coverage gap. MoSCoW: **Should Have** — complete four-layer verification is important for the UKO ontology guarantee. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Implementation Attempt — Tier 1: haiku — Success

Implemented the missing layer 2 (paradigm/OO) indexing scenario for uko_runtime.feature.

Changes made:

  1. src/cleveragents/domain/models/acms/python_analyzer.py: Added rdf:type uko-oo:Class (layer 2) triple emission in _extract_class() before the existing rdf:type uko-py:Class (layer 3) triple. Python classes are OO constructs and should emit both paradigm-level (layer 2) and technology-specific (layer 3) type triples.
  2. features/uko_runtime.feature: Added Scenario: Indexing a Python file populates layer 2 (paradigm) using resource ID 01HQ8ZDRX50000000000000012 with class Foo:\n pass content.

Quality gate status: lint ✓, typecheck ✓, unit_tests ✓ (15181 scenarios passed, 0 failed — 1 new scenario added)

PR: #9965


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

**Implementation Attempt** — Tier 1: haiku — Success Implemented the missing layer 2 (paradigm/OO) indexing scenario for `uko_runtime.feature`. **Changes made:** 1. `src/cleveragents/domain/models/acms/python_analyzer.py`: Added `rdf:type uko-oo:Class` (layer 2) triple emission in `_extract_class()` before the existing `rdf:type uko-py:Class` (layer 3) triple. Python classes are OO constructs and should emit both paradigm-level (layer 2) and technology-specific (layer 3) type triples. 2. `features/uko_runtime.feature`: Added `Scenario: Indexing a Python file populates layer 2 (paradigm)` using resource ID `01HQ8ZDRX50000000000000012` with `class Foo:\n pass` content. **Quality gate status:** lint ✓, typecheck ✓, unit_tests ✓ (15181 scenarios passed, 0 failed — 1 new scenario added) **PR:** https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/9965 --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9351
No description provided.