Skip to content

fix(ci): green builds — real bugs, not guards - #61

Merged
ronaldtse merged 2 commits into
mainfrom
fix/ci-green
Aug 30, 2026
Merged

fix(ci): green builds — real bugs, not guards#61
ronaldtse merged 2 commits into
mainfrom
fix/ci-green

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Every check on every recent PR has been red at the repo level (PRs
merge anyway). This makes CI actually green by fixing causes, not by
adding guards.

Four causes, four fixes

python lint (ruff check + ruff format --check)

The job carried continue-on-error: true for "36 pre-existing
violations" — which never absorbed the failure (the job reported red
anyway). Fixed all 22 remaining violations, removed the guard.
Several were genuine bugs, not style:

  • wer/der used but never imported in util/utils.py (arabic +
    hebrew mirrors) — calculate_error_rates would NameError if called
  • process_losses(...) without self in hebrew trainer.py
  • yaml never imported in hebrew convert_torch_model_to_onnx.py
  • name_of never defined in nakdimon_hebrew_model.py (assert
    diagnostics) — now unicodedata.name-based
  • duplicate untyped make_src_mask (kept the typed one)
  • bare except: narrowed to KeyError (loss-type lookup) /
    Exception (model-load recovery)
  • one type(x) == intisinstance, import sorting, formatting

python infer/train (pip install -e . at metadata)

packages=['rababa'] was commented out, so modern setuptools
auto-discovery hit "Multiple top-level packages discovered in a
flat-layout: ['models', 'config', 'modules', 'log_dir']" and the
install died before any step ran. Both setup.py files now declare
find_namespace_packages(include=["util*", "modules*"]) — the
absolute-import style the code uses. Verified locally: editable
install succeeds and import util.text_encoders resolves.

ruby build (bundle exec standardrb)

Five offenses: super-with-identical-arguments, empty lines at method
body starts, redundant line continuation, gemspec alignment spacing.
rake unchanged: 23 examples, 0 failures, 9 pending.

codeql (analyze (ruby))

The advanced workflow's SARIF is rejected because the repo also has
CodeQL default setup configured (ruby/python/actions — verified
via the code-scanning API). The default-setup jobs pass; the advanced
one can only fail. Removed the redundant advanced workflow; default
setup continues to cover all three languages.

Local verification

  • ruff check python/ + ruff format --check python/ — clean
  • bundle exec standardrb — clean; bundle exec rake — 0 failures
  • editable install + import smoke test in a fresh venv

Every check on every PR has been red at the repo level. Four causes,
four fixes:

- python lint (ruff): fixed all 22 violations instead of absorbing
  them with continue-on-error (which never worked anyway — the job
  still reports failure). Includes genuine F821 bugs: wer/der never
  imported in util/utils.py (both mirrors), process_losses called
  without self in hebrew/trainer.py, yaml never imported in hebrew's
  ONNX converter, name_of never defined in nakdimon_hebrew_model.py
  (now a unicodedata-based helper). Also the duplicate untyped
  make_src_mask, bare excepts narrowed to KeyError/Exception, one
  isinstance fix, import sorting.
- python infer/train: pip install -e . failed at metadata —
  packages=['rababa'] was commented out, so auto-discovery tripped on
  the flat layout (models/config/modules/log_dir). Declared the
  namespace packages explicitly (util*, modules*); editable install
  verified locally.
- ruby build: standardrb — super-arguments, empty method-body lines,
  redundant line continuation, gemspec spacing. rake: 23 examples,
  0 failures (unchanged).
- codeql: the advanced workflow conflicts with the repo's configured
  default setup (SARIF rejected) — default setup already covers
  ruby/python/actions, so the redundant workflow is removed.
…rotobuf for train

CI's ruff (latest) collapses the short find_namespace_packages call
that older local ruff accepted multi-line. train (3.9) hit the
tensorboard-vs-protobuf>=4 'Descriptors cannot be created directly'
clash — PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python on the train
job avoids it without pinning protobuf in packaging.
@ronaldtse
ronaldtse merged commit 0da4e11 into main Aug 30, 2026
9 checks passed
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