Skip to content

fix: use the only timetable source that has data - #15

Merged
injoon5 merged 2 commits into
mainfrom
cursor/single-source-fallback-f9d0
Aug 21, 2026
Merged

injoon5 merged 2 commits into
mainfrom
cursor/single-source-fallback-f9d0

Conversation

@injoon5

@injoon5 injoon5 commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner

source=auto always merges. It does not pick one upstream wholesale.

Merge rules

  • Per period: if only one source has a subject, use it (empty/cancelled Comcigan still fills from NEIS)
  • Both have a subject: shorter name wins (Comcigan on a tie)
  • Missing weekdays/periods fill from the other source
  • Comcigan teachers, bell times, and homeroom stay when present
  • NEIS Saturday is dropped (토요휴업일)
  • source=auto still 409s if Comcigan’s search is ambiguous

Tests

Unit coverage in src/test/timetable-merge.ts: empty grid fills periods but keeps Comcigan metadata; cancelled period fills from NEIS subject and keeps the Comcigan teacher.

Open in Web Open in Cursor 

auto merge was overlaying an empty or cancelled-only grid onto the
source that actually had periods. If only one of Comcigan or NEIS has
subjects, return that result as-is.

Co-authored-by: Injoon Oh <injoon5@icloud.com>
@vercel

vercel Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
school-api Ready Ready Preview Aug 21, 2026 7:34am
school-api-docs Ready Ready Preview Aug 21, 2026 7:34am

Empty or cancelled Comcigan periods fill from NEIS when it has a
subject. Teachers, bell times, and homeroom still come from Comcigan
when present. Both-have-data still uses shorter-name merge.

Co-authored-by: Injoon Oh <injoon5@icloud.com>
@injoon5
injoon5 merged commit 9859d4b into main Aug 21, 2026
5 checks passed

This branch was successfully deployed

2 active deployments
Preview – school-api-docs — ad902446 Deployed Aug 21, 2026 by vercel[bot]
Preview – school-api — ad902446 Deployed Aug 21, 2026 by vercel[bot]
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