orchestration: sprite task lease + durable wave-completion record
The wave-3 loss was caused by sprite auto-suspend, not nohup process-group semantics. /.sprite/llm.txt: 'When idle, sprites pause automatically. Services and sessions keep sprites alive.' Detached processes are on neither list, so setsid is necessary but not sufficient. tasks/wave-guard.sh holds a /v1/tasks lease (max 3600s, renewal is DELETE+POST since re-POST returns 409), renews every 15 min while workers run, writes logs/WAVE<N>-DONE, then releases the lease so the sprite can suspend rather than idle hot. Also documents hazard #6 (pgrep -f / pkill -f matching the orchestrator's own shell) and adds the wave-3 worker prompts and shared screen contract. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
## SHARED SCREEN CONTRACT — fixed by the orchestrator, IDENTICAL in both wave-3
|
||||
## prompts. Do NOT change these signatures. E1 writes BookshelfNavHost against them;
|
||||
## E2 writes the screens to match. If you deviate, the other worker's code stops
|
||||
## compiling and the wave fails.
|
||||
|
||||
Routes (string constants live in ui/nav/Routes.kt, owned by E1):
|
||||
"setup" | "library" | "library?shelfId={shelfId}" | "detail/{bookId}" |
|
||||
"scan" | "locations" | "settings"
|
||||
|
||||
Screen composable signatures:
|
||||
|
||||
// E2 owns
|
||||
@Composable fun LibraryScreen(
|
||||
shelfIdFilter: String?,
|
||||
onBookClick: (String) -> Unit,
|
||||
onScanClick: () -> Unit,
|
||||
onLocationsClick: () -> Unit,
|
||||
onSettingsClick: () -> Unit,
|
||||
container: AppContainer,
|
||||
)
|
||||
@Composable fun DetailScreen(
|
||||
bookId: String,
|
||||
onBack: () -> Unit,
|
||||
container: AppContainer,
|
||||
)
|
||||
@Composable fun ScanScreen(
|
||||
onBack: () -> Unit,
|
||||
container: AppContainer,
|
||||
)
|
||||
|
||||
// E1 owns
|
||||
@Composable fun SetupScreen(onSetupComplete: () -> Unit, container: AppContainer)
|
||||
@Composable fun LocationsScreen(
|
||||
onBack: () -> Unit,
|
||||
onShelfClick: (String) -> Unit, // navigates to library?shelfId=...
|
||||
container: AppContainer,
|
||||
)
|
||||
@Composable fun SettingsScreen(
|
||||
onBack: () -> Unit,
|
||||
onSignedOut: () -> Unit, // navigates back to "setup"
|
||||
container: AppContainer,
|
||||
)
|
||||
|
||||
All screens take `container: AppContainer` and construct their own ViewModel from it
|
||||
(manual DI per SPEC — NO Hilt). Package = ui.<screen>, e.g. ui.library.LibraryScreen.
|
||||
Reference in New Issue
Block a user