Files
logos-app/tests
Dario Gabriel LipicarandClaude Opus 5 c96ef04be6 test(plugins): pin what the core-dependency loader actually reads
PluginLoader::loadCoreDependencies read each `dependencies[]` entry as

    QString depName = dep.toString();
    if (depName.isEmpty()) continue;

QVariant::toString() on a QVariantMap returns a NULL QString — no
diagnostic, no exception. So the moment the module ABI is widened to send
the object form {"name": …, "version": "^2.0.0", "signer": "did:…"} that
the LGX spec already allows and lgpm already parses, every CONSTRAINED
core dependency is silently skipped and the ui plugin mounts on top of an
unloaded dependency.

This commit changes no behaviour. It gives that decision a name
(logos::readDependencyEntry) and a test, so the next commit's fix is
visible as a diff in outcomes rather than a diff in expressions.

Red, as expected — 5 of 14 cases fail against the extracted behaviour:

  FAIL!  : object_entry_yields_its_name()                    kind 1, want 0
  FAIL!  : object_entry_without_constraints_yields_its_name() kind 1, want 0
  FAIL!  : json_object_entry_yields_its_name()               kind 1, want 0
  FAIL!  : hash_object_entry_yields_its_name()               kind 1, want 0
  FAIL!  : a_number_is_unrecognised()                        kind 0, want 1

(1 = Unrecognised, i.e. skipped. The last one is the mirror image: a
non-string scalar is currently stringified and loaded as a module name.)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 11:03:29 -03:00
..