Skip to content

Fix exit codes and Windows runner scripts; migrate to uv, click and rich 15 - #14

Merged
jhidding merged 5 commits into
mainfrom
fix/windows-and-exit-codes
Nov 15, 2026
Merged

jhidding merged 5 commits into
mainfrom
fix/windows-and-exit-codes

Conversation

@jhidding

@jhidding jhidding commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Exit codes: a command that exits with a non-zero code now fails its task. Before, the return code was only logged, so a failing command that still wrote its target (for example through stdout) counted as a success. The failed task's targets are removed from the history, so a partly written target is built again next time.
  • Runner scripts on Windows: inline scripts for a runner were written to a NamedTemporaryFile that stayed open while the runner read it, which Windows doesn't allow. The file is now closed before running and removed afterwards.
  • uv instead of Poetry:
    • pyproject.toml uses standard [project] metadata, a hatchling build and a dev dependency group, and uv.lock replaces poetry.lock.
    • The runtime dependency constraints are the same as in the published 0.2.4.
    • The dev tools now have lower bounds only.
    • The README and docs/index.md say uv instead of Poetry.
  • click instead of argh: the brei command uses click, with the same options as before. argh and rich-argparse are replaced by rich-click, which keeps the help and errors rich-formatted, as in Entangled.
  • Missing workflow: without a workflow file, Brei printed a traceback; it now gives a click error with exit code 1. The messages also named loom.toml and a -f option; they now say brei.toml and -i.
  • rich 15: the dependency is now rich>=15.0.0,<16 (it was <14). Entangled's test suite passes with this Brei and rich 15.0.0.
  • CI: tests run with uv on Linux, macOS and Windows, with Python 3.11, 3.13 and 3.15. The PyPI deploy builds with uv build.

The Brei fixes are made in docs/tasks.md and tangled into brei/task.py. .entangled/filedb.json was regenerated with entangled reset, because it came from Entangled 2.1.10.

Tests

  • test_failing_command covers a failing inline runner script and a failing one-liner. Both fail without the fix.
  • test_loom.py now runs on Windows: it skips os.sync() where that doesn't exist, and test_runtime uses the python runner instead of bash.
  • The wheel built with uv has the same modules and dependency metadata as 0.2.4.

🤖 Generated with Claude Code

jhidding and others added 3 commits November 15, 2026 22:55
- A command that exits with a non-zero code fails its task. Its targets
  are removed from the history, so they are built again next time.
- Inline runner scripts are written to a temporary file that is closed
  before running, since Windows doesn't allow another process to open it
  while we have it open.
- Test on Linux, macOS and Windows, with Python 3.11 and 3.13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pyproject.toml uses standard [project] metadata with a hatchling build
  and a `dev` dependency group. Runtime dependency constraints are the
  same as in the published 0.2.4.
- CI and the PyPI deploy use uv. Tests run on Python 3.11, 3.13 and
  3.15 on Linux, macOS and Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jhidding jhidding changed the title Fail tasks on non-zero exit codes; fix runner scripts on Windows Fix exit codes and Windows runner scripts; migrate to uv Nov 15, 2026
- The `brei` command uses click, with the same options as before.
  argh and rich-argparse are no longer needed.
- Errors about a missing workflow are shown as click errors, instead of
  a traceback, and name `brei.toml` and `-i` correctly.
- rich >=15.0.0, <16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jhidding jhidding changed the title Fix exit codes and Windows runner scripts; migrate to uv Fix exit codes and Windows runner scripts; migrate to uv, click and rich 15 Nov 15, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jhidding
jhidding merged commit d400852 into main Nov 15, 2026
9 checks passed
@jhidding
jhidding deleted the fix/windows-and-exit-codes branch November 15, 2026 22:09
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