responsive.sk

Article

Lekalo 0.6.5 for kids ... what commands say about a project

Article cover illustration: Architecture, lekalo, rust, architecture

A new tool is a claim.

A claim nobody ran against their own project is mixed ... it looks like everything and is worth nothing.

Lekalo 0.6.5 added seven surfaces: trace assess, coupling, ai-lint, waivers, architecture-profile, metrics and requirements.

We tried every one against the model of this repository.

So we are not saying "we support it". We are saying what it returned.

Start with which lekalo you actually run

The first thing we paid for was not in the model.

make picks the binary like this:

# Makefile
LEKALO ?= $(shell command -v lekalo 2>/dev/null || echo "$$HOME/.cargo/bin/lekalo")

~/.cargo/bin was not on our PATH, so command -v found nothing and make used the second half.

Version 0.6.3 was sitting there.

In it the new commands do not exist and lock --check returns 1.

Binary--versioncoupling, ai-lint, architecture-profilelock --check
~/.cargo/bin/lekalo then0.6.3missingexit 1
~/.cargo/bin/lekalo now0.6.5presentexit 0

The difference lives entirely in what you see.

"The new surfaces are broken" and "you are running the old CLI" look identical from the outside.

Whoever trusts a red gate without lekalo --version looks for the bug in the model.

The fix is one bet: the release archive with a verified sha256, into ~/.cargo/bin/lekalo.

cargo uninstall lekalo-cli ran first, because cargo managed the original file at v0.3.2 ... and letting a record claim one version while the binary reports another is the same disagreement between a note and the thing it notes, which we met twice more.

What actually runs

Every surface and what it returned:

SurfaceCommandResult against our model
couplinglekalo coupling --module usersruns, exit 0, advisory
architecture-profilelekalo architecture-profile assess --module usersruns, exit 0, advisory
verifymake lekalo-verifyruns, exit 0, verdict degraded
trace assesslekalo trace assessblocked, LEK-TRACE-008
coupling --alllekalo coupling --allblocked, LEK-COUPLING-001
waivers listlekalo waivers listrefused, LEK-AILINT-004
ai-lintlekalo ai-lint --module usersruns and proves nothing
metricslekalo metricsneeds .lekalo/history/

Three rows in that table deserve their own section.

Coupling ... what it says about one module

lekalo coupling --module users returns a picture of a module's dependencies in about two seconds:

ModuleSubjectsPublic contractsSupportingInternalCyclesFindings
users11794300097
blog10671180078

The report carries two codes, and both are real warnings rather than a stamp:

  • coupling.evidence-incomplete (LEK-COUPLING-012) ... the report is honest about the evidence it lacks
  • coupling.shared-mutable-state (LEK-COUPLING-006) ... several declared operations change the same resource

The second code is why this is worth running at all.

It is not a list of bugs, it is the place where two owners fight over one thing.

fan-in and fan-out at the level of a single subject say what moves when that subject moves.

Architecture profile ... one rule with evidence

lekalo architecture-profile assess --module users returns 15 rules from the architecture-core/1 catalog.

The state looks like this:

ModuleAssessmentRules with evidenceRules without evidenceRequired with evidence
usersadvisory1141
blogadvisory1141

That one rule is architecture.stable-semantic-ids ... 56 declared identities for users and 57 for blog.

Fourteen rules without evidence sounds alarming and is not a finding.

It is a missing adapter.

A rule with nothing to measure by does not decide against the project, it simply is not evaluated.

That is exactly why the surface is advisory and not a gate.

A zero you must not believe

lekalo ai-lint --module users exits 0 and prints 0 findings.

That number is treacherous.

The same output carries LEK-AILINT-003 ai-lint.coverage-incomplete ... that is, "collect evidence first, then claim a clean result".

The zero is not a clean bill of health. It is an empty table.

Anyone who gated on it would install a gate that is green because it measures nothing.

When this does not hold

This section belongs in every article, so it is here today too.

coupling --all over the whole project does not work: it wants a coupling profile of its own, and without one it returns LEK-COUPLING-001.

And there is one extra unpleasantness in it: with --json it returns status: invalid and exits 0.

Whoever gates on the exit code misses that.

trace assess does not work and will not until a neutral document with validation evidence exists. Even the verify report is rejected by it, which is the more precise shape of the same missing thing.

waivers list has nothing to list ... the waiver set is validated against the ai-lint family, so an empty set is LEK-AILINT-004, not an empty list.

metrics needs .lekalo/history/, which nobody here keeps. It is not a tool defect, it is a missing input.

And the last one, the most important: not one of these surfaces denies anything today.

They are reports. The gates are make lekalo-check and make lekalo-trace.

Two traps we paid for

The Makefile is a digested source of every trace manifest

Each of the eight manifests in docs/lekalo/trace/ carries an evidenceDigest ... the sha256 of the real file behind a node.

For the make-<target> gates that file is the Makefile.

We added one target to it and all eight digests were rewritten at once.

Locally build.py --check was clean only until we made that commit.

CI caught it correctly and the Lekalo job went red.

The Makefile digest before: a212e116…, after: 185aabbb….

Today a note in the Makefile says this out loud, so the next person does not pay for it again.

A recorded number ages the moment its source moves

docs/lekalo-model.md held a "Canonical digests" table with seven manifestDigest values.

After that commit all of them were wrong ... for exactly the same reason.

The table looked authoritative and was a photograph.

Today it carries the revision it came from and the command that derives it again.

How we wired it

The two surfaces that run clean are wired like this:

make lekalo-reports                                  # users + blog, as markdown
make lekalo-reports LEKALO_MODULES=users,blog,forms  # a wider set

bin/ops/lekalo-reports.php runs both commands for each module, reads the JSON and renders one table per surface.

The codes and their meanings go below the table, not into the bin ... a green row that hides coupling.shared-mutable-state teaches the reader that a green row means a clean report.

The CI lekalo job appends that markdown to $GITHUB_STEP_SUMMARY.

Two modules are the floor and not one: a single module says nothing about whether the shape holds where the model is different.

And one thing in that step is deliberate: LEKALO is passed as a path, not through command -v.

An empty command -v would override the Makefile default with nothing and fail every row.

In practice

  1. Before you believe a red gate, run lekalo --version. The pinned version is 0.6.5, and anything else is a different question.
  1. When you want to know what moves when a module moves, run lekalo coupling --module <module>. It is advisory and it is fast.
  1. When you add a target to the Makefile, run make trace-build. Eight manifests digest that file.
  1. When you write down a number that came from a measurement, write down the revision next to it. Without it the number is a photograph, and photographs age.

Sources

Comments (0)

No comments yet — be the first to react.

Reader questions (0)

No questions yet — be the first to ask.

Stuck on something in this article? Ask below. Your name is shown publicly; your email is never stored. A question appears here once a moderator approves it.