Class: RailsAiBridge::Doctor::Checkers::RegistryChecker
- Inherits:
-
BaseChecker
- Object
- BaseChecker
- RailsAiBridge::Doctor::Checkers::RegistryChecker
- Defined in:
- lib/rails_ai_bridge/doctor/checkers/registry_checker.rb
Overview
Verifies the registry manifest is present, valid, and resolvable.
Checks (in order):
- The configured
registry_manifest_pathexists. - The manifest JSON parses successfully.
RegistryManifest.validate!passes schema validation.Registry.build_resolverreturns a non-nil resolver.- The lockfile exists and matches (when
lockfile_pathis configured).
Each failure short-circuits with an actionable fix hint so the user can resolve the first problem before chasing downstream symptoms.
Instance Attribute Summary
Attributes inherited from BaseChecker
Instance Method Summary collapse
-
#call ⇒ Doctor::Check
:pass,:warn, or:fail.
Methods inherited from BaseChecker
Constructor Details
This class inherits a constructor from RailsAiBridge::Doctor::Checkers::BaseChecker
Instance Method Details
#call ⇒ Doctor::Check
Returns :pass, :warn, or :fail.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rails_ai_bridge/doctor/checkers/registry_checker.rb', line 19 def call return missing_manifest_check unless manifest_path_exists? return invalid_json_check unless manifest_parses? return validation_failed_check unless manifest_validates? resolver = build_resolver return resolver_failed_check(resolver) unless resolver return lockfile_check if lockfile_configured? && !lockfile_exists? new_check(name: 'Registry', status: :pass, message: 'Registry manifest is valid and resolvable', fix: nil) end |