Contract at server dev 3e6f6da: notifications, monitor mode, pinning, parity routes, queued
CI / check (push) Canceled after 0s

Re-pinned contract/ and the strings at the server's dev 3e6f6da (after f7f2ff2 parity routes,
96240be pinning, 00c209a monitor mode, fd0a386 scheduled-result notifications, a8a3733
progress gaps).

- Message.progress: a queued prompt draws the server's queued line ("2 ahead · 12s").
  loading_model and reading_prompt's tokens were already drawn (Progress.kt).
- Schedule.watch / ScheduleRun.watch: a watching schedule names its address on its page;
  `unchanged` runs are drawn quiet, as Unchanged.
- ScheduleRun.notification parsed (title, body, public, actions, labels) for the push work.
- The schedules frame's version hash moved (ScheduleContractTest).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Opus 5.5 committed 2026-11-10 13:41:47 +00:00
1 parent bd6c8df192
commit ad5c6ca12b
36 files changed
+571 -15

No files matched your search

@@ -130,6 +130,13 @@ class ContractTest {
val user = read("message_user", Message.serializer())
assertTrue(user.isUser)
assertEquals("How is lembas made?", user.text)
assertNull(user.progress)
// A prompt waiting behind a running reply says so, and how many are ahead of it.
val queued = read("message_queued", Message.serializer())
assertTrue(queued.queued)
assertEquals("queued", queued.progress!!.phase)
assertEquals(2, queued.progress!!.ahead)
val reply = read("message_assistant", Message.serializer())
assertEquals(listOf("thinking", "text", "tools", "steer", "text"), reply.steps.map { it.kind })
@@ -13,7 +13,9 @@ import eu.llembas.android.api.ScheduleRuns
import eu.llembas.android.api.SchedulesFrame
import eu.llembas.android.api.SchedulingModels
import eu.llembas.android.push.ScheduledNotice
import eu.llembas.android.ui.scheduled.ScheduleLogic
import eu.llembas.android.ui.scheduled.SchedulingLogic
import eu.llembas.android.ui.scheduled.Tone
import kotlinx.serialization.KSerializer
import kotlinx.serialization.json.int
import kotlinx.serialization.json.jsonArray
@@ -84,10 +86,26 @@ class ScheduleContractTest {
assertWaybread(read("schedules", ScheduleList.serializer()).schedules.single())
assertWaybread(read("schedule", ScheduleEnvelope.serializer()).schedule)
val frame = read("event_schedules", SchedulesFrame.serializer())
assertEquals("6852d52c0c9575b0", frame.version)
assertEquals("d2f307bf1c7b8d6b", frame.version)
assertWaybread(frame.schedules.single())
}
@Test
fun aWatchingScheduleAndItsUnchangedRun() {
// Monitor mode (`schedule_watching.json`): the address it looks at, and a run that found
// nothing changed -- no model, no notification.
val watching = read("schedule_watching", ScheduleEnvelope.serializer()).schedule
assertEquals("url", watching.watch!!.kind)
assertEquals("https://shop.example/mallorn", watching.watch!!.target)
val run = watching.lastRun!!
assertEquals("unchanged", run.status)
assertFalse(run.watch!!.changed)
assertNull(run.notification)
assertEquals(Tone.Quiet, ScheduleLogic.tone(run.status))
// A schedule that watches nothing says null.
assertNull(read("schedule", ScheduleEnvelope.serializer()).schedule.watch)
}
@Test
fun theRunsAWaitingOneAndOneInFull() {
val page = read("schedule_runs", ScheduleRuns.serializer())