Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/routers/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ async def list_layers(request: Request):
# List of all known layers (from layers.py + Session 28-30 additions)
known_layers = [
"services", "personas", "feature_flags", "containers", "endpoints",
"screens", "literals", "agents", "infrastructure", "requirements",
"schemas", "screens", "literals", "agents", "infrastructure", "requirements",
"planes", "connections", "environments", "cp_skills", "cp_agents",
Comment on lines 264 to 266
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding 'schemas' fixes the layer count, but introspection still cannot locate a JSON Schema file for the 'schemas' layer (schema/schemas.schema.json or schema/schema.schema.json is not present, and _get_schema_path has no special-case mapping). As a result, /model/layers will report has_schema=false for 'schemas' and /model/schema-def/schemas will 404; either add the schema file or extend _get_schema_path mappings so this layer can be introspected like the others.

Copilot uses AI. Check for mistakes.
Comment on lines 263 to 266
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regression (40 vs 41 layers) would be easy to catch with a small API test. Please add a test that calls GET /model/layers and asserts that 'schemas' is present (and optionally that summary.total_layers matches the expected count) to prevent future drift.

Copilot uses AI. Check for mistakes.
Comment on lines 262 to 266
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

known_layers is hard-coded here and appears to duplicate the authoritative layer list in api/routers/admin.py:_LAYER_FILES. This drift already caused the missing 'schemas' regression; consider building known_layers from _LAYER_FILES.keys() (and only appending truly non-file-backed layers) to keep /model/layers in sync automatically.

Copilot uses AI. Check for mistakes.
"runbooks", "cp_workflows", "cp_policies", "components", "hooks",
"ts_types", "mcp_servers", "prompts", "security_controls", "projects",
Expand Down