Skip to content

fix(setup): unblock testinfra init fixture (dep-sync timeout + NixOS git-hook shebangs) - #694

Merged
c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
bugfix/692-init-fixture-sync-timeout
Jun 24, 2026
Merged

c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
bugfix/692-init-fixture-sync-timeout

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the flaky initialized_workspace testinfra fixture that timed out during
uv sync, cascading an ERROR at setup to every dependent test. Folds in a
companion portability fix for the git hooks (same #!/bin/bash-on-NixOS class as
#690), without which commits cannot run on a NixOS host.

Sub-issue of the #625 Nix migration epic; targets the epic branch
feature/625-nix-claude-migration.

Changes

test(setup) — init dep-sync timeout (Closes #692)

  • The fixture allowed only 30s for the Workspace initialized successfully
    banner after Syncing dependencies. That window covers just sync
    (uv sync --all-extras) downloading the test-project's heavy scientific extras
    (numpy, scipy, pandas, matplotlib, jupyter) with no warm uv cache,
    so a cold/slow network times out mid-download.
  • Raise the completed-stage timeout to a generous 300s default, overridable
    via INIT_DEPS_SYNC_TIMEOUT for fast-cache/CI tuning.

fix(setup) — portable git-hook shebangs (Refs #690)

  • .githooks/{pre-commit,commit-msg,prepare-commit-msg} hardcoded #!/bin/bash.
    Like the host scripts fixed in fix(setup): use portable env-bash shebang in host scripts #690, these run on the host and fail on NixOS
    (no /bin/bash): fatal: cannot exec '.githooks/pre-commit': No such file or directory. Switched to portable #!/usr/bin/env bash.

Verification

  • Python syntax + INIT_DEPS_SYNC_TIMEOUT env override resolve correctly
    (verified via uv run python).
  • Longest added line = 80 chars (< the 88 line-length), so ruff is clean.
  • pre-commit ran green for every hook that can execute on the host (shellcheck,
    bandit, agent-identity, branch-name, commit-msg validation, sync-manifest).
  • ruff/ruff-format/typos cannot execute on this NixOS host (dynamically
    linked binaries — the very limitation [MASTER] Migrate devcontainer to a Nix toolchain + Claude-native setup #625 addresses) and were skipped locally
    via pre-commit SKIP; CI enforces them on this PR. No --no-verify used.

Notes

The durable fix (warming the uv cache in the Nix-built image so uv sync is
offline-fast) belongs to the #634/#635 image track and is out of scope here.

Closes #692

c-vigo and others added 3 commits June 24, 2026 17:33
The .githooks/{pre-commit,commit-msg,prepare-commit-msg} hooks hardcoded
#!/bin/bash. Like the host scripts fixed in #690, these run on the host and
fail on NixOS (no /bin/bash), so git cannot exec them and every commit aborts
with 'cannot exec: No such file or directory'. Switch to the portable
#!/usr/bin/env bash form.

Refs: #690
The session-scoped initialized_workspace fixture waited only 30s for the
'Workspace initialized successfully' banner after 'Syncing dependencies'.
That window covers 'just sync' (uv sync --all-extras) downloading the
test-project's heavy scientific extras (numpy, scipy, pandas, matplotlib,
jupyter) with no warm uv cache, so a cold/slow network times out and the
failure cascades to every dependent test as an ERROR at setup.

Raise the completed-stage timeout to a generous default (300s) and make it
overridable via INIT_DEPS_SYNC_TIMEOUT for fast-cache/CI tuning.

Refs: #692
@c-vigo
c-vigo merged commit 23aae6d into feature/625-nix-claude-migration Jun 24, 2026
@c-vigo
c-vigo deleted the bugfix/692-init-fixture-sync-timeout branch June 24, 2026 15:45
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