refactor: consume the flat go and react modules - #439
Merged
Conversation
Renames go::<name> call sites to go-<name> across the justfile, both workflows, CLAUDE.md and the docs site, and imports go/go.just instead of loading go.mod.just. This is what makes osapi's coverage target take effect. Its `export JUST_COVERAGE_TARGET := "99.9"` never reached the shim module -- env() resolves against the process environment at parse time -- so osapi ran against the default 100 and passed only because `go tool cover -func` rounds its 99.9359% to 100.0%. With a flat import the consumer assigns go_coverage_target directly: `just go-unit-cov-check` now reports "meets target 99.9%". Depends on osapi-justfiles#46. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The go module no longer ships a default, so the consuming justfile declares go_coverage_target. Drops set allow-duplicate-variables, which osapi-io/specs now forbids: it suspends the duplicate check for every variable in the file to override one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Earlier edits left the old JUST_COVERAGE_TARGET comment orphaned above react_dir, describing a variable that no longer exists, and a second comment for the same thing below it. One comment each, and the coverage note now says why osapi sits below 100%: the nine uncovered statements are unreachable guards, not missing tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #439 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 484 484
Lines 24935 24935
=======================================
Hits 24921 24921
Misses 14 14 Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Sets allow-duplicate-variables so the react and go module defaults can be reassigned: react_dir to ui, go_coverage_target to 99.9. Verified all three invocation styles agree -- run by name, reached through another recipe, and overridden on the command line. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
just 1.58 formats a boolean setting as `set allow-duplicate-variables` and 1.45 formats it as `set allow-duplicate-variables := true`. There is no form both accept: each rejects the other's. CI runs the newer one, so the file matches it. Both run it identically -- the override resolves to 99.9 under either. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Applies standardize-repository-layout task 5.1a. .mise.toml can only declare a version that matches CI once we know what the setup action installs, and nothing prints it today. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
just was not declared, so mise had nothing to resolve and the shell fell through to Homebrew 1.45.0 while CI installs 1.58.0. That split is what made this branch fail its justfile format check. 1.58.0 verified from the version step added to just-lint. Applies standardize-repository-layout task 5.1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Nothing maintains a pin in .mise.toml and the workflow setup action floats, so pinning here would diverge at the next release. Both resolve to 1.58.0 today. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames
go::<name>call sites togo-<name>across the justfile, bothworkflows,
CLAUDE.md, and the docs site, and importsgo/go.justinstead ofloading
go.mod.just.Configuring the modules
The shared modules ship defaults —
go_coverage_target := "100",react_dir := ".". osapi differs on both, so it setsallow-duplicate-variablesand reassigns them:The assignment is in scope when just parses the file, so every way of running a
recipe agrees:
Earlier revisions of this PR configured the modules by
exporting environmentvariables. That only reaches recipes invoked as child processes, so
just react-fmt-checkused the module default whilejust testused osapi'svalue — one command with two answers. See
specs#46.
Why 99.9%
osapi has nine uncovered statements, all guards that cannot execute — six
defense-in-depth
validation.Struct()calls on bodies whose fields are allomitempty, an error return commented "not coverable: gopsutil always succeedson a running system", and three of the same shape. osapi's own guidance requires
keeping them, so 99.9% is the honest figure rather than a waypoint to 100%.
Declared in
.github/codecov.ymlas well — change both together.Also
.mise.tomldeclaresjust, which it never did. Without itmisehad nothingto resolve and the shell fell through to Homebrew's 1.45.0 while CI installs
1.58.0, and the two disagree on formatting a boolean setting. Declared as
latest, matching how the workflow's setup action floats.just-lint.ymlrecords the just version, so a change in what the setup actioninstalls is visible rather than inferred.
Applies
converge-justfile-consumptiontasks 1.2 and 2.5, andstandardize-repository-layouttask 5.1.🤖 Generated with Claude Code