Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
d3e58d6
docs/service-split.md: plan for moving the readings file and its sync…
claude Nov 9, 2026
191d8a3
docs/service-split.md: revised after review (step order, tool shapes,…
claude Nov 10, 2026
4e067bf
docs/service-split.md: the model's calls go through as they are; char…
claude Nov 10, 2026
91131ef
docs/service-split.md: a chart that answers the question ends the tur…
claude Nov 10, 2026
94fbdd8
docs/service-split.md: rewrap two long lines
claude Nov 10, 2026
2fc5644
docs/service-split.md: rewrap one more long line
claude Nov 10, 2026
5aede2b
docs/service-split.md: rewrap current's result shape
claude Nov 10, 2026
20a521b
docs/service-split.md: say what average_asked changes that the model'…
claude Nov 10, 2026
8f4f1fc
docs/service-split.md: averages in every tool that has them; days.hou…
claude Nov 10, 2026
5945d3c
docs/service-split.md: days.hours and the averages table, corrected a…
claude Nov 10, 2026
c8eb42a
docs/mcp-service.md: the plan is now a standalone MCP service, the bo…
claude Nov 10, 2026
db092d7
docs/mcp-service.md: chart_answers_it is the service's, with a ready …
claude Nov 10, 2026
d360eae
docs/mcp-service.md: revised after review as a model would read it, f…
claude Nov 10, 2026
50ec83d
Part of each day: the engine (lib/partday.py), no tool uses it yet
claude Nov 10, 2026
c5e3d9e
periods_text: periods in words, read by the table of docs/mcp-service…
claude Nov 10, 2026
d8b066e
Averages weighted by time: part days for their hours, hourly air days…
claude Nov 10, 2026
70b0746
Charts as data: specs.to_json / from_json, schemas/chart.json, the bo…
claude Nov 10, 2026
c558636
A chart that answers the question ends the turn: no second model call
claude Nov 10, 2026
c79cac1
docs/mcp-service.md: step 2 changes the calls behind the period butto…
claude Nov 10, 2026
4788a83
Merge step1-periods into claude/envirobot-next
claude Nov 10, 2026
3b6eaad
Merge step0-partday into claude/envirobot-next
claude Nov 10, 2026
2a9a905
Merge step0-averages into claude/envirobot-next
claude Nov 10, 2026
6f9b889
Merge step1-chartjson into claude/envirobot-next
claude Nov 10, 2026
8e93d46
Merge step0-answersit into claude/envirobot-next
claude Nov 10, 2026
0dc0e0d
Steps 0 and 1 merged: a chart answers the question only when no note …
claude Nov 10, 2026
c1bed7b
docs/mcp-service.md: rewrap the steps' long lines
claude Nov 10, 2026
9a4fb21
docs/mcp-service.md: every chart carries drawn_by, the call that drew it
claude Nov 10, 2026
6cd8bd2
docs/mcp-service.md: the period buttons, the preloads and the charts …
claude Nov 10, 2026
6317fdb
docs/mcp-service.md: each chart lists the periods it can be redrawn over
claude Nov 10, 2026
e7f8b25
lib/service: what the ten tools will share (step 2's foundation)
claude Nov 10, 2026
83a7fe3
Merge step2-base into claude/envirobot-next
claude Nov 10, 2026
5963f73
lib/service/context.py: what each of the ten tools is built over
claude Nov 10, 2026
05d2c3d
lib/service/days.py: the days tool, over both sensors and part of eac…
claude Nov 10, 2026
40d5113
lib/service/summary.py: the summary tool (3.3), over today's engines
claude Nov 10, 2026
547f522
lib/service/current.py, about.py: the current and about tools
claude Nov 10, 2026
36fb843
lib/service: outlook, forecast and pollen, three of the ten tools (3.3)
claude Nov 10, 2026
39549eb
lib/service/readings.py, relate.py, scan.py: the readings, relate and…
claude Nov 10, 2026
8d5b4ef
Merge step2-summary: summary service tools
claude Nov 10, 2026
35754ec
Merge step2-days: days service tools
claude Nov 10, 2026
1db14dd
Merge step2-current: current service tools
claude Nov 10, 2026
981af52
Merge step2-outlook: outlook service tools
claude Nov 10, 2026
d110d4a
Merge step2-readings: readings service tools
claude Nov 10, 2026
09acbc8
drawn_by in schemas/chart.json; History reads the air sensor as the p…
claude Nov 10, 2026
65af2eb
Pin the bot's own answers before they move to the service's tools
claude Nov 10, 2026
cc16fd1
Service evals: the saved questions against the ten tools alone
claude Nov 10, 2026
8a166bf
Step 2: the bot's own code paths call the service's ten tools
claude Nov 10, 2026
cba156d
Merge step2-bot: bot (step 2)
claude Nov 10, 2026
739b8c8
Merge step2-evals: evals (step 2)
claude Nov 10, 2026
7983216
Step 2 review fixes: model charts' calls, carried arguments, replay e…
claude Nov 10, 2026
c4f9d32
The gauges from the service's current with context, laid out bot-side
claude Nov 10, 2026
6bed9bd
Service evals: conditions matched by keys, periods by start/end too, …
claude Nov 10, 2026
0b4839c
docs/mcp-service.md step 5: warm_up() split between the service and t…
claude Nov 10, 2026
f3c724e
Merge step2-fix-bot: step 2 review fixes
claude Nov 10, 2026
655a6ae
Merge step2-fix-gauges: step 2 review fixes
claude Nov 10, 2026
6462b24
Merge step2-fix-evals: step 2 review fixes
claude Nov 10, 2026
8efe4da
Step 2 done: the review's last three, and the plan marked
claude Nov 10, 2026
1d79117
A 🔄 under a chart with no periods to offer whose period runs to now
claude Nov 10, 2026
f4f6161
The 🔄 only on charts whose period moves on with the clock
claude Nov 10, 2026
ef0a2c2
The shaded 1D under a chart that runs to now draws it again
claude Nov 10, 2026
459e458
Step 3 gate: period wins over start/end, days description, server ins…
claude Nov 10, 2026
10bbb7f
Period beside start/end: real dates that disagree are refused, naming…
claude Nov 10, 2026
cb96b66
Descriptions for what the gate runs got wrong; summary takes a rating…
claude Nov 10, 2026
b6b3689
Descriptions for the gate's repeated failures
claude Nov 10, 2026
2a2f632
Step 3, the swap: the model gets the service's ten tools; the bot kee…
claude Nov 10, 2026
bf2a14b
bot.deliver: bold headings are the report's alone now
claude Nov 10, 2026
39c8e18
Step 3 review fixes: the air link, "<reading> 1d", outlook's forecast…
claude Nov 10, 2026
95f0efd
Merge step3-gate2: the gate's second round into the swap
claude Nov 10, 2026
249087a
Server instructions: every question fetched afresh, a follow-up or a …
claude Nov 10, 2026
93047ea
Step 3 gate: days says how to get a figure per month or year; hottest…
claude Nov 10, 2026
ee11447
Merge step 3: the model gets the service's ten tools
claude Nov 10, 2026
21d7289
Evals: a chat line with any tool call fails again
claude Nov 10, 2026
a78b225
Evals: --live answers the bot's model from the real tools over a froz…
claude Nov 10, 2026
6745cbd
days refuses `of` without `stat`; a chart reading with nothing to dra…
claude Nov 10, 2026
52df115
Evals --live: a fresh world per run, refused calls meet nothing, the …
claude Nov 10, 2026
1ae2be1
Merge live-real-2: --live answers each call from the real ten tools o…
claude Nov 10, 2026
3cf0187
Live evals: fail a refused call no later call to the same tool corrects
claude Nov 10, 2026
0371514
Step 4: alerts in the service, an alert log the bot delivers from
claude Nov 10, 2026
4fc3b31
Step 4 review: a removed or replaced alert log restarts delivery; the…
claude Nov 10, 2026
63238ce
The suite at any time: ECOBOT_CLOCK, pinned archives; the Wind gauge'…
claude Nov 10, 2026
f149e36
Alert delivery retries a log it can't read; about's forecast alert wo…
claude Nov 10, 2026
71808f5
Merge step 4: alerts in the service, the bot delivers from the alert log
claude Nov 10, 2026
53159e7
Merge midnight
claude Nov 10, 2026
2d549bf
Merge refusals
claude Nov 10, 2026
9d24045
outlook: the last hour ends at the newest reading; test comments name…
claude Nov 10, 2026
45d61c7
Step 5, service side: the MCP server, python -m ecobot_service, the s…
claude Nov 10, 2026
eee2460
Step 5, bot side: the bot as the service's client over MCP (WEATHER_M…
claude Nov 10, 2026
18ce9c4
Step 5a review: a log replaced while the bot runs; the station's zone…
claude Nov 11, 2026
5976387
Step 5a minor fixes: one service per data folder (service.lock), no t…
claude Nov 11, 2026
6ada0ba
ecobot-mcp.service: the weather service under systemd, beside the bot
claude Nov 11, 2026
46f3dbf
Remove the stdio bridge; the bot's reconnecting client moves to lib/u…
claude Nov 11, 2026
4828f3e
Docker: the service container on the host network and in the journal …
claude Nov 11, 2026
b54c95b
Service settings named MCP_SERVICE_*; MCP_SERVICE_TOKENS is a plain t…
claude Nov 11, 2026
9891fd1
Docker: publish the service on all the host's addresses (8765:8765) b…
claude Nov 11, 2026
ee6d622
Bot: the reconnect warning names the HTTP refusal (401 token, 421 all…
claude Nov 11, 2026
91c1fb4
Service: log each incoming request (who, which MCP method and tool or…
claude Nov 11, 2026
dde2dc8
Service request log: a tool call's readings, dates and interval after…
claude Nov 11, 2026
d3d16f1
Service: charts as PNG images for a client that asks (?charts=png or …
claude Nov 11, 2026
a4f83d3
Chart images, review follow-ups: the bot's own calls ask for JSON, an…
claude Nov 11, 2026
a1e6bd0
Docker: the service starts by default, the bot is optional (the bot p…
claude Nov 11, 2026
fef36e9
ecobot-mcp: the MCP program renamed, settings named for their owner, …
claude Nov 11, 2026
3c79438
Upgrading a systemd ecobot-mcp: copy its unit in again; an old unit s…
claude Nov 11, 2026
6da1a0c
scripts/migrate_env.py renames an env file's settings; step 6 (the sl…
claude Nov 11, 2026
36aaa4d
Bot: ecobot-mcp unreachable for a moment isn't a warning
claude Nov 11, 2026
a2a0715
Bot: no 'no token yet' warning at a start of both; said only when eco…
claude Nov 11, 2026
4eaed05
Plan: the bot stays as a slim client (step 6) everywhere the plan sai…
claude Nov 11, 2026
1acadf3
Plan: irrigation on its own is step 7 (was 5b, then 6d)
claude Nov 11, 2026
7a2330e
Prompts named so each can be a chat command: weather -> weather_chart…
claude Nov 11, 2026
819e3ca
The gauges as a live web page: /dashboard beside /mcp in ecobot-mcp
claude Nov 11, 2026
c5ff122
Dashboard data answered from what is held: a LAN request never asks t…
claude Nov 11, 2026
e974930
Web dashboard: gauges move in place to a new reading; status line alw…
claude Nov 11, 2026
0f165bc
Plan step 6: the Telegram dashboard goes; Status keeps its three gaug…
claude Nov 11, 2026
b6baa38
Thermometers: 0 to 40 °C, widened 10 degrees at a time to take in the…
claude Nov 11, 2026
2917d16
Web dashboard: when the page opens, every gauge rises from 0 to its r…
claude Nov 11, 2026
305abc7
Dashboard: a tile with no reading is dimmed at its floor; the air sen…
claude Nov 11, 2026
e8f6ff6
Dashboard: the air dials name the band their needle is in; the page's…
claude Nov 11, 2026
5340298
Dashboard: a PM1 gauge, on PM2.5's EPA bands (no standard sets PM1's …
claude Nov 11, 2026
8a9eaca
Chart links: ?charts=link serves each chart's PNG at /charts/<id>.png…
claude Nov 11, 2026
70a37bb
Tests: no more hangs, a 60 s watchdog, and less setup per test
claude Nov 11, 2026
bea543f
Merge branch 'dash-air' into claude/envirobot-next
claude Nov 11, 2026
ccd0880
Plan: step 7 is speed (7a-7d: the storage's rows, queries, closes and…
claude Nov 11, 2026
81faaae
Tools: the period's description says any number works (31d, 45 days, …
claude Nov 11, 2026
512eba5
Slim bot 6a and the gauges: every picture from ecobot-mcp, the Telegr…
claude Nov 11, 2026
bd43a23
Web dashboard: titled "Weather Dashboard", with a sun favicon (and ho…
claude Nov 11, 2026
0adff97
Slim bot 6b: client only. BOT_MCP_URL required, the in-process mode g…
claude Nov 11, 2026
6788b8c
Slim bot 6c: every typed question to the model, ecobot-mcp's prompts …
claude Nov 11, 2026
439f4ba
Slim bot 6c: the test-only oracles go (tests/old_tools.py, tests/repo…
claude Nov 11, 2026
2a75f22
Slim bot 6c, docs: step 6 done; what the bot does now, ecobot-mcp's p…
claude Nov 11, 2026
d9378b4
Tests: summary's captions and texts and days' answers pinned word for…
claude Nov 11, 2026
21a4408
Slim bot, review fixes: the air link read from the answer, a period p…
claude Nov 11, 2026
cae0088
Plan: step 6 left the bot 3,413 lines of code (from 3,676), not a fif…
claude Nov 11, 2026
b7ef2b5
Merge branch 'dash-title' into claude/envirobot-next
claude Nov 11, 2026
6b2e17e
US AQI: PM10 counts too (the higher of PM2.5's and PM10's, as AirNow …
claude Nov 11, 2026
250e0b3
Status: one message, no model: ecobot-mcp's gauges with the report it…
claude Nov 11, 2026
c9c2e5d
Step 7, faster: the storage's rows in one step, days placed by their …
claude Nov 11, 2026
00fd005
CLAUDE.md: the check before pushing runs every test, the slow ones to…
claude Nov 12, 2026
c6bda3a
lib/mcp_http.py: what an MCP server here needs over HTTP, out of ecob…
claude Nov 12, 2026
f48ad69
Settings: the irrigation controller's are IRRIGATION_ (irrigation-mcp…
claude Nov 12, 2026
d542aa5
irrigation-mcp (step 8a): the irrigation controller's own MCP server,…
claude Nov 12, 2026
1dfa600
irrigation-mcp's Docker image: --target irrigation-mcp, and compose's…
claude Nov 12, 2026
7ede1fe
The bot becomes irrigation-mcp's client (step 8b): its Irrigation but…
claude Nov 12, 2026
0ab9751
Packaging for step 8b: irrigation-mcp.service, compose's other files,…
claude Nov 12, 2026
81a26eb
Docs for step 8b: irrigation-mcp's install and upgrade, BOT_IRRIGATIO…
claude Nov 12, 2026
5dcb083
The bot's first start delivers irrigation-mcp's alerts still news, no…
claude Nov 12, 2026
97aa7bc
irrigation-mcp's refusals are told as refusals in the bot, not as "co…
claude Nov 12, 2026
950526b
irrigation-mcp's start: the watchdog and the tools don't wait for eco…
claude Nov 12, 2026
7defdd1
migrate_env.py: BOT_IRRIGATION_MCP_URL only with a device id, and Doc…
claude Nov 12, 2026
86fdb16
Docs: the plan's section 2 is the bot before step 1 (irrigation's fil…
claude Nov 12, 2026
5d39690
The dashboard answers at /dashboard/ too, not a redirect to the LAN
claude Nov 13, 2026
57e41e0
Docker images workflow: quote the step name with a colon in it, so Gi…
claude Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
# in the container: docker compose exec ecobot python scripts/...)
*
!ecobot.py
!ecobot_mcp/
!irrigation_mcp/
!lib/
!schemas/
!scripts/
!requirements.txt
!requirements-bot.txt
!requirements-mcp.txt
!requirements-irrigation.txt
!requirements-charts.txt
# the commit the log says it is running is read from these (a clone; the files are a few hundred bytes)
!.git/HEAD
!.git/refs/heads/
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ concurrency:
cancel-in-progress: true

env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} # optional: set both secrets to get failures as a Telegram message
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
NOTIFY_TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} # optional: set both secrets to get failures as a Telegram message (not the bot's
NOTIFY_TELEGRAM_CHAT: ${{ secrets.TELEGRAM_CHAT_ID }} # BOT_TELEGRAM_TOKEN setting: CI's own names)

jobs:
test:
# The gate: the exact versions in requirements.txt (the ones production runs), tests and chart images included.
# The gate: the exact versions in requirements.txt and requirements-charts.txt (the ones production runs), tests and chart images included.
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
Expand All @@ -38,7 +38,7 @@ jobs:
cache-dependency-path: requirements*.txt
- run: pip install -r requirements-dev.txt
- name: Tests
run: python -m pytest -q # pytest.ini runs them in parallel (-n auto)
run: python -m pytest -q -m "" # every test, the slow ones too; pytest.ini runs them in parallel (-n auto)
- name: Prompt and routing evals
run: python scripts/eval_prompts.py
- name: Chart pictures that differ
Expand All @@ -50,15 +50,15 @@ jobs:
if-no-files-found: ignore
retention-days: 14
- name: Tell me on Telegram (main only)
if: failure() && github.ref == 'refs/heads/main' && env.TELEGRAM_BOT_TOKEN != ''
if: failure() && github.ref == 'refs/heads/main' && env.NOTIFY_TELEGRAM_TOKEN != ''
run: |
curl -fsS "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${TELEGRAM_CHAT_ID}" \
curl -fsS "https://api.telegram.org/bot${NOTIFY_TELEGRAM_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${NOTIFY_TELEGRAM_CHAT}" \
--data-urlencode "text=CI failed on main: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" || true

newest:
# Advisory, never blocks: the same tests with the newest Pillow. If the chart pictures differ, a new release
# draws things differently: look at the artifact, then bump the pins in requirements.txt and run scripts/update_charts.py.
# draws things differently: look at the artifact, then bump the pin in requirements-charts.txt and run scripts/update_charts.py.
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
continue-on-error: true
Expand All @@ -70,7 +70,7 @@ jobs:
- run: pip install -r requirements-dev.txt && pip install --upgrade pillow
- run: pip list | grep -i -E "^pillow "
- name: Tests (not the chart pictures)
run: python -m pytest -q -m "not golden"
run: python -m pytest -q -m "not golden" # (the slow ones too: -m replaces pytest.ini's "not slow")
- name: Chart pictures
id: pictures
continue-on-error: true
Expand All @@ -84,15 +84,15 @@ jobs:
if-no-files-found: ignore
retention-days: 30
- name: Tell me on Telegram
if: (failure() || steps.pictures.outcome == 'failure') && env.TELEGRAM_BOT_TOKEN != ''
if: (failure() || steps.pictures.outcome == 'failure') && env.NOTIFY_TELEGRAM_TOKEN != ''
run: |
curl -fsS "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${TELEGRAM_CHAT_ID}" \
curl -fsS "https://api.telegram.org/bot${NOTIFY_TELEGRAM_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${NOTIFY_TELEGRAM_CHAT}" \
--data-urlencode "text=The newest Pillow changes something: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" || true

live-evals:
# Advisory, never blocks: asks the real model the few questions in tests/evals/weekly.txt and checks which tool it calls. Needs the
# repository secret OPENROUTER_API_KEY (skipped without it); OPENROUTER_MODEL is optional, for when production runs another model than deepseek/deepseek-v4.1-flash-1017. A failure is run once more before it is reported.
# repository secret OPENROUTER_API_KEY (skipped without it; the eval script's own names, not the bot's BOT_OPENROUTER_*); OPENROUTER_MODEL is optional, for when production runs another model than deepseek/deepseek-v4.1-flash-1017. A failure is run once more before it is reported.
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
continue-on-error: true
Expand All @@ -115,8 +115,8 @@ jobs:
if [ "$ALL_CASES" != "true" ]; then ids=(--ids "$(paste -sd, tests/evals/weekly.txt)"); fi
python scripts/eval_prompts.py --live "${ids[@]}" || { echo "Failed: asking once more"; python scripts/eval_prompts.py --live "${ids[@]}"; }
- name: Tell me on Telegram
if: failure() && env.TELEGRAM_BOT_TOKEN != ''
if: failure() && env.NOTIFY_TELEGRAM_TOKEN != ''
run: |
curl -fsS "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${TELEGRAM_CHAT_ID}" \
curl -fsS "https://api.telegram.org/bot${NOTIFY_TELEGRAM_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${NOTIFY_TELEGRAM_CHAT}" \
--data-urlencode "text=The model answers differently to the saved questions: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" || true
42 changes: 31 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,46 @@
name: Docker image
name: Docker images

on:
push: # any branch, so a pull request's commits carry the check too
paths: [Dockerfile, .dockerignore, requirements.txt, .github/workflows/docker.yml]
paths: [Dockerfile, .dockerignore, requirements.txt, requirements-bot.txt, requirements-mcp.txt, requirements-irrigation.txt, requirements-charts.txt, .github/workflows/docker.yml]
workflow_dispatch:

permissions:
contents: read

jobs:
image:
# The image builds from the Dockerfile, the bot starts in it, and the charts it draws there are the approved ones, in Inter
# The three images build from the Dockerfile (each target's build imports its program, ecobot-mcp's with no Telegram and no model
# client in it, irrigation-mcp's with neither and no Pillow or source, the bot's with no Pillow, no source and none of
# irrigation-mcp's controller), each program starts in its image, and the charts ecobot-mcp draws are the approved ones, in Inter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Build
run: docker build --build-arg COMMIT="$GITHUB_SHA" -t ecobot .
- name: Build ecobot-mcp
run: docker build --target ecobot-mcp --build-arg COMMIT="$GITHUB_SHA" -t ecobot-mcp .
- name: Build irrigation-mcp
run: docker build --target irrigation-mcp --build-arg COMMIT="$GITHUB_SHA" -t irrigation-mcp .
- name: Build ecobot (the bot)
run: docker build --target ecobot --build-arg COMMIT="$GITHUB_SHA" -t ecobot .
- name: ecobot-mcp starts and names this commit
run: |
docker run --rm --network none ecobot-mcp > start-mcp.log 2>&1 || true # stops: no data source set
cat start-mcp.log
grep -q "Starting ecobot-mcp ${GITHUB_SHA::7}" start-mcp.log
- name: irrigation-mcp starts and names this commit
run: |
docker run --rm --network none irrigation-mcp > start-irrigation.log 2>&1 || true # stops: no Tuya settings
cat start-irrigation.log
grep -q "Starting irrigation-mcp ${GITHUB_SHA::7}" start-irrigation.log
- name: The bot starts and names this commit
run: |
docker run --rm --network none -e TELEGRAM_BOT_TOKEN=0:x -e OPENROUTER_API_KEY=x ecobot > start.log 2>&1 || true # stops: no data source set
docker run --rm --network none -e BOT_TELEGRAM_TOKEN=0:x -e BOT_OPENROUTER_API_KEY=x ecobot > start.log 2>&1 || true # stops: no BOT_MCP_URL
cat start.log
grep -q "Starting ecobot ${GITHUB_SHA::7}" start.log
- name: Charts drawn in the image
- name: "Charts drawn in ecobot-mcp's image (the bot's draws none: it has no Pillow)"
run: |
docker run --rm --network none -v "$PWD/tests:/app/tests:ro" ecobot python -c '
for image in ecobot-mcp; do
docker run --rm --network none -v "$PWD/tests:/app/tests:ro" "$image" python -c '
from PIL import Image
from lib import charts
from tests import chart_samples, imagecmp
Expand All @@ -32,8 +49,11 @@ jobs:
share = imagecmp.difference(imagecmp.snapshot(make(), name.endswith("_dark")), Image.open(imagecmp.GOLDEN / f"{name}.png"))[0]
assert share <= imagecmp.TOLERANCE, f"{name}: {share:.2%} of the pixels differ from tests/charts/{name}.png"
print("Inter with semibold titles; every sample chart matches its reference image")'
done
- name: Size
run: |
unpacked=$(docker run --rm --network none --user 0 --entrypoint du ecobot -sx --apparent-size --block-size=1M / | cut -f1)
compressed=$(docker save ecobot | gzip -c | wc -c)
echo "The image: ${unpacked} MB unpacked, $((compressed / 1000000)) MB compressed" | tee -a "$GITHUB_STEP_SUMMARY"
for image in ecobot-mcp irrigation-mcp ecobot; do
unpacked=$(docker run --rm --network none --user 0 --entrypoint du "$image" -sx --apparent-size --block-size=1M / | cut -f1)
compressed=$(docker save "$image" | gzip -c | wc -c)
echo "The image ${image}: ${unpacked} MB unpacked, $((compressed / 1000000)) MB compressed" | tee -a "$GITHUB_STEP_SUMMARY"
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bot_state.json.tmp
*.db
*.db-*
*.env
!docker/*.env
mcp_ecowitt.json
chart-diffs/
!tests/data/*.sqlite
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working in this repo

- **Iterating:** the "dev branch" is whichever branch the session is on, any branch except `main`. Keep using it between iterations: commit and push each change to it, so the user can pull it into their test environment. Never reset or recreate it.
- **Checks before pushing:** `python -m pytest -q` and `python scripts/eval_prompts.py` (see `DEVELOPMENT.md`).
- **Checks before pushing:** `python -m pytest -q -m ""` (every test, the slow ones too) and `python scripts/eval_prompts.py` (see `DEVELOPMENT.md`).
Loading
Loading