Skip to content

The markup check says something, or says nothing - #383

Merged
sepehr-safari merged 1 commit into
mainfrom
the-markup-check-says-something
Sep 22, 2026
Merged

sepehr-safari merged 1 commit into
mainfrom
the-markup-check-says-something

Conversation

@sepehr-safari

Copy link
Copy Markdown
Contributor

Closes #382. Follow-up to #378, which made the check run in CI for the first time.

It then reported 130 warnings, which is a wall nobody reads and a real finding nobody can see.

Five were real

Declared and referenced nowhere at all, in src/main.zig or src/tests.zig:

active_npub · identity_kind_label · logout_confirming · previews_state · previews_action

Plain accessors, left behind when settings controls moved into the Zig view and took different accessors with them. The warning offers bind it, remove it, or declare it. For these the answer was remove.

The other 125 are expected

This app draws its own view in Zig and src/onboarding.native is 24 lines of join screen, so most of the model genuinely is read only by Zig. They are declared in the two view_unbound lists with a note saying why, which is what those lists are for.

Why clear them at all

Not tidiness. At 130 lines a genuine finding is indistinguishable from the noise around it, which is exactly how five dead functions sat there unnoticed. At zero, a newly added field or Msg tag is the only thing the check says.

So the thing worth checking is that it can still fail:

$ (remove one declared tag)
warning: Msg tag "toggle_bookmark" is never dispatched from markup - wire it to
an on-* event, or add it to pub const view_unbound if only Zig code sends it
  (warnings: 1)
$ (put it back)
  warnings: 0

A check silenced into permanent silence is worse than the noise it replaced.

The guard from #378 earned its keep immediately

Editing this file after emitting the contract leaves the contract stale, and a stale contract makes the typed half skip and report zero warnings for the wrong reason. I hit that mid-change. The zero above was verified against a freshly built contract, and the CI step now fails rather than believing it.

#378 made the check run in CI for the first time. It then reported 130 warnings, which is a wall of output nobody reads and a real finding nobody can see.

Five of them were real. `active_npub`, `identity_kind_label`, `logout_confirming`, `previews_state` and `previews_action` were declared and referenced nowhere at all, in this file or in the tests: plain accessors left behind when settings controls moved into the Zig view and took different accessors with them. The warning offers bind it, remove it, or declare it; for these the answer was remove, and they are gone.

The remaining 125 are expected rather than defects. This app draws its own view in Zig and the one markup file is 24 lines of join screen, so most of the model really is read only by Zig. They are declared in the two `view_unbound` lists now, with a note saying why, which is what those lists are for.

The point of clearing them is not tidiness. At 130 lines a genuine finding is indistinguishable from the noise around it, which is how five dead functions sat there. At zero, a newly added field or Msg tag is the only thing the check says.

So the thing worth checking was that it can still fail. Removing one declared tag brings it back by name, one warning and nothing else, and putting it back returns to silence. A check silenced into permanent silence would be worse than the noise it replaced.

One trap on the way, and the guard from #378 caught it exactly as intended: editing this file after emitting the contract leaves the contract stale, and a stale contract makes the typed half skip and report zero warnings for the wrong reason. The zero here was verified with a freshly built contract, and the CI step now fails rather than believing that.

Closes #382.
@sepehr-safari
sepehr-safari merged commit 0f72c14 into main Sep 22, 2026
6 checks passed
@sepehr-safari
sepehr-safari deleted the the-markup-check-says-something branch September 22, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The markup check reports 130 warnings, and five of them are real

1 participant