docs: api comments say what the endpoints do, not how they came to be (#6277)
Rewrites the internal/api comment blocks to rule 32: task, milestone and rule ids gone, the stories behind them restated as the constraint they left, stale references corrected (the stream secret is wired from config, the timezone handler already refreshes the scheduler, the Android app is the native client, the design docs cited are not in the repo). Also rewraps comment lines over 80 columns left by the earlier batches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package api
|
||||
|
||||
// In-app update endpoints (#397). The Android APK ships bundled with
|
||||
// In-app update endpoints. The Android APK ships bundled with
|
||||
// the server image so the client can self-update without an external
|
||||
// app store. CI sequencing bakes the APK + sidecar version file into
|
||||
// /app/client/ at image build time.
|
||||
@@ -13,11 +13,8 @@ package api
|
||||
// download every 60s. Real install flows fire one download per
|
||||
// update; anything tighter is scripted/abusive.
|
||||
//
|
||||
// Returns 404 gracefully when the APK isn't present (dev environments,
|
||||
// pre-CI-wiring); the client treats 404 as "no update channel available."
|
||||
//
|
||||
// (These paragraphs said "the Flutter client" until 2026-09-10. That client
|
||||
// was deleted in v2026.08.18 — the Android app is the only one now.)
|
||||
// Returns 404 gracefully when the APK isn't present (a local build); the
|
||||
// client treats 404 as "no update channel available."
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -96,10 +93,10 @@ func clientAPKAllowDownload(userID string, now time.Time) time.Duration {
|
||||
// installed over that?" — the name never does.
|
||||
// - Channel is a SIBLING FIELD, never a suffix inside the name.
|
||||
//
|
||||
// JSON rather than a positional line on purpose. The obvious growth path for
|
||||
// the old one-value file was "<name> <code>", which a first-space split
|
||||
// silently mangles the moment a third field appears: the code stops parsing,
|
||||
// and the reader falls back to name comparison WITHOUT erroring.
|
||||
// JSON rather than a positional line on purpose: a "<name> <code>" line split
|
||||
// on the first space silently mangles the moment a third field appears — the
|
||||
// code stops parsing, and the reader falls back to name comparison WITHOUT
|
||||
// erroring.
|
||||
type clientVersionSidecar struct {
|
||||
Name string `json:"name"`
|
||||
// Pointer, not int64: absent must stay distinguishable from zero. An
|
||||
|
||||
Reference in New Issue
Block a user