Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

pregate: a missing pytest is PREGATE_LANE_FAILED (blames the diff), not PREGATE_ENVIRONMENT

Open Beginner friendly
#3,598 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@vilano93 is already working on this.

Since Oct 30, 2026.

  • #3639 by @vilano93 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, typescript
Domain
testing, tooling

Research direction

Read the pytest branch of detectRunner in lib/pregate/checks/lanes.ts and compare it with the PATH checks for pnpm/yarn, cargo, and dart/flutter in planRuns. Reproduce with Python available but pytest missing, then check that the lane reports PREGATE_ENVIRONMENT (missing-binary) and gives the install-or-run-remotely guidance instead of PREGATE_LANE_FAILED.

Written by the indexing model from the issue text.

Description

What happened

On a machine without pytest, gstack-pregate's lanes check blames the diff for it. A selected Python test runs as python3 -m pytest {files}. That exits 1 with No module named pytest, and the lane reports PREGATE_LANE_FAILED with "fix the in-branch failure". The test itself is fine: it is a unittest test, and python3 -m unittest passes it.

$ python3 -m unittest tests/test_alpha.py
OK
$ python3 -m pytest --version
/opt/homebrew/opt/[email protected]/bin/python3.15: No module named pytest

# upstream main, 1.91.311.0 (94165fff3)
$ gstack-pregate run --stage tests --only lanes --base origin/main --allow-repo-commands
...
    lanes: fix: read ~/.gstack/projects/repro-pytest/pregate/runs/…/lanes/lanes.log, fix the in-branch failure, rerun gstack-pregate --stage tests
PREGATE: fail tree=075ba803dd3a head=7ae1d5e297a9 checks=1
gstack-pregate: lanes: local lane exited 1 (? failed of ? ran; 1 files; pipefail); … (PREGATE_LANE_FAILED)

Expected: the same verdict a missing pnpm, cargo, dart or flutter gets: PREGATE_ENVIRONMENT (missing-binary), "install pytest on this machine and rerun, or run the lane remotely; the diff is not at fault". The machine is missing a tool; the diff did nothing wrong.

classifyCommandEnvironment can't catch this at run time: the command's binary is python3, which is on PATH, and No module named pytest is not a not-found line. planRuns already checks PATH before a run for pnpm/yarn (packageRunner), cargo (cargoRunner) and dart/flutter (dartRunner). The pytest branch of detectRunner (lib/pregate/checks/lanes.ts) does no such check.

Steps to reproduce

  1. A machine where python3 -m pytest fails with No module named pytest.
  2. A repo with no package.json and one committed test, tests/test_alpha.py:
    import unittest
    
    class T(unittest.TestCase):
        def test_a(self):
            self.assertEqual(1 + 1, 2)
    
  3. On a branch, change tests/test_alpha.py, then run gstack-pregate run --stage tests --only lanes --base origin/main --allow-repo-commands.

Found while fixing mixed .mjs + .py root selections, which today get no runner at all (PR follows). Once each language gets its own runner, the Python part hits this on such a machine. This issue is pre-existing and separate from that PR.

Readiness report

gstack doctor 1.91.275.0
ok              install root    ~/.claude/skills/gstack: claude global current (1.91.275.0)
ok              rescue refs     none in ~/.claude/skills/gstack
ok              state root      ~/.gstack durable=yes (selected by default)
ok              bun             1.4.3 at /opt/homebrew/bin/bun (floor 1.3.3, tested 1.4.2)
ok              hooks           9 hook(s) parse
ok              codex           codex-cli 0.164.0; self-locate ok; model gpt-6.1-sol (source: ~/.codex/config.toml model)
ok              codex probe     cached MODEL_OK, 17h ago (not re-run; --live probes now)
not configured  artifacts sync  off; cross-machine artifacts sync is unavailable
ok              browse bundle   browse/dist built
ok              binaries        find-browse, design, pdf, gstack-global-discover launch (4 of 4)
ok              cso             native helper 1.91.275.0 (f8d0ab033914)
ok              claude code     2.1.312 (Claude Code) at ~/.local/bin/claude
ok              session journal largest of 60: 36.3 MiB
ok              guard log       30 decisions (4 denied)
warn            CLAUDE.md       the gstack section in ~/.claude/CLAUDE.md lists 39 skills; …
13 ok, 1 warn, 1 not configured, 0 fail

The repro above was also run against upstream main (1.91.311.0), with the same result.

Environment

  • Host (Claude Code, Codex, Cursor, ...) and its version: Claude Code 2.1.312
  • OS: macOS 26.6.2, Python 3.15 (Homebrew), no pytest installed
Dominant language
TypeScript
Stars
138k
Forks
20.5k
Avg merge
8h 32m
Merged PRs (30d)
292

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from garrytan/gstack

All issues in garrytan/gstack

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.