fix: repair master — lint, a dropped method, vendored drift, scorecard - #132
Open
Kartikey1306 wants to merge 3 commits into
Open
fix: repair master — lint, a dropped method, vendored drift, scorecard#132Kartikey1306 wants to merge 3 commits into
Kartikey1306 wants to merge 3 commits into
Conversation
CI -- ebuild has been red on master since the 09-08 batch merge, and the first failing step (ruff) has hidden the ones behind it. Lint (ruff, all nine Test legs): - test_build_dir_resolution.py imported shutil twice (F811). - test_package_recipe.py lost its trailing newline (W292). - test_ci_gate.py had `import itertools` / `import re` two hundred lines down (E402) -- my own embeddedos-org#103, replayed onto a file that had moved. These three hunks are byte-identical to embeddedos-org#122's, so either PR merging first leaves the other clean. Type check and tests (never reached on master since 09-08): - ebuild/packages/index_sync.py calls PackageRecipe.to_dict(), which embeddedos-org#111 defined and embeddedos-org#112 -- merged five minutes later from a base without it -- deleted in its replay. mypy names it once; pytest fails nine test_index_sync cases with AttributeError. The method is restored verbatim from embeddedos-org#111 (cc90078): it emits the `package:`/`build:` keys parse_recipe() reads back, which an asdict() replacement would not. Vendored core drift: - embeddedos-org#109 (dba3d83) edited core/eos/docs/three-way-alignment.md, a vendored copy pinned to eos 5544c98, so drift went 44 -> 45 and the guard failed as designed. Reverted to the pinned content (blob 7f9c8c1, the same bytes as eos:docs/three-way-alignment.md at the pin). The alignment note belongs in ebuild's own docs or upstream in eos, not in the snapshot. OSSF Scorecard: - ossf/scorecard-action@v2.4.0 pulls gcr.io/openssf/scorecard-action, and gcr.io now refuses the pull ("requires billing to be enabled"). v2.4.3 pulls from ghcr.io; eos already pins it and its Scorecard job is green. Not in this PR: EoSim Sanity's Windows/macOS legs install a wheel that has never been published; embeddedos-org#121 (srpatcha) already replaces that with the clone the other legs use. Verified locally: ruff clean, yamllint clean, mypy clean over 107 files, 680 passed / 1 skipped, scripts/check_vendor_drift.py 44/44 and 46/46.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…/3.11, yamllint on Windows Both surfaced on this branch's first CI run, once ruff let the job get past its first step. - ebuild/plugins/__init__.py: on Python 3.10 and 3.11 the stubs type entry_points() as the deprecated mapping, and its .get() wants an EntryPoints default, so mypy fails with arg-type. The line carried a '# type: ignore[attr-defined]' -- the wrong error code, so it suppressed nothing. Spelled out with a cast, byte-identical to embeddedos-org#122's hunk (54605f0). - .yamllint.yml: the Windows runners check out with core.autocrlf=true, so every YAML file arrives as CRLF and the default new-lines: unix rule rejected every line. The step was added on 09-03 and had never passed on that leg. new-lines: platform accepts the checkout's own convention.
…e checkout's line ending new-lines: platform was the wrong fix. The Windows runners' autocrlf turns LF files into CRLF -- except a file that already carries a stray CR, which git leaves alone, and auto-assign.yml had one on its last line. So under 'platform' Windows expected CRLF and got LF on that file's first line, and the leg was red again for the opposite reason. Pin *.yml and *.yaml to eol=lf so every OS lints the same bytes, keep yamllint's default unix rule, and drop the stray CR.
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.
Problem
CI — ebuildhas been red on master since the 09-08 batch merge, and because the first failing step isruff, everything behind it (mypy, pytest) has not run on master since.Vendored core driftandOSSF Scorecardare red on the same commit for unrelated reasons.Verified against runs 34419838440 (
CI — ebuildon8b623d5, all nine Test legs atLint (ruff)), 34419838427 (drift) and 34419838445 (Scorecard), and reproduced locally on master before every fix below.What broke
Lint (ruff, 4 findings). A duplicate
import shutil(F811), a lost trailing newline (W292), and twoimports two hundred lines downtest_ci_gate.py(E402) — that last one is my own #103, replayed onto a file that had moved. These three hunks are byte-identical to #122's (blobse08444f,3c25922,b1d5e0f), so whichever merges first leaves the other clean.Type check + tests (never reached on master since 09-08).
ebuild/packages/index_sync.py:354callsPackageRecipe.to_dict(). #111 defined it; #112, merged five minutes later from a base without it, deleted it in its replay. mypy names it once; pytest fails ninetest_index_synccases withAttributeError. The method is restored verbatim from #111 (cc90078): it emits thepackage:/build:keys thatparse_recipe()reads back, which anasdict()replacement would not — the YAML it writes has to round-trip through the same parser. #119 and #124 both propose re-implementations; this is a restoration of what master already had, not a third design.Two more steps that had never passed, found on this PR's first run (run 34591499237), once ruff let the job past its first step:
ebuild/plugins/__init__.py:46— those interpreters' stubs typeentry_points()as the deprecated mapping whose.get()wants anEntryPointsdefault (arg-type). The line carried# type: ignore[attr-defined], the wrong error code, so it suppressed nothing. Spelled out with acast, byte-identical to ci: fix the lint findings that stop CI before any test runs #122's hunk (blob54605f0).core.autocrlf=true, so every YAML file arrives CRLF and the defaultnew-lines: unixrule rejected every line oftemplates.yamlandlayers/eni/build.yaml. The step was added 09-03 and has never passed on that leg. A first attempt (new-lines: platform) failed the other way:auto-assign.ymlcarried one stray CR, so autocrlf left it alone and Windows then expected CRLF on its first line. Fixed properly:.gitattributespins*.yml/*.yamltoeol=lfso every OS lints the same bytes, yamllint keeps its defaultunixrule, and the stray CR is gone.Vendored core drift. #109 (
dba3d83) editedcore/eos/docs/three-way-alignment.md, a vendored copy pinned to eos5544c98, so drift went 44 → 45 and the guard failed exactly ascore/UPSTREAM.yamlsays it should. Reverted to the pinned content — verified the result is blob7f9c8c1, the same bytes aseos:docs/three-way-alignment.mdat the pin. The alignment note itself is worth keeping; it belongs in ebuild's own docs or upstream in eos, not in the snapshot.OSSF Scorecard.
ossf/scorecard-action@v2.4.0pullsgcr.io/openssf/scorecard-action, and gcr.io now refuses with "This API method requires billing to be enabled".v2.4.3pulls from ghcr.io; eos already pins it and its Scorecard job is green.Test plan
Verified, run the way
ci.ymlruns them:Not in this PR
EoSim Sanity's Windows and macOS legs install a wheel that has never been published (run 34561966328); #121 already replaces that with the clone the other legs use.