Repository navigation
Fix stale timetable: follow the renamed grid variables in the Comcigan viewer - #81
Merged
Merged
Conversation
The provider again changed its renderer: the cell data is read into arbitrarily named variables and passed to baSplit(daily, base, ...), so the 原자료/일일자료 assignments the parser looked for no longer exist and every refresh failed (timetable stale since 2026-11-26 11:10 KST). When those names are absent, find the two grid fields through the baSplit call: its first argument is the current (daily) value, the second the original. The old patterns are tried first; identical or unresolved arguments are rejected instead of guessed. Verified against the live provider (stale=false). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019WGLWH38z9TSjANcYp59QN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The timetable shows the last good copy again (refresh failing since 2026-11-26 ~11:10 KST). Production log:
Timetable refresh unavailable; last-good fallback checkedevery few minutes.Cause
Step-by-step probe against the live provider: six of the seven extractors pass; only
extractComciganFieldsfails. The viewer no longer assigns원자료=Q자료(자료.X[…])/일일자료=…; each cell now reads into arbitrarily named variables (E6WU=Cak7(자료.NMZ366[…]);eXF6=Cak7(자료.ODS294[…])) and callsbaSplit(eXF6,E6WU,…). FrombaSplit's body, the first argument is the current (daily) value and the second the original (a difference is rendered as "변경").Fix
extractComciganFieldskeeps the old patterns first. Ifbase/dailyare not found, it maps variable → field from the cell assignments and resolves them through thebaSplit(first, second, …)call. Identical or unresolved arguments throw instead of guessing. Teachers/subjects patterns already matched and are unchanged.Verification
tests/comcigan-source.test.mts: 7 pass.getTimetable(1,1,{forceRefresh:true})against the live provider:stale:false, freshfetchedAt, same Monday grid as before.🤖 Generated with Claude Code