ci: refactor the pipeline into a modular structure - #61
Conversation
|
Warning Review limit reached
Next review available in: 44 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (41)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
maturin defaults to a root-level Python source dir, so the wrapper only added a path prefix to every lint invocation.
Toolchain setup was copy-pasted across every job; centralising it also gives the Cargo cache a single place to enforce its save-if discipline.
A paths-filter gate keeps PRs from running suites they cannot affect, and the always-running ci-status job gives branch protection one check that skipped suites cannot defeat.
docs.yml drops its pull_request trigger now that ci-docs.yml builds the site as a PR check, so a docs PR no longer builds twice.
The bumps landed on master's flat files, which this branch replaced. setup-uv is pinned to an exact tag because it no longer ships majors.
Mirrors the pattern the docs branch put in docs.yml, so the composite actions build the site the same way the deploy workflow used to.
bf0e2b8 to
89a76fc
Compare
Builds on #58 and #60, both now merged.
Two changes: flatten the Python source layout, then refactor CI into a modular structure modelled on the sibling
dagronandtaskitorepos.1.
py_src/removedpy_src/reclink/→reclink/viagit mv(22 files, all recorded as renames), andpython-sourcedropped from[tool.maturin]since a root-level package is the default. All 8 references updated:pyproject.toml,.pre-commit-config.yaml,README.md(×3),ci.yml(×3), anddocs/docs/getting-started/installation.mdx(×2).No compiled
.soor__pycache__entered the index — verified across the whole commit range.No import shadowing.
maturinwrites_core.cpython-*.sodirectly into./reclink/, soimport reclinkfrom the repo root resolves to the source tree and finds the compiled_corethere. The real hazard — an sdist that installs but imports the uncompiled source tree — is now guarded by the newverify-sdistaction, which assertssite-packagesis on the import path.2. Modular CI
A thin
ci.ymlruns adorny/paths-filterchangesjob and dispatches to reusable per-suite workflows, withFORCEon non-PR events somasteralways gets a full run regardless of the filter.ci.ymllint → cargo fmt, clippyci-rust.yml→lintci.ymllint → ruff check/format, mypyci-python.yml→lintci.ymlrust-testci-rust.yml→testci.ymltest matrix (6 cells)ci-python.yml→test(same 6 pairs)docs.ymlbuild on PRci-docs.yml→builddocs.ymlbuild+Pages+docs-diston pushdocs.yml(unchanged behaviour)release.yml,cleanup.ymlci-release.yml,actionlint.yml,ci-status(new)Shared setup lives in composite actions under
.github/actions/(setup-rust,setup-python,setup-node,build-docs,verify-sdist), including thesave-ifcache discipline so only one job per namespace writes the Cargo cache.No check was dropped. Every
run:/uses:line in the old four workflows was diffed against the new set; the only absent lines have exact 1:1 replacements (py_src/→reclink/,cd docs-site &&→working-directory:, a literal--out-dir→$WASM_OUT_DIR, and added quoting on the mypy subshell that shellcheck flagged).Deliberate additions:
fail-fast: falseon the pytest matrix,timeout-minutesthroughout,verify-sdistin the sdist job, and Dependabot now scanning/.github/actions/*— without that the composites' pinned actions would never get updates.Action versions
The bumps from #58 landed on the flat workflow files this PR deletes or rewrites, so a plain merge would have silently dropped them. Each was re-applied at its new home:
actions/checkout@v7in all six workflows that check out;actions/setup-python@v7in thesetup-pythonandverify-sdistcomposites;actions/setup-node@v7insetup-node;actions/upload-pages-artifact@v5indocs.yml;astral-sh/setup-uv@v9.0.0in both Python composites — each carrying a comment recording why it is an exact tag, so nobody "fixes" it back to@v9(v8 stopped publishing major/minor tags).Verification
Known issues — please read before merging
CI status. Every suite is skippable via the paths filter, and a skipped job never reports, so the old per-job required checks (lint,rust-test,test) no longer exist and would block merges forever if still required.ci-statusis the single always-running gate.docs.ymlno longer runs onpull_request. Intentional — PR docs builds moved toci-docs.ymlso a docs PR doesn't build the site twice — but it changes which workflow name appears on a docs PR, and PRs no longer produce adocs-distartifact (onlymasterpushes do).event_name == 'push' && ref == masterto justref == master, soworkflow_dispatchonmastercan now deploy. Pages concurrency is nowpageswithcancel-in-progress: false..github/actions/*/action.ymlas workflows and emits spurious"on" section is missingerrors (reproduced on both 1.7.7 and 1.7.12). The composites are covered by JSON-schema validation plus theuses:-resolution and YAML-parse checks instead. A follow-up could addcheck-jsonschema --builtin-schema vendor.github-actions.pnpm typecheckstill isn't run in CI. It wasn't before this stack either, so nothing regressed — butdocs/.npmrc'snode-linker=hoistedexists specifically so typecheck can resolve@types/react, and that guarantee is currently only exercised locally. Cheap to add toci-docs.yml.Pre-existing issues surfaced but deliberately not fixed here
reclink.__init__.__version__is"0.1.0"whilepyproject.tomlsays0.1.1.dagron'scheck_versions.pygate was deliberately not ported, because it would make this branch red on arrival. Worth a separate fix.uv sync --extra devfails on a default Python 3.14 (PyO3 0.24 caps at 3.13). CI pins 3.12/3.13 so it isn't hit there, but local dev on a 3.14 default breaks..pre-commit-config.yaml'sruff format --check .fails onREADME.md, and the hook's uv env fails to build the maturin extension. Both reproduce onmaster; CI is unaffected because it scansreclink/ tests/.