Pin result, conversion, plan and visualization of golden runs. Drive GENETIC through the optimizer interface and registry. Move GENETIC into one directory with role-named modules. Prepare every run input once, run from the parameters. Fall back instead of cancelling the optimization run. Simulate battery, EV and inverter from frozen dataclasses. Simulate the home appliance from frozen dataclasses. Convert and visualize from the parameters and result only. Serve GENETIC from its own router. Return a frozen result, build responses in the API. Echo the request as sent, not with an invented time window. Additional changes - Pin that the result does not depend on the number of evaluation workers. - Run the golden module in UTC: until the request date-times are held in UTC they render in the host time zone. - Add Optimizer.run_clock(), so the EMS gets slot length and time zone without GENETIC settings. - Rename ConfigOptimizationRequest, RuntimeForecasts and GeneticCommonSettings as ADR 0010 asks. - Correct the request example in ADR 0010. - Record the renamed OpenAPI schemas in CHANGELOG.md and the upgrade guide. - Add replay files that reproduce each golden result from its parameters. - Drop OptimizationBase from the algorithm. - Give the replay and worker tests own review files against xdist races. - Handle a failing preparation in the EMS like a failing run, no separate cancel path. - Record the fallbacks in CHANGELOG.md and the upgrade guide. - Without an inverter, buy the whole load from the grid instead of planning it at no cost. - Do not charge from the grid without any known price. - Treat an infinite value after the control horizon as a gap. - Correct the documentation that said missing forecasts cancel the run. - Copy the efficiency helpers and the self-consumption table evaluation into GENETIC. - Add CycleTimeWindowSequence, ConsumerScheduleMode and ConsumerDeadlinePolicy as contract names. - Hold the date-times of battery, EV and home appliance requests in UTC, so they render the same on every host. - Drop the UTC pin of the GENETIC golden module; the request date-times no longer depend on the host. - Copy the time window logic GENETIC needs into genetictimewindow.py. - Add ValueTimeWindow as a contract name. - Move the settings' to_genetic_*() converters into the preparation. - Drop the conversion's prediction reads and configuration fallbacks, which runs never reached. - Make the moved docstrings valid reST. - Remove the generic optimization solution route; each optimizer serves its own path. - Import the GENETIC settings from the package. - Record the removed route in CHANGELOG.md and the upgrade guide. - Make the terminal and tail value models frozen dataclasses. - Move the response models into geneticapi; remove geneticsolution and geneticabc. - Remove the legacy appliance start arrays and API, which read the wall clock. - Remove the time window helpers only they used. - Echo a start_solution without start_solution_datetime as sent. - Carry the previous solution's start in the run parameters. - Plan the home appliance cycles that fit, or leave the appliance out, instead of failing. - Move the appliance layout rules into geneticappliancelayout for the preparation. - Leave out a DAILY home appliance whose open windows leave no room for a run, with an error log, instead of silently. - Name the reason of the SoC fallback instead of Python's exception text. - Answer a solution request for an unknown algorithm with a 404 problem response. - Record the fixes in CHANGELOG.md and the upgrade guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Claude Code (claude-opus-5-5)
AkkudoktorEOS AI Development Sandbox
Isolated Docker environment for AI-assisted development (OpenCode + Claude Code + Qwen Code) against the local AkkudoktorEOS repository.
The sandbox does not protect your repository from harmful changes by the agent. It limits
what a misled agent can reach on your machine, but the agent can still write any change into the
repository. Check every change before you run it on the host, open a pull request or update one.
See the security model in docs/develop/ai.md.
Layout
compose.yaml– service definition (bind-mounts the repo root to/workspace, withai/read-only)Dockerfile– Debian slim + Python 3.13 + uv + Node.js + OpenCode + Claude Code + Qwen Code + gh, with pinned versionsentrypoint.sh– container init (exec-bit stripping and reset of the shell startup files in$HOME, warning about active git hooks, uv cache, git config, gh credential helper); installed to/usr/local/binin the image, outside theai-homevolume.env.example– template, copied to.envon first runrun.sh/run.ps1/run.bat– entry points (prerequisite checks, sanity check ofcompose.yaml, launch)skills/– project rules for the agents, indexed inAGENTS.md
Usage
From the repository root:
- Linux/macOS:
chmod +x ai/run.sh && ./ai/run.sh - Windows PowerShell:
.\ai\run.ps1 - Windows CMD:
ai\run.bat
Options (environment variables):
AI_SANDBOX_REBUILD=1– rebuild the image (e.g. after bumping the agent CLI versions inDockerfile)AI_SANDBOX_PORTS=1– publish the ports ofcompose.yaml(8503 EOS, 8504 EOSdash) on127.0.0.1of the host. Off by default, as only one sandbox at a time can publish them. Start the servers with--host 0.0.0.0inside the container to make them reachable.AI_SANDBOX_SKILLS_RW=1– makeai/skillswritable in the sandbox, so the agent can update the skills. The rest ofai/stays read-only.
A command after -- runs instead of the shell, e.g. ./ai/run.sh -- claude. In PowerShell the
-- is optional: .\ai\run.ps1 claude. On Windows prefer PowerShell 7; run.bat cannot pass
! and % to the container.
On Windows the repository must be checked out with LF line endings, which .gitattributes
enforces (see docs/develop/ai.md). In the sandbox, run pre-commit on the changed files only;
--all-files fails on the read-only ai/ directory. Changes to ai/ itself (outside ai/skills,
or to ai/skills without AI_SANDBOX_SKILLS_RW=1) must be checked on the host for the same reason.
See docs/develop/ai.md for the AI coding workflow.
Inside the container (working dir /workspace):
opencode auth login # or /connect in the TUI
claude # then /login on first run
qwen
gh auth login # then gh auth setup-git
All auth state persists in the akkudoktor-ai-home Docker volume. The local
repository is bind-mounted at /workspace, so AI-made changes are visible on
the host immediately.
Security notes
- No
privilegedmode, no Docker socket, no host home mount, nosudo. ai/(sandbox definition and launchers) is read-only in the container..gitis writable, so the agent can commit. It can also plant git configuration and hooks that run on the host (e.g. through.git/commondir). Check.gitbefore you run any git command on the host, see the review checklist indocs/develop/ai.md.- Git worktree checkouts are not supported: their
.gitis a file pointing outside the repository, so git does not work in the sandbox. - Container user matches the host UID/GID (Linux/macOS) so file ownership is preserved.
- Credentials are never written to git or to
compose.yaml; they live only in the persistent home volume via each tool's own login flow. - The home volume persists between sessions. Remove it (
docker volume rm akkudoktor-ai-home) if a session may have been misled. - The launchers' checks of
compose.yamlare a sanity check, not a complete validation.