<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chime/tests, branch main</title>
<subtitle>Emacs chimes, notifications, and modeline reminders so you don't miss events
</subtitle>
<id>https://git.cjennings.net/chime/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/chime/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/'/>
<updated>2026-07-10T00:58:27+00:00</updated>
<entry>
<title>fix(tests): report skipped integration tests instead of passing them</title>
<updated>2026-07-10T00:58:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-10T00:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=e71c5751d133fc4a0ece61a577ca116255d79a59'/>
<id>urn:sha1:e71c5751d133fc4a0ece61a577ca116255d79a59</id>
<content type='text'>
Every integration test is tagged :slow, so the default run selected none of them and then printed "All integration tests passed" over four "Ran 0 tests" lines.

The target now sums the tests actually run. Zero means it says skipped and names make test-all; a real run reports its count. A failing file still exits non-zero.

This is the third false-green in this Makefile. The other two read $? after a pipeline (7e03862).
</content>
</entry>
<entry>
<title>fix(tests): wait for the sound sentinel, not just the child's exit</title>
<updated>2026-07-10T00:58:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-10T00:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=e15b780739bb260940ed7d6023056c391b6f7400'/>
<id>urn:sha1:e15b780739bb260940ed7d6023056c391b6f7400</id>
<content type='text'>
process-live-p goes nil the moment the child exits, but its sentinel is queued and runs on a later turn of the event loop. Two sound tests stopped waiting at process death, so the sentinel's message landed inside the next test's message mock.

make coverage caught it. Instrumentation slowed things just enough that "false exited with status 1" showed up in the silent-player test. The plain suite had been passing by luck.

Both tests now wait for the sentinel to have run.
</content>
</entry>
<entry>
<title>test: exercise the watchdog against a real signal-immune child</title>
<updated>2026-07-10T00:58:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-10T00:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=00c2911b8564559c4efc046e732de26bfa3d9a67'/>
<id>urn:sha1:00c2911b8564559c4efc046e732de26bfa3d9a67</id>
<content type='text'>
The watchdog suite stubs the whole process layer, so nothing anywhere verified the signal semantics the watchdog rests on. These :slow tests spawn a shell that traps SIGINT and let the kernel deliver the real signals.

The first one pins the premise: the child survives interrupt-process and dies to chime--kill-async-process.
</content>
</entry>
<entry>
<title>fix: kill abandoned async children and discard their late callbacks</title>
<updated>2026-07-10T00:58:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-10T00:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=e43e44cb4cef93b3e3ae68396a0af639cea1534f'/>
<id>urn:sha1:e43e44cb4cef93b3e3ae68396a0af639cea1534f</id>
<content type='text'>
Three faults in one path, all made reachable by the watchdog.

A callback returning just past the timeout ran against state that no longer belonged to it. It nil'd chime--process, which by then held the replacement child, so the overlap guard broke and a third child could spawn. It also reset the failure counter the watchdog had just incremented. Each spawn now captures a generation, and a result whose generation is stale is discarded whole.

interrupt-process only asks. A child stuck in a blocking read ignores SIGINT and lives on as a zombie, invisible because chime--process was already cleared. The watchdog and chime--stop now call chime--kill-async-process, which silences the sentinel and calls delete-process.

async.el kills a child's process buffer only on a zero exit, so every signalled child leaked one. With a persistent hang that's a buffer per chime-async-timeout until Emacs restarts. The kill path reaps the buffer itself.

chime--stop also clears chime--consecutive-async-failures and chime--process-start-time, so a later chime-mode doesn't resume with the old count.
</content>
</entry>
<entry>
<title>test: add failing tests for the async generation guard and kill path</title>
<updated>2026-07-10T00:58:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-10T00:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=67eb495da255d0cf00c88448f8cfd232c88563d1'/>
<id>urn:sha1:67eb495da255d0cf00c88448f8cfd232c88563d1</id>
<content type='text'>
The tests cover a fresh result being processed, a stale one discarded without touching the replacement child's handle or the failure counter, the watchdog and chime--stop both superseding the generation, and chime--kill-async-process reaping a real child and its buffer.

Where a mock can't show the behavior, the tests spawn real processes. async.el's buffer handling and the sentinel silencing are the thing under test.
</content>
</entry>
<entry>
<title>test: add failing tests for the per-event alert guard</title>
<updated>2026-07-10T00:57:45+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-10T00:57:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=032ba26f7504a7a10f532f345d3d5f183c171fe7'/>
<id>urn:sha1:032ba26f7504a7a10f532f345d3d5f183c171fe7</id>
<content type='text'>
One test asserts that an alert error is reported rather than signalled. The other asserts that a failing event doesn't cost us the notifications after it, driving chime--process-notifications over three events with the middle one raising.
</content>
</entry>
<entry>
<title>test: assert on chime's messages, not on Emacs staying silent</title>
<updated>2026-07-09T22:53:15+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-09T22:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=3f0dcdcdf9ad7401867f997ff165bb47cc46c9a4'/>
<id>urn:sha1:3f0dcdcdf9ad7401867f997ff165bb47cc46c9a4</id>
<content type='text'>
Three sound tests mocked message and counted everything it captured. Under make coverage, chime.el loads as instrumented source, so the sentinel lambda compiles on first call and emits "Warning: argument '_event' not left unused" through message. That warning landed in the capture list, the counts came out one high, and the Coverage job failed while all five Emacs versions passed.

The tests now filter captured messages to chime's own. What they mean is that chime reported the failure once, not that nothing in Emacs said anything.

make test and make test-all never load the instrumented source, so they can't catch this. make coverage reproduces it.
</content>
</entry>
<entry>
<title>fix(tests): report failure from test-file and validate</title>
<updated>2026-07-09T21:12:44+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-09T21:12:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=7e03862f6315af4b960cbbbe670764cbd49b09d1'/>
<id>urn:sha1:7e03862f6315af4b960cbbbe670764cbd49b09d1</id>
<content type='text'>
Both targets read $? after a pipeline, so they got the exit status of the last command in it rather than of Emacs.

test-file piped Emacs through tee, so it printed "All tests passed" over a wall of FAILED lines and exited 0. It now redirects to the log, saves the status, and cats the log back.

validate piped Emacs through grep, and grep matched the failure line it was looking for, so a file with unbalanced parens printed its error in green and counted as validated. It now captures the output and the status separately. Verified against a deliberately broken file: before the fix, "All 78 files validated successfully" and exit 0.

make test and make test-all were never affected. They shell out to test-unit and test-integration without a pipeline.
</content>
</entry>
<entry>
<title>fix: inject the lookahead variables into the async fetch child</title>
<updated>2026-07-09T21:08:47+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-09T21:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=ce396bd2683b0ca4e11279af73f8e733dc16ddc6'/>
<id>urn:sha1:ce396bd2683b0ca4e11279af73f8e733dc16ddc6</id>
<content type='text'>
The child sizes its agenda span from chime-modeline-lookahead-minutes and chime-tooltip-lookahead-hours, but neither was in chime-default-environment-regex. The child requires chime, so both were bound there at their defaults. Customizing either did nothing past the default eight days, with no error to explain why. The tooltip docstring invites 8760 hours to see distant events, and that setting was inert.

I added both names to the injected set.

The test that matters walks the child form and fails on any chime defcustom it reads that the regex doesn't cover, so a variable added to the child later can't reintroduce this quietly. Its companions pin the regex's anchoring and the additional-regexes extension point.
</content>
</entry>
<entry>
<title>test: add failing tests for the days-until-event nil crash</title>
<updated>2026-07-09T21:08:09+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-09T21:08:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=ad21a480cb4b833fba94339e8b9e13401e7c8873'/>
<id>urn:sha1:ad21a480cb4b833fba94339e8b9e13401e7c8873</id>
<content type='text'>
The tests cover a lone all-day timestamp, the soonest of several, an event mixing timed and all-day timestamps, an event with no all-day timestamp, and an empty timestamp list. A sixth covers the notification text when the day count comes back nil.

I built the timestamps against the real current time, not testutil-time's base, which sits 30 days ahead. chime--days-until-event measures against current-time, so the shared helper would have made every expected day count wrong.
</content>
</entry>
</feed>
