2026-05-14 Upstream Issue Cleanup and Update Script

What I set out to do

Two threads, hours apart:

  1. Fix a long-standing gap in the update script — it never refreshed the root dev flake.nix, only the HM flake under nix/.
  2. Run check-upstream-issues and triage anything newly resolved. Two issues had closed: j178/prek#1765 and pydantic/pydantic-ai#3925.

What I actually did

Three commits, all on main:

  1. 71dad6d — Taught the update script to bump the root dev flake. Two flakes live in this repo: the HM flake at nix/flake.nix (built by hm switch) and a root flake.nix that only ships the dotfiles-dev devShell and pre-commit config. Added a second nix flake update --flake $CONFIG_HOME call and a separate commit_root_flake_lock function so the dev flake’s history (only git-hooks-nix moves there) stays distinct from HM input bumps. Preview mode also now reports root-flake update status by copying flake.nix, flake.lock, and pre-commit.nix into a tempdir.

  2. 7855a43 — Migrated prek’s auto-update cooldown from a CLI flag to global config. Prek 0.3.12 (PR #2044) lands auto_update.cooldown_days support in ~/.config/prek/prek.toml. Created nix/home-manager/modules/prek.nix deploying the config via xdg.configFile, dropped --cooldown-days 3 from three prek auto-update recipes (repo root, claude-ops, gh-review-preview). The wrapper recipes stay because j178/prek#1895 (transitive-dep cooldown) is still open. Also added prek/ to .gitignore — same HM-symlink-into-repo-root footgun as zsh/ from earlier today.

  3. f5e74b3 — Migrated permission-suggestion to pydantic-ai’s native conversation_id. Pydantic-ai 1.89 (PR #5251) accepts conversation_id= on Agent.run_sync and stamps gen_ai.conversation.id on the agent_run span natively. Bumped pydantic-ai>=1.89 (lock resolved to 1.93.0). Dropped the wrapping span and opentelemetry.trace import in agent.py; forwarded the kwarg directly. Widened _FakeAgent.run_sync in test_agent.py to capture kwargs so assertions check forwarding instead of span attributes. Kept the manual attribute in tracing.py:eval_case_span (see below) and removed only the misleading @upstream-issue marker.

Earlier in the session also walked through two hm news items (programs.man.man-db/programs.man.mandoc and home.services modular services) — both not actionable for this config (Darwin-only host, no systemd, no programs.man overrides).

What was striking

  • tracing.py looked removable but isn’t. The original workaround’s docstring said “Removable once pydantic-ai emits the attribute natively.” But pydantic-ai’s native support only stamps gen_ai.conversation.id on agent_run spans — not on arbitrary parent spans. eval_case_span opens a parent span around multiple agent runs to group an eval under one MLflow session, and that’s a use case upstream doesn’t (and shouldn’t) cover. Removing the @upstream-issue marker but keeping the behavior was the right call.

  • Nixpkgs lags the fix by one version. Prek 0.3.12 is where auto_update.cooldown_days lands; nixpkgs-unstable currently pins 0.3.11. The TOML config I deployed is silently ignored on the older version and activates the moment a future flake update lands prek ≥ 0.3.12. A no-op until then, but worth landing now so it just-works on the next bump.

  • statix rejects both { ... }: and _: as empty patterns. For modules that take no arguments, the only acceptable form is a bare attribute set — no {}: wrapper at all. Surprised me twice ({ ... }:_: → bare {).

  • Splitting the commits paid off. The three changes had nothing to do with each other once the upstream-issue work was framed. One feature (update script), two refactors (prek, pydantic-ai). Each commit’s body documents exactly what landed upstream and what’s still in-flight, so a future reader can re-evaluate independently.

Top 3 tomorrow

  1. Run update once nixpkgs has prek 0.3.12+ to confirm auto_update.cooldown_days is honored end-to-end.
  2. Watch MLflow’s Sessions tab on the next eval run to confirm grouping still works with the new conversation_id flow.
  3. Re-run check-upstream-issues in a week or two — five LiteLLM bugs and the SigNoz Terraform provider issues are still open, worth scanning periodically.