A server can be marked as the household's own: no quiet first week there
release-gate / verify (push) Successful in 15m23s
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 3m56s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 3m52s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 15:01:39 +00:00
co-authored by Claude Opus 5.5
parent b6f133f452
commit 7382d9ee63
3 changed files with 21 additions and 0 deletions
@@ -41,6 +41,7 @@ internal class ServerWorkspace(val origin: String, val root: File, val artworkDi
* aren't read at all. The clock starts the first time this box uses the server.
*/
fun quietStart(nowMs: Long = System.currentTimeMillis()): Boolean {
if (ownServer) return false
val stamp = File(root, "first-used")
val first = runCatching { stamp.readText().trim().toLong() }.getOrNull() ?: nowMs.also { runCatching { root.mkdirs(); stamp.writeText(it.toString()) } }
return nowMs - first < QUIET_START_MS
@@ -48,6 +49,14 @@ internal class ServerWorkspace(val origin: String, val root: File, val artworkDi
}
internal const val QUIET_START_MS = 7 * 24 * 60 * 60_000L
/**
* A server that's the household's own (12 November 2026, Paul's VPS): no quiet first week, since the only thing to protect is
* the server itself, and the back-off and the hourly ceiling already watch that. Set per server, so a shared server keeps it.
*/
internal var ServerWorkspace.ownServer: Boolean
get() = File(root, "own-server").exists()
set(value) { val f = File(root, "own-server"); if (value) runCatching { root.mkdirs(); f.writeText("1") } else f.delete() }
internal const val QUIET_START_BUDGET = 100
internal object Workspaces {