Skip to content

fix(upstream): 修正 sync point 打錯的完整 SHA,compare 404 時指出原因 - #30

Closed
SanHsien wants to merge 1 commit into
mainfrom
claude/determined-babbage-c531mj
Closed

SanHsien wants to merge 1 commit into
mainfrom
claude/determined-babbage-c531mj

Conversation

@SanHsien

Copy link
Copy Markdown
Owner

根本原因

issue #26 每天回報的 HTTP Error 404 來自 commit 軸的 compare 端點 repos/aqua5230/usage/compare/<last_reviewed>...main。

docs/UPSTREAM.md 的 last_reviewed / last_merged 記成 97338531ff59a0f0cb7217594589d89ceef8a38b,只有前 7 碼對。上游真正的 commit 是 9733853e080346d26a215c0ada43fea224f5d7e4(build(deps): bump the codeql-action group with 3 updates (#156),2026-10-01)。

證據(git 唯讀查詢,雲端 session 讀不到上游 REST API):

  • git fetch origin 97338531ff59…:fatal: remote error: upload-pack: not our ref 97338531ff59a0f0cb7217594589d89ceef8a38b
  • git rev-parse 9733853:9733853e080346d26a215c0ada43fea224f5d7e4,git merge-base --is-ancestor 9733853 origin/main 成立,落後 main 367 個 commit
  • git ls-remote:上游 main = 577e2df(2026-10-24),repo 公開、沒有改名或搬家
  • PR/issue 軸同一個 repo 都查得到(上游更新檢查:有新 commit 待審視 #26 留言列出 PR #158 起 103 筆),也說明 repo 本身沒問題

所以不是上游消失,也不需要寫 docs/DECISIONS.md。

變更

  • docs/UPSTREAM.md:sync point 改成正確的完整 SHA。
  • tools/check_upstream_updates.py:compare 回 404 時多查一次 repos/{repo},分成「repo 本身 404(改名/搬家/轉私人/刪除)」和「repo 在,但找不到 last_reviewed(打錯字或上游改寫歷史)」兩種;查不到時註明無法確認。三種情況都還是錯誤(has_updates=true),不會變成空清單。

測試(tests/test_upstream_check.py 新增)

  • test_a_missing_sync_point_is_named_not_reported_as_bare_404:compare 404、repo 正常 → 錯誤指出 last_reviewed 找不到,commits 為空但 has_updates 是 True
  • test_a_vanished_repo_is_named_not_reported_as_no_updates:全部 404 → 錯誤指出 repo 本身 404
  • test_an_unconfirmable_404_stays_an_error:探測時網路斷 → 還是錯誤,並註明無法確認
  • test_ticket_axis_404_is_not_checked_not_empty:PR/issue 軸 404 → 報告寫「Not checked」,不是「沒有新項目」

驗證(Linux,沒跑 tools/dev_check.ps1)

  • ruff check .:通過
  • mypy(變更的兩個檔):通過
  • check_doc_parity.py、check_file_size.py:通過
  • pytest tests/test_upstream_check.py tests/test_upstream_tickets.py:35 passed
  • 沒跑完整 pytest/mypy:這次只改了檢查器、它的測試和文件。
  • 在雲端跑檢查器打真實 API 得到 403(代理擋住),報告照實寫「查詢失敗/Not checked」。修正後的 compare 能不能用,要等排程跑過才知道。

合併後由排程確認,再決定是否關閉 #26。


Generated by Claude Code

docs/UPSTREAM.md 的 last_reviewed / last_merged 記成
97338531ff59a0f0cb7217594589d89ceef8a38b,只有前 7 碼與上游真正的
9733853e080346d26a215c0ada43fea224f5d7e4 相同;上游回 "not our ref",
compare 端點因此每天 404。改回正確 SHA。

檢查器在 compare 404 時多查一次 repos/{repo},區分「repo 不見了」與
「last_reviewed 在上游找不到」,兩者都維持錯誤(has_updates=true),
不會被當成空清單。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSF2LkgTrmtTqSGHjZECAP
Copilot AI balanced review requested due to automatic review settings October 24, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T11:11:30.929926Z cbe3272 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SanHsien

Copy link
Copy Markdown
Owner Author

內容已於 2026-10-24 由雲端 session 直接推進 main(見 repo-fleet-ops WORKLOG),此 PR 關閉;分支保留。

@SanHsien SanHsien closed this Oct 24, 2026
@SanHsien
SanHsien deleted the claude/determined-babbage-c531mj branch October 24, 2026 16:55
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