Compare commits
4 Commits
codex/hand
...
codex/hand
| Author | SHA1 | Date | |
|---|---|---|---|
| b3b8dc98af | |||
| f0a8162202 | |||
| 09ee1d9006 | |||
| 20243d159f |
@@ -14,6 +14,8 @@ Last updated: 2026-07-05
|
|||||||
- PR runs 915-916 and production runs 917-919 passed, including unit tests, Compose validation, Docker build/publish, release dry-run, and template compliance.
|
- PR runs 915-916 and production runs 917-919 passed, including unit tests, Compose validation, Docker build/publish, release dry-run, and template compliance.
|
||||||
- Dockge was updated from the Gitea Registry and explicitly configured with `DAVE_PRESENCE_ENABLED=true`, max 4 messages/day, 75-minute minimum gap, randomized 45-180 minute evaluation bounds, 60-minute post-interaction idle delay, and a 5-minute timer resolution.
|
- Dockge was updated from the Gitea Registry and explicitly configured with `DAVE_PRESENCE_ENABLED=true`, max 4 messages/day, 75-minute minimum gap, randomized 45-180 minute evaluation bounds, 60-minute post-interaction idle delay, and a 5-minute timer resolution.
|
||||||
- Live `/api/health` reported `davePresence.enabled=true`, `running=true`, `dynamic=true`, `sentToday=0`, a variable `nextEvaluationAt`, the existing encrypted profile preserved, and no sweep error. The container reported `running/healthy`.
|
- Live `/api/health` reported `davePresence.enabled=true`, `running=true`, `dynamic=true`, `sentToday=0`, a variable `nextEvaluationAt`, the existing encrypted profile preserved, and no sweep error. The container reported `running/healthy`.
|
||||||
|
- Live verification then exposed issue #73: an invalid optional profile timezone caused `lastReason=invalid_timezone`. PR #74 fixed runtime resolution to fall back to `DAVE_PRESENCE_TIMEZONE` without logging or modifying encrypted profile data. Merge commit: `f0a8162202bfe0a0a8ed2a00dc4f0f7092677eea`.
|
||||||
|
- PR runs 925-926 and production runs 927-929 passed. After redeployment and the startup timer, live health reported `lastReason=not_due` instead of `invalid_timezone`, with dynamic presence running, the profile preserved, the container healthy, and no sweep error.
|
||||||
|
|
||||||
## Latest Completed Work
|
## Latest Completed Work
|
||||||
|
|
||||||
|
|||||||
@@ -78,8 +78,12 @@ export class DavePresence {
|
|||||||
const profile = this.profileStore?.getAgentProfile();
|
const profile = this.profileStore?.getAgentProfile();
|
||||||
if (!profile) return this._result(false, 'profile_missing');
|
if (!profile) return this._result(false, 'profile_missing');
|
||||||
|
|
||||||
const timezone = profile.timezone || this.fallbackTimezone;
|
let timezone = profile.timezone || this.fallbackTimezone;
|
||||||
const clock = localClock(now, timezone);
|
let clock = localClock(now, timezone);
|
||||||
|
if (!clock && timezone !== this.fallbackTimezone) {
|
||||||
|
timezone = this.fallbackTimezone;
|
||||||
|
clock = localClock(now, timezone);
|
||||||
|
}
|
||||||
if (!clock) return this._result(false, 'invalid_timezone');
|
if (!clock) return this._result(false, 'invalid_timezone');
|
||||||
this._rollDay(clock.day);
|
this._rollDay(clock.day);
|
||||||
if (this.state.sentCount >= this.maxPerDay) return this._result(false, 'daily_limit');
|
if (this.state.sentCount >= this.maxPerDay) return this._result(false, 'daily_limit');
|
||||||
|
|||||||
@@ -89,3 +89,11 @@ test('local clock uses the profile timezone', () => {
|
|||||||
assert.deepEqual(localClock(new Date('2026-07-06T12:30:00Z'), 'Europe/Berlin'), { day: '2026-07-06', time: '14:30' });
|
assert.deepEqual(localClock(new Date('2026-07-06T12:30:00Z'), 'Europe/Berlin'), { day: '2026-07-06', time: '14:30' });
|
||||||
assert.equal(localClock(new Date(), 'Invalid/Timezone'), null);
|
assert.equal(localClock(new Date(), 'Invalid/Timezone'), null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('invalid profile timezone falls back to configured operational timezone', async () => {
|
||||||
|
const { presence, messages, calls } = setup({ profile: { timezone: 'not-a-timezone' } });
|
||||||
|
const outcome = await presence.tick(new Date('2026-07-06T12:00:00Z'));
|
||||||
|
assert.equal(outcome.reason, 'sent');
|
||||||
|
assert.equal(messages.length, 1);
|
||||||
|
assert.match(calls[0].prompt, /timezone: UTC/);
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user