Skip to content

chore: support working in git worktrees - #3

Merged
kristoflemmens merged 1 commit into
mainfrom
chore/worktree-workflow
Oct 24, 2026
Merged

kristoflemmens merged 1 commit into
mainfrom
chore/worktree-workflow

Conversation

@kristoflemmens

Copy link
Copy Markdown
Contributor

What and why

All changes are made in git worktrees under .worktrees/<branch> instead of the main checkout. This PR makes the repository and devcontainer work that way, as agreed after #1 (and covers the deferred review points from #1).

  • Own venv per worktree: UV_PROJECT_ENVIRONMENT is removed, so uv creates .venv inside each worktree. Parallel worktrees no longer overwrite each other's editable install. VS Code's default interpreter now points at ${containerWorkspaceFolder}/.venv.
  • Git in the devcontainer: postCreateCommand also trusts ${containerWorkspaceFolder}/.worktrees/* as safe.directory. Combined with worktree.useRelativePaths (set once per clone, documented), worktree .git files resolve inside the container.
  • Ignore: .worktrees/ in .gitignore and in ruff's extend-exclude.
  • Lint job on Python 3.14, the same as the devcontainer since build(deps): Bump devcontainers/python from 3.13 to 3.14 in /.devcontainer #2. ruff and mypy keep checking against 3.12.
  • Docs: the worktree workflow in AGENTS.md (commands), README.md (development) and docs/design.md (process).

Verified locally

Rebuilt the devcontainer from this branch's config (Python 3.14.8, uv 0.13.5). From the worktree: git status works in the container, uv run --directory .worktrees/worktree-workflow pytest passes with 100% coverage, all prek hooks pass, and the main checkout and the worktree each have their own .venv.

Checklist

  • The test was written first and failed for the right reason before the implementation (no production code changed)
  • Coverage stays at 100%
  • docs/design.md / CONTEXT.md updated if a design choice or domain term changed
  • PR title follows Conventional Commits

🤖 Generated with Claude Code

- give every worktree its own .venv (drop UV_PROJECT_ENVIRONMENT)
- trust .worktrees/* as git safe.directory in the devcontainer
- ignore .worktrees/ in git and ruff
- run the lint job on Python 3.14, like the devcontainer
- document the worktree workflow in AGENTS.md, README and design.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kristoflemmens
kristoflemmens merged commit bc1ba95 into main Oct 24, 2026
11 checks passed
@kristoflemmens
kristoflemmens deleted the chore/worktree-workflow branch October 24, 2026 13:46
kristoflemmens added a commit that referenced this pull request Oct 25, 2026
## What and why

Closes #32

Field confirmations from other Genesis implementations and the reference
pump, recorded in `docs/errata.md`.

- **Input 83–84 "Electric meter kWh total":** the row now cites the
field report. Users of CJNE/thermiagenesis saw wrong kWh totals while it
read MSB first (#292; a Calibra, firmware 16.00 per a later comment),
and pythermiagenesis switched to LSB first at scale 10 (#3). No correct
reading after that switch has been reported, so the row keeps *to be
verified on a pump with an electric meter (17.1)*.
- **Holding 118 "Outdoor temperature sensor":** it reads 20000 until a
BMS writes it (reference pump: 117 = 0, 118 = 20000). A written value
takes effect only when holding 117 selects the BMS
(infradom/thermia-genesis-calibra-modbus-hints#1). Per its own
description (chapters 3 and 4), the pump falls back to its own sensor
when 118 isn't refreshed within 12 hours.

**Already handled elsewhere, from the same issue:**
- Input 121 (scale 10, and 2000 when the sensor is absent): #40.
- Holding 61–63 in seconds: #36, with the documentary sources in #38.
- Inputs 325–328 and 412 reading 2000 support the scale-10 absent value
(#40). Coil 24 belongs with the undocumented registers (#35).

**Not added:** the confirmation that the operating hours are MSB first
(input 48–51, checked against the myThermia export and the display).
That is neither a contradiction nor undocumented behaviour, and the
errata only list those. The map and the fixture already pin the order.

Docs only; no code changes.

## Checklist

- [ ] The test was written first and failed for the right reason before
the implementation (n/a: docs only)
- [x] Coverage stays at 100%
- [x] `docs/design.md` / `CONTEXT.md` updated if a design choice or
domain term changed (errata only)
- [x] PR title follows Conventional Commits (`feat:`, `fix:`, `docs:`,
...)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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