Environment refresh + ty as pre-commit hook - #213
Merged
Conversation
This was referenced Jul 3, 2026
hmgaudecker
force-pushed
the
update-env-ty-prek-hook
branch
from
July 3, 2026 09:44
3727b12 to
2225d77
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
=======================================
Coverage 99.34% 99.34%
=======================================
Files 10 10
Lines 153 153
=======================================
Hits 152 152
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Migrate type checking from a pixi task to the official ty-pre-commit hook, matching the ai-instructions boilerplate: - Add astral-sh/ty-pre-commit (v0.0.56) with `--no-project`; ty resolves third-party imports from `[tool.ty] environment.python = .pixi/envs/default`. - Drop the `ty` conda dependency and the `ty` pixi task. - Skip the ty hook on pre-commit.ci (no pixi env / no network there); the GitHub Actions run-ty job runs `prek run ty --all-files` instead. - Update AGENTS.md accordingly. Also: - Bump .ai-instructions submodule to latest (modular tiers, ty-hook overhaul). - pixi self-update to 0.72.0 and full `pixi update` of pixi.lock. - prek autoupdate: ruff v0.15.20, check-jsonschema 0.37.4, pyproject-fmt v2.25.1. - Workflow: actions/checkout@v7, setup-pixi@v0.10.0, pixi-version v0.72.0, codecov-action@v7. - gitignore pytask.lock / pytask.lock.journal. - Pin nodejs <26: node 26's stricter stream handling breaks mystmd's book-theme favicon fetch during the docs build (ERR_STREAM_PREMATURE_CLOSE), which fails the run-docs CI job. Verified the docs build is green again on node 25.9. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
hmgaudecker
force-pushed
the
update-env-ty-prek-hook
branch
from
July 3, 2026 09:49
2225d77 to
d6b8ec0
Compare
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.
Summary
Environment refresh plus migration of type checking from a pixi task to the
official
ty-pre-commithook, following the updatedai-instructionsboilerplate.
ty: pixi task → pre-commit hook
astral-sh/ty-pre-commit(v0.0.56) with--no-projectsouvneithercreates a
.venv/uv.locknor resolves deps; ty resolves third-party importsfrom
[tool.ty] environment.python = ".pixi/envs/default".tyconda dependency and thetypixi task.tyhook on pre-commit.ci (no pixi env, no network at hookruntime); the GitHub Actions
run-tyjob now runspixi run prek run ty --all-files.AGENTS.mdto describe the new flow.Environment / tooling refresh
.ai-instructionssubmodule to latest (d15d554→68dc3f4):modular tiers, distilled modules, ty-hook overhaul.
pixi self-updateto 0.72.0 and a fullpixi updateofpixi.lock(numpy 2.5, pandas 3.0.3, python 3.14.6, …).
prek autoupdate: ruffv0.15.20, check-jsonschema0.37.4,pyproject-fmt
v2.25.1.actions/checkout@v7,prefix-dev/setup-pixi@v0.10.0,pixi-version: v0.72.0,codecov/codecov-action@v7..gitignore: addpytask.lock/pytask.lock.journal(newer pytask writes aroot-level lock).
nodejspinned to<26(temporary)The full
pixi updatepulled node 26, which breaks therun-docsjob(
GET /favicon.ico 500→ERR_STREAM_PREMATURE_CLOSE). Root cause is a knownNode regression (nodejs/node#63989):
a security backport added a
datalistener on idlehttp.Agentsockets, whichtrips a latent
node-fetch@2keep-alive+gzip bug — and mystmd's book-themefetches the favicon over exactly that path. Same bug hit 24.17.0 (fixed 24.18.0)
and 22.23.0 (fixed 22.23.1); fix PR #64004
merged to main 2026-06-20 but is not yet in a released 26.x. node 25.9 is
unaffected only because it predates the backport — note it is EOL (2026-06-01),
so this pin should move to a fixed 26.x (and drop) once conda-forge ships one.
Superseded PRs
prek autoupdate+pyproject-fmt reordering.
Verification (local)
prek run ty --all-files✅ · fullprek run --all-files✅ (idempotent)task_compile_presentation(Slidev PDF export) needs a headless Chromium andis only exercised on CI.
🤖 Generated with Claude Code