Phase 6: fix the live Home Assistant write (Local Calendar, no event id)
The first live run against the new calendar.school entity failed loudly twice, and both causes are fixed here. - The Local Calendar rejects `return_response` on calendar.create_event. The client retries the call without it and ignores the changed-states array that Home Assistant returns instead. - Home Assistant then reports no event id. The item keeps the description marker ([compass-nhs:<id>]) as its reference, so it leaves the candidate set and is never written twice. The live retry proved it: both events already in the calendar were adopted by their markers, with no duplicate. - calendar.get_events reports `start` / `end` (a date-time or a bare date), not `start_date_time`; the reader now accepts all three shapes. A model must no longer classify events. The calendar write depends on the school-event rule, and the LLM labelled every event "normal"; events now keep the deterministic rule under both classifiers. Also fix the Phase 5 screenshot script: the calendar banner shares the `.scan` class, so select each banner by its labelled section. Docs record the accepted decision: Sam chose a Home Assistant Local Calendar, so the target is calendar.school. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -97,14 +97,25 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
// 4. The scan banner on its own, cropped to the top of the dashboard.
|
||||
// 4. The scan banner on its own, cropped to the top of the dashboard. The
|
||||
// class is shared with the calendar banner, so select by the labelled
|
||||
// section, not by `.scan` alone.
|
||||
await page.goto(`${BASE}/`, { waitUntil: "networkidle" });
|
||||
await page.waitForSelector(".scan", { timeout: 20000 });
|
||||
const scanBanner = page.locator('.scan[aria-labelledby="scan-title"]');
|
||||
await scanBanner.waitFor({ timeout: 20000 });
|
||||
const bannerFile = path.join(OUT, "scan-banner.png");
|
||||
await page.locator(".scan").screenshot({ path: bannerFile });
|
||||
await scanBanner.screenshot({ path: bannerFile });
|
||||
shots.push(bannerFile);
|
||||
console.log(`shot ${bannerFile}`);
|
||||
|
||||
// 5. The calendar banner (Phase 6, FR-8 / FR-12).
|
||||
const calendarBanner = page.locator('.scan[aria-labelledby="calendar-title"]');
|
||||
await calendarBanner.waitFor({ timeout: 20000 });
|
||||
const calendarFile = path.join(OUT, "calendar-banner.png");
|
||||
await calendarBanner.screenshot({ path: calendarFile });
|
||||
shots.push(calendarFile);
|
||||
console.log(`shot ${calendarFile}`);
|
||||
|
||||
await sleep(100);
|
||||
console.log(`done: ${shots.length} screenshot(s) in ${OUT}`);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user