Skip to content

Dev#34

Merged
cute-omega merged 5 commits intomainfrom
dev
Dec 22, 2025
Merged

Dev#34
cute-omega merged 5 commits intomainfrom
dev

Conversation

@cute-omega
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 22, 2025 22:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds error handling for the default remote config and makes type safety improvements while reducing workflow frequency.

  • Adds a try-except fallback mechanism when fetching the default Dev-Sidecar remote config
  • Improves type annotations by changing raw_config from dict | list to the more precise JSON5Object type
  • Reduces GitHub Actions workflow frequency from every 30 minutes to every 8 hours

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/main.py Wraps default_remote config download in try-except block with fallback to a cached result on failure
src/Config.py Updates type annotation for raw_config to JSON5Object and adds type ignore directives for SheasCealerConfig's narrower type
.github/workflows/main.yml Reduces scheduled workflow runs from twice per hour to once every 8 hours
Comments suppressed due to low confidence (1)

src/main.py:60

  • Only the default_remote config has error handling, but the other config sources (SheasCealerConfig, GithubConfig for 8odream, and LocalConfig for manual) can also fail with RuntimeError or other exceptions. According to the project's merge order (default_remote → 8odream → Sheas Cealer → manual), if any of these later sources fail, the entire script will crash. Consider adding similar try-except blocks for the other config sources to improve resilience, or document why only default_remote needs this protection.
    # 获取 Sheas Cealer 配置,默认为空列表
    sheas_cealer = SheasCealerConfig(
        "SpaceTimee/Cealing-Host/raw/main/Cealing-Host.json", "Sheas Cealer"
    )

    # 读取 8odream 配置
    _8odream = GithubConfig(
        "8odream/Devsidecar-8odream-config/raw/main/config.json", "8odream"
    )

    # 读取 手动配置
    manual = LocalConfig(manual_path, "Manual")

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 22, 2025 22:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 22, 2025

@cute-omega I've opened a new pull request, #35, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

* Initial plan

* Update raw_config docstring to reflect JSON5Object type

Co-authored-by: cute-omega <92797441+cute-omega@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cute-omega <92797441+cute-omega@users.noreply.github.com>
@cute-omega cute-omega merged commit 9239da9 into main Dec 22, 2025
7 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.

3 participants