Skip to content

build(justfile): add module hierarchy and unified check recipe - #3806

Merged
mcosgriff merged 4 commits into
mainfrom
implement-justfile-hierarchy
Sep 14, 2026
Merged

mcosgriff merged 4 commits into
mainfrom
implement-justfile-hierarchy

Conversation

@mcosgriff

Copy link
Copy Markdown
Contributor
  • Import the playwright, python, and ruby justfiles as mod namespaces from the root justfile so their recipes are reachable as just ::
  • Add a root check recipe that runs lint-all then each component's check, giving one entry point for the whole repo
  • Add check aliases in openc3/justfile (ruby-verify) and playwright/justfile (test) so every component answers to the same recipe name

What changed

The ability to call the other check commands in other justfiles. Now they can all be ran at the top-level; python, ruby and front-end

Why it changed

Easier then trying to find the correct justfile

- Import the playwright, python, and ruby justfiles as mod
  namespaces from the root justfile so their recipes are reachable as
  just <component>::<recipe>
- Add a root check recipe that runs lint-all then each component's
  check, giving one entry point for the whole repo
- Add check aliases in openc3/justfile (ruby-verify) and
  playwright/justfile (test) so every component answers to the same
  recipe name

Co-Authored-By: Claude Opus 5 (1M context)
@mcosgriff mcosgriff self-assigned this Sep 1, 2026
@mcosgriff
mcosgriff requested a review from ryanmelt September 1, 2026 20:54
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.40%. Comparing base (40f6fd7) to head (932e46b).
⚠️ Report is 142 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3806      +/-   ##
==========================================
+ Coverage   79.20%   79.40%   +0.20%     
==========================================
  Files         894      897       +3     
  Lines       67034    67627     +593     
  Branches     2553     2611      +58     
==========================================
+ Hits        53095    53700     +605     
+ Misses      13278    13257      -21     
- Partials      661      670       +9     
Flag Coverage Δ
frontend 66.57% <ø> (+0.44%) ⬆️
python 79.41% <ø> (+0.08%) ⬆️
ruby-api 82.24% <ø> (+0.09%) ⬆️
ruby-backend 84.75% <ø> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcosgriff

Copy link
Copy Markdown
Contributor Author

Pretty sure the python unit test failure is fixed in another PR I have

@ryanmelt

ryanmelt commented Sep 3, 2026

Copy link
Copy Markdown
Member

This looks like its adding a task for running all the unit tests. That's cool, but not really what I wanted.

I want to run all the ruff (check/format) and linter type things. It looks like you already have a lint-all but maybe that needs to include the ruff stuff as well?

@ryanmelt ryanmelt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like its adding a task for running all the unit tests. That's cool, but not really what I wanted.

I want to run all the ruff (check/format) and linter type things. It looks like you already have a lint-all but maybe that needs to include the ruff stuff as well?

- Narrow the root check recipe to linters and formatters only, adding
  lint-check to the python and playwright justfiles and dropping the
  openc3 check alias that ran rake build plus the full rspec suite
- Add lint-ruby recipes wrapping rubocop from the root Gemfile, which
  needs RUBYGEMS_URL set or bundler fails with Unknown source ''
- Disable AutoCorrect on the nine unsafe-correctable Lint cops so
  rubocop -A cannot silently revert a hand-written SonarQube fix
- Add lint-ruby-report to emit the JSON that SonarQube imports via
  sonar.ruby.rubocop.reportPaths, and gitignore its output

Co-Authored-By: Claude noreply@anthropic.com
- Anchor AllCops/Exclude with **/ in .rubocop.yml: the built-in
  excludes only cover the repo root, so RuboCop walked the nested
  node_modules trees and pnpm's .pnpm symlink graph until it
  exhausted memory
- Add .rubocop-src.yml inheriting the root config with spec/ and
  test/ directories plus *_spec.rb excluded, cutting the report
  from 6096 offenses to 2413
- Add lint-ruby-src, lint-ruby-src-fix and lint-ruby-src-stats
  recipes using that config, with --force-exclusion so an explicit
  spec path is still skipped

🤖 Generated with Claude Code
@mcosgriff

Copy link
Copy Markdown
Contributor Author

check:
just lint-ruby
just plugins::lint-check
just python::lint-check
just playwright::lint-check

- Add openc3-cosmos-init/plugins/justfile and declare it as mod plugins, so frontend recipes are reached as just plugins::lint
  and no longer collide with the repo-wide lint-ruby family
- Drop the hand-rolled lint-all/lint-fix-all bash loops in favor of
  the workspace pnpm lint script, which also fails when a package
  has a src/ but no eslint config
- Add plugins::lint-check and have check call it, matching the
  existing python::lint-check and playwright::lint-check pattern
- Pass --max-warnings 0 to the single-package lint recipe so it
  matches lint-all and CI

BREAKING CHANGE: frontend recipes moved out of the root justfile.
just lint, lint-fix, lint-all, lint-fix-all, build-deps,
build-deps-force, dev, dev-* and list-plugins are now
just plugins::<name>.

Co-Authored-By: Claude noreply@anthropic.com
@mcosgriff
mcosgriff requested a review from ryanmelt September 8, 2026 21:38
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@mcosgriff
mcosgriff merged commit 888dff4 into main Sep 14, 2026
36 checks passed
@mcosgriff
mcosgriff deleted the implement-justfile-hierarchy branch September 14, 2026 18:27
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.

2 participants