Commit Graph

2 Commits

Author SHA1 Message Date
freemo 21a551cd6f fix(resource): use namespace column instead of name heuristic in db_to_spec() for built_in field
CI / lint (pull_request) Failing after 21s
CI / typecheck (pull_request) Successful in 58s
CI / security (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 36s
CI / coverage (pull_request) Has been skipped
CI / build (pull_request) Successful in 20s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 7m5s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 17m36s
CI / integration_tests (pull_request) Successful in 23m17s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
Replace the name-based heuristic ("/" not in name) in db_to_spec() with
the authoritative namespace column check (str(raw_ns) == "builtin"),
consistent with the existing _load_type_registry() implementation.

The old heuristic would misclassify custom resource types whose names
contain no "/" as built-in, potentially blocking their removal via
remove_type(). The namespace column is set to "builtin" by spec_to_db()
for all built-in types and to the actual namespace prefix for custom types,
making it the correct source of truth.

A name-heuristic fallback is retained for legacy rows where the namespace
column is NULL (e.g. rows inserted directly without going through
spec_to_db()).

New BDD scenarios added to resource_registry_service_coverage.feature:
- _db_to_spec sets built_in True when namespace column is "builtin"
- _db_to_spec sets built_in False when namespace column is not "builtin"

ISSUES CLOSED: #3013
2026-04-05 08:29:36 +00:00
freemo 77a0a95dc3 Tests: Added coverage to get us to 97%
CI / lint (pull_request) Successful in 26s
CI / security (pull_request) Successful in 26s
CI / typecheck (pull_request) Successful in 1m2s
CI / quality (pull_request) Successful in 17s
CI / build (pull_request) Successful in 25s
CI / integration_tests (pull_request) Failing after 3m2s
CI / lint (push) Successful in 23s
CI / unit_tests (pull_request) Failing after 17m24s
CI / docker (pull_request) Has been skipped
CI / typecheck (push) Successful in 40s
CI / security (push) Successful in 37s
CI / quality (push) Successful in 25s
CI / build (push) Successful in 16s
CI / integration_tests (push) Failing after 7m16s
CI / unit_tests (push) Failing after 24m35s
CI / docker (push) Has been skipped
CI / coverage (pull_request) Failing after 37m0s
CI / coverage (push) Failing after 37m15s
2026-02-17 21:00:05 -05:00