Start from current ISO week by default; skip session-less weeks instead of stopping#736
Draft
Start from current ISO week by default; skip session-less weeks instead of stopping#736
Conversation
Co-authored-by: ManAnRuck <2183135+ManAnRuck@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Start implementation for date handling and crawling logic
Start from current ISO week by default; skip session-less weeks instead of stopping
Mar 10, 2026
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.
The conference week crawler relied on hardcoded defaults (
CONFERENCE_YEAR: 2025,CONFERENCE_WEEK: 46) that required manual updates to stay current. Additionally, if the starting week had no scheduled sessions (404), the crawler would stop immediately rather than continuing to future weeks.Changes
config.ts— dynamic start weekgetISOWeekForDate(date?), an exported ISO 8601 week/year helper that defaults to todayjson-fetcher.ts— skip session-less weeksgetISOWeeksInYear(year)andgetNextISOWeek(year, week)with correct year-boundary handling (52 vs 53-week years)fetchConferenceWeeks()now advances to the next ISO week on 404 instead of aborting — thelimitparameter still bounds total attemptsTests
json-fetcher.test.ts: coversgetISOWeeksInYear,getNextISOWeek(including year boundaries), and the skip-week behaviour offetchConferenceWeeksconfig.test.ts: edge cases forgetISOWeekForDate— mid-year, year-end (Dec 30 → ISO week 1 of next year), year-start (Jan 1 → ISO week 53 of prior year)Original prompt
Start implementation
The user has attached the following file paths as relevant context:
- .github/copilot-instructions.md
[Chronological Review: The conversation began with the user expressing confusion about concepts such as upstream, downstream, backfill, DB windows, and recovery processes. The user then inquired about the definition of the DB window in the code. Following this, the user suggested simplifying the logic around date handling and crawling, proposing to start from the current date and only specify a number of weeks or a date. The user also mentioned the need to always crawl future data without additional configuration for recovery. The conversation shifted to discussing the current week’s data retrieval from a JSON endpoint, highlighting issues with weeks without sessions and the absence of current week information. The user requested a plan for recommended changes based on this situation.][Intent Mapping:
[Technical Inventory:
[Code Archaeology: No specific code files or functions were explicitly mentioned or modified in the conversation.]
[Progress Assessment:
[Context Validation: All critical information for continuation is captured, including user requests for clarification, simplification proposals, and the need for a plan regarding data retrieval.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: User seeks to understand technical concepts related to data retrieval and proposes simplifications to the crawling logic. They also request a plan for recommended changes based on current data retrieval issues. - Session Context: The conversation has progressed from clarifying technical concepts to discussing specific data retrieval challenges and proposing a more straightforward approach to crawling. - User Intent Evolution: The user has moved from seeking clarification to actively proposing changes and requesting a plan for implementation.- Technical Foundation:
- JSON Data Retrieval: The user is working with data from a URL that provides information about parliamentary sessions.
- Proposed Logic: Simplification of crawling to always start from the current date, with the ability to specify a number of weeks or a date.
- Codebase Status:
- No specific files or code changes were discussed in detail.
- Problem Resolution:
- Issues Encountered: The user identified problems with weeks without sessions and the absence of current week information in the retrieved JSON data.
- Solutions Implemented: User proposed a simplified crawling logic.
- Debugging Context: Ongoing discussions about how to handle the current week’s data retrieval.
- Progress Tracking:
- Completed Tasks: User has articulated their confusion and proposed a simplification of the crawling logic.
- Partially Complete Work: User has requested a plan for implementing recommended changes.
- Active Work State:
- Current Focus: User is focused on planning recommended changes to the data retrieval logic.
- Recent Context: User discussed issues with the current week’s data retrieval and proposed a new approach to crawling.
- Immediate Context: User is looking for a plan to address the current week’s data retrieval issues.
- Recent Operations:
- Last Agent Commands: User requested a plan for recommended changes.
- Tool Results Summary: User provided JSON data from a URL and highlighted issues w...
Created from VS Code.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.