Tell macOS binary users when a newer release is available
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
A candidate who runs the prebuilt macOS binary from the latest release has no way to learn that a newer build exists. Every successful build of main replaces latest (docs/install.md), several times a day at the current pace, but the running binary never says so. The only way to find out is to open the releases page by hand and compare the commit ./codetrial --version prints with the one the release names, since the package version stays 0.1.0 across builds. In practice that check is skipped, so candidates keep practicing on builds that already have fixes they are missing, and a bug report from such a build describes behavior main no longer has.
docs/desktop.md already lists automatic updates as something the desktop app does not do. This asks for something smaller than updating: telling the candidate that an update exists.
Proposed behavior
The lobby checks whether the latest release names a different commit than the running binary, at three moments:
- When the binary starts and the lobby first loads.
- When the candidate ends an interview and returns to the lobby.
- Every hour on the hour while the lobby stays open and no interview is running.
When a newer build exists, the lobby shows a dialog that names the running commit and the release's commit and links to the release page (or the macOS asset). No check runs and no dialog appears during an interview.
Scope
The CLI binary for macOS (codetrial-aarch64-apple-darwin.zip from latest) only, because macOS is the only platform I can test on. The check itself does not depend on the platform, so Linux, Windows and the desktop app's desktop-latest can follow once someone who can test them picks them up. Downloading or replacing the binary is out of scope: the candidate still replaces the executable by hand, keeping config/, as docs/install.md describes.
Acceptance criteria
- A macOS release binary older than
latestshows the dialog at each of the three moments above, with a working link. - A binary that matches
latestshows nothing. - A failed check (no network, a GitHub error, the short window in which
latestresolves to nothing while it is republished) shows nothing and does not affect the lobby or an interview. - Nothing is checked or shown while an interview is running.
Implementation notes
The running commit is already known: build.rs embeds the first seven characters of GITHUB_SHA as CODETRIAL_BUILD_COMMIT, and the release job creates latest with --target "$GITHUB_SHA", so the two can be compared directly. Moments 1 and 2 are one code path: leaving an interview navigates to /, so the lobby loads afresh either way.
Two ways to make the check, compared:
- The server asks GitHub (
GET /repos/sysprog21/codetrial/releases/tags/latest) and caches the answer, and the lobby asks the server through a new endpoint. The page'sconnect-srcstays as it is, and one GitHub request per hour serves every open tab, well inside the unauthenticated limit of 60 requests an hour. - The lobby asks GitHub directly. This needs
https://api.github.comadded toconnect-srcin src/web/policy.rs, and every open tab makes its own requests.
The first keeps the page's policy unchanged, so I would start there.
Questions
- Should the check be on by default, or opt-in, given that it sends a request to GitHub that the binary does not make today?
- A build from source has a commit too, but usually not one
latestwill ever name. Should the check run only in release builds, for example only whenGITHUB_SHAwas set at build time? - After the candidate dismisses the dialog, should it stay hidden until the next release, or appear again at the next check?
Related
#153 (merged) made a binary report the commit it was built from, which is what this compares. #14 (merged) introduced the single rolling latest release this reads. #494 (merged) publishes desktop-latest for the desktop app. I found no existing issue or PR about update notifications.
- Ngôn ngữ chính
- Rust
- Star
- 215
- Fork
- 141
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 232
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/codetrial
-
Audio output can be confirmed without playing a test soundCó thể đã có người làm @ChenYingHan1121 đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
sysprog21/codetrial#359 · 9 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Reset or Show pressed while the task cube is turning does not stickCó thể đã có người làm @YEH-YU-YANG đã nhận 1 ngày trước. Đang mở
sysprog21/codetrial#558 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Treat low-evidence candidate speech as unassessedCó thể đã có người làm @Danielncku đã nhận 1 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
sysprog21/codetrial#553 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Web lobby cannot reopen Setup after configurationCó thể đã có người làm @YEH-YU-YANG đã nhận 4 ngày trước. Đang mở
sysprog21/codetrial#525 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Offer a way back to Setup from the lobbyCó thể đã có người làm @Patriciaath999 đã nhận 4 ngày trước. Đang mở
sysprog21/codetrial#513 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sysprog21/codetrial
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
yunfie-twitter/Palleria#474 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
servo/rust-smallvec#827 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày