refactor: remove Phase X terminology from source code comments

Remove planning document phase references from code comments:

app_test.go:
- Remove Phase 5 references from 8 test function comments

querier.go & queries.sql.go:
- Remove Phase 1, 2, 3, 4, 6 references from section headers
- Clean up week numbers (Weeks 5-6, Week 3-4, etc.)

queries.sql:
- Remove Phase 4 references from Kobo queries

kobo.go:
- Remove Phase 6 references from ContentId mapping comments

progress.go:
- Remove Phase 1 reference from route comment

media_scanner.go & media_scanner_library_type_test.go:
- Remove Phase 2 references from library type scanning comments

schema.sql:
- Remove Phase 1, 2, 3, 4, 5, 7 references from table/section comments
- Clean up: Format Detection, Progress Tracking, Device Registry,
  Sync Queue, Conflict Resolution, Reading History, Indexes, etc.

test_helpers.go:
- Remove Phase 6 reference from handler setup comment

These phase numbers were from internal planning documents and have no
meaning in the codebase. Removing them makes the code self-documenting.
This commit is contained in:
2026-02-13 21:50:29 -05:00
parent 80dcdfdd71
commit 2706ae52c1
9 changed files with 96 additions and 96 deletions
+12 -12
View File
@@ -48,7 +48,7 @@ func (m *mockHandler) reset() {
m.stopSchedulerCalled = false
}
// TestApp_New tests Phase 5: App constructor
// TestApp_New tests App constructor
func TestApp_New(t *testing.T) {
e := echo.New()
handler := &mockHandler{}
@@ -62,7 +62,7 @@ func TestApp_New(t *testing.T) {
assert.NotNil(t, app.shutdownDone, "Shutdown done channel should be initialized")
}
// TestApp_SetShutdownTimeout tests Phase 5: configurable shutdown timeout
// TestApp_SetShutdownTimeout tests configurable shutdown timeout
func TestApp_SetShutdownTimeout(t *testing.T) {
e := echo.New()
handler := &mockHandler{}
@@ -74,7 +74,7 @@ func TestApp_SetShutdownTimeout(t *testing.T) {
assert.Equal(t, customTimeout, app.shutdownTimeout, "Shutdown timeout should be updated")
}
// TestApp_ShutdownDone tests Phase 5: shutdown done channel
// TestApp_ShutdownDone tests shutdown done channel
func TestApp_ShutdownDone(t *testing.T) {
e := echo.New()
handler := &mockHandler{}
@@ -92,7 +92,7 @@ func TestApp_ShutdownDone(t *testing.T) {
}
}
// TestApp_Start_BackgroundServices tests Phase 1 & 5: background service startup
// TestApp_Start_BackgroundServices tests background service startup
func TestApp_Start_BackgroundServices(t *testing.T) {
e := echo.New()
handler := &mockHandler{
@@ -135,7 +135,7 @@ func TestApp_Start_BackgroundServices(t *testing.T) {
<-done2
}
// TestApp_Shutdown_GracefulShutdown tests Phase 5: graceful shutdown sequence
// TestApp_Shutdown_GracefulShutdown tests graceful shutdown sequence
func TestApp_Shutdown_GracefulShutdown(t *testing.T) {
e := echo.New()
handler := &mockHandler{
@@ -150,7 +150,7 @@ func TestApp_Shutdown_GracefulShutdown(t *testing.T) {
assert.True(t, handler.stopSchedulerCalled, "StopScheduler should be called")
}
// TestApp_Shutdown_ThreadSafety tests Phase 5: thread-safe shutdown
// TestApp_Shutdown_ThreadSafety tests thread-safe shutdown
func TestApp_Shutdown_ThreadSafety(t *testing.T) {
e := echo.New()
handler := &mockHandler{}
@@ -175,7 +175,7 @@ func TestApp_Shutdown_ThreadSafety(t *testing.T) {
assert.True(t, handler.stopSchedulerCalled, "StopScheduler should be called at least once")
}
// TestApp_Shutdown_Timeout tests Phase 5: shutdown timeout handling
// TestApp_Shutdown_Timeout tests shutdown timeout handling
func TestApp_Shutdown_Timeout(t *testing.T) {
e := echo.New()
handler := &mockHandler{
@@ -191,7 +191,7 @@ func TestApp_Shutdown_Timeout(t *testing.T) {
assert.True(t, handler.stopSchedulerCalled, "StopScheduler should still be called")
}
// TestApp_Shutdown_ClosesEchoServer tests Phase 5: HTTP server shutdown
// TestApp_Shutdown_ClosesEchoServer tests HTTP server shutdown
func TestApp_Shutdown_ClosesEchoServer(t *testing.T) {
e := echo.New()
handler := &mockHandler{}
@@ -213,7 +213,7 @@ func TestApp_Shutdown_ClosesEchoServer(t *testing.T) {
assert.True(t, handler.stopSchedulerCalled, "StopScheduler should be called")
}
// TestApp_SignalHandling tests Phase 5: signal handling (SIGINT, SIGTERM, SIGQUIT)
// TestApp_SignalHandling tests signal handling (SIGINT, SIGTERM, SIGQUIT)
func TestApp_SignalHandling(t *testing.T) {
tests := []struct {
name string
@@ -259,7 +259,7 @@ func TestApp_SignalHandling(t *testing.T) {
}
}
// TestApp_Integration_StartupSequence tests Phase 1 & 5: complete startup sequence
// TestApp_Integration_StartupSequence tests complete startup sequence
func TestApp_Integration_StartupSequence(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
@@ -320,8 +320,8 @@ func TestApp_HandlerInterface(t *testing.T) {
var _ Handler = &mockHandler{}
}
// TestPhase1_AutoStartVerification tests Phase 1: auto-start functionality
func TestPhase1_AutoStartVerification(t *testing.T) {
// TestApp_AutoStartVerification tests auto-start functionality
func TestApp_AutoStartVerification(t *testing.T) {
t.Run("Auto-start runs asynchronously", func(t *testing.T) {
e := echo.New()
handler := &mockHandler{