Skip to content

feat: refine context into an AI-ready daily snapshot - #12

Merged
aprylewu merged 1 commit into
mainfrom
feat/context-daily-snapshot
Sep 7, 2026
Merged

feat: refine context into an AI-ready daily snapshot#12
aprylewu merged 1 commit into
mainfrom
feat/context-daily-snapshot

Conversation

@pentaoa

@pentaoa pentaoa commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

context previously used the host timezone, hid the next class during an active class, conflated empty results with unavailable sources, and exposed weather/AQI only at verbose level without observation timestamps. This change makes the default live context a usable daily snapshot for AI assistants.

  • Pin date/time to Asia/Shanghai and separate snapshot generation time from the reference instant. Return public academic-day flags, parity and makeup metadata.
  • Add structured current, next and today's course instances using the existing ICS holiday/makeup rules; support upcoming classes before teaching starts and mark incomplete timetable coverage.
  • Include weather/AQI at normal level with source, observation time, freshness and explicit US EPA scale. Keep library opening status at verbose level.
  • Run academic and environmental reads concurrently, bound public environmental requests, preserve empty/error/partial/not-requested states, and return available data when the calendar fails.
  • Reject live requests for non-today dates; retain non-live calendar previews. Update README and changelog.

Validation: build and all 320 tests passed. The 21 context/calendar tests also pass with TZ=UTC, including Shanghai midnight, active-plus-next classes, makeup dates, pre-term schedules, missing periods and stale observations. No campus mutation is performed by this feature.

@aprylewu
aprylewu merged commit 17d50fa into main Sep 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants