MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / _identifier

Function _identifier

scripts/test-impact/coverage_live_v2.py:144–161  ·  view source on GitHub ↗
(value, suite=False)

Source from the content-addressed store, hash-verified

142
143
144def _identifier(value, suite=False):
145 if type(value) is not str or not value:
146 _error("input", "registry identifier must be a nonempty string")
147 try:
148 data = value.encode("utf-8", "strict")
149 except UnicodeError:
150 _error("input", "registry identifier is not valid UTF-8")
151 if any(char in data for char in (0, 9, 10, 13)) or (suite and b":" in data):
152 _error("input", "registry identifier violates producer grammar")
153 if not suite and value == "*":
154 _error("input", "setup test name is reserved")
155 # Native routing uses each identifier as one filesystem component. The
156 # pure producer accepts a wider byte grammar; those routes are unsupported.
157 if value in (".", "..") or "/" in value or "\\" in value:
158 _error("unsupported", "registry identifier cannot be a native path component")
159 if not suite and value in ("_setup", "_setup.child"):
160 _error("unsupported", "registry test collides with native setup routing")
161 return data
162
163
164def _registry(path, image):

Callers 2

_registryFunction · 0.85
collectFunction · 0.85

Calls 2

_errorFunction · 0.85
typeFunction · 0.50

Tested by

no test coverage detected