<feed xmlns='http://www.w3.org/2005/Atom'>
<title>doot.git/internal/handlers/budget_logic.go, branch master</title>
<subtitle>doot — personal productivity web app
</subtitle>
<id>https://git.terst.org/doot.git/atom?h=master</id>
<link rel='self' href='https://git.terst.org/doot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.terst.org/doot.git/'/>
<updated>2026-07-16T06:41:40+00:00</updated>
<entry>
<title>Fix overlapping-event double-subtraction in ComputeBudgetPeriod; clarify task-filter doc comment; add multi-day test</title>
<updated>2026-07-16T06:41:40+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-07-16T06:41:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/doot.git/commit/?id=cef79fc49fd8d6e607c71432755812adca847ce2'/>
<id>urn:sha1:cef79fc49fd8d6e607c71432755812adca847ce2</id>
<content type='text'>
Overlapping calendar events within the same availability block were each
subtracted independently, double-counting their intersection and making
availability under-counted (a 120-min block with two 60-min-overlap events
that overlap each other 18:30-19:00 came out to 0 min instead of the
correct 30 min). Replace the per-event overlapMinutes subtraction with
busyMinutesInBlock, which clips each event to the block, merges the
clipped intervals, and subtracts the union's total length.

Also clarify ComputeBudgetPeriod's doc comment: task filtering only
enforces an upper bound (due &lt; end); start is intentionally not used to
filter tasks, since callers are expected to pre-fetch and pass in
already-overdue tasks. Add a multi-day-window test verifying availability
sums correctly across days, a block only contributes on its matching
weekday, and the day-iteration loop excludes the day at `end`.

Co-Authored-By: Claude Sonnet 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01PQaPGQVSfmKUiHXB87qRTC
</content>
</entry>
<entry>
<title>Add pure availability-minus-events and scheduled-load computation</title>
<updated>2026-07-16T06:35:07+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-07-16T06:35:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/doot.git/commit/?id=e2a20706caa5cfb10897db84e246e6bdb4992470'/>
<id>urn:sha1:e2a20706caa5cfb10897db84e246e6bdb4992470</id>
<content type='text'>
ComputeBudgetPeriod is a standalone, dependency-free function over
in-memory availability blocks, calendar events, and tasks: sums weekly
availability minus overlapping calendar events for [start, end), and
sums estimated minutes for tracked, incomplete tasks due in that window.
</content>
</entry>
</feed>
