Skip to content

Move each helper to the package that uses it, and drop short mode - #19

Merged
siliconwitch merged 3 commits into
mainfrom
dev
Aug 20, 2026
Merged

Move each helper to the package that uses it, and drop short mode#19
siliconwitch merged 3 commits into
mainfrom
dev

Conversation

@siliconwitch

Copy link
Copy Markdown
Member

TakeJsonFlag sat in dispatch with all five of its callers outside it, so every
part imported dispatch for that one function. It moves down into internal/api,
where CLAUDE.md says shared work goes, and nothing under internal imports
dispatch any more: the graph is dispatch -> api and every part -> api.
TakeServerFlag has one caller, inside Dispatch, so it stops being exported, and
ValidImei had all three of its callers in internal/device and moves there.

--server / trimmed to nothing and then blamed the network, while --server= said
what was actually wrong. The address is now trimmed before it is tested for
emptiness, so /, //, =/, an empty value and a missing one all reach the same
message.

Go caches per package, and the cached result is keyed on the linked test
binary, so a change to one part leaves the others cached and only a change the
login tests link re-runs their thirty seconds. -short skipped those same tests
on a flag typed by hand, which gets it wrong in exactly the run where login is
what you edited, so it is gone along with the three places it was documented.

The README intro promised uploading Lua code and streaming logs. Both print
"is not available yet", so it now says what the tree has and names the two that
are coming.

No version change, and nothing under .github, flake.nix, .goreleaser.yaml or
go.mod is touched.

TakeJsonFlag sat in dispatch with all five of its callers outside it, so every
part imported dispatch for that one function. It moves down into internal/api,
which is where CLAUDE.md says shared work goes, and no part imports another
package now beyond api.

TakeServerFlag has one caller, inside Dispatch, so it stops being exported.
ValidImei had all three of its callers in internal/device and moves there.
--server / trimmed to nothing and then blamed the network: "the server could
not be reached, check your connection". --server= said "--server needs an
address", which is what both should say.

The address is now trimmed before it is tested for emptiness, so every way of
writing an empty one reaches the same message.
Go caches per package, and the cached result is keyed on the linked test
binary, so a change to one part leaves the others cached and only a change the
login tests link re-runs their thirty seconds. -short skipped those same tests
on a flag typed by hand, which gets it wrong in exactly the run where login is
what you edited.

The README intro promised uploading Lua code and streaming logs. Both print
"is not available yet", so it now says what the tree has and names the two
that are coming.
@siliconwitch
siliconwitch merged commit a9bd1e7 into main Aug 20, 2026
1 check passed
@siliconwitch
siliconwitch deleted the dev branch August 20, 2026 15:24
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.

1 participant