Skip to content

Upstream merge blocked: upstream keep-awake overlaps the fork's keep-awake feature #78

Closed

Description

@niranjan94

An attempted merge of upstream/main (428 commits, merge-base 338e73859a, fork main at a8d646330f) was aborted before resolving conflicts, because upstream now ships its own keep-awake feature that overlaps the fork's, and choosing between them is a product decision.

The overlap

Fork (#17, 85d06ae7e9):

  • Setting keepAwakeMode: "off" | "agent" | "always", default "off".
  • Live status RPC server.subscribeKeepAwakeStatus (ServerKeepAwakeStatus), shown in web KeepAwakeSettings.tsx and the mobile Server Controls footer (useKeepAwakeFooter.ts).
  • apps/server/src/background/KeepAwake.ts (caffeinate, systemd-inhibit, PowerShell), with a restart-once failure policy.

Upstream (pingdotgg/t3code#34128, 587deab7d3):

  • Setting keepAwakeWhileAgentsWork: boolean, default true.
  • Its own apps/server/src/background/KeepAwake.ts (same three platform helpers, 60 s release grace, exponential retry backoff, holdWhileWanted stream helper) registered in server.ts.
  • A toggle in the Maintenance settings panel, a keep-awake-while-agents-work settings search entry, and a mobile Server Controls row.

Why it was not resolved mechanically

Git merges packages/contracts/src/settings.ts, settingsSearch.ts and SettingsPanels.tsx cleanly, so a naive merge ships both settings and both UIs. KeepAwake.ts, KeepAwake.test.ts and server.ts conflict. If both layers survive, upstream's default-on toggle holds a sleep inhibitor on every Kinako install, including ones whose keepAwakeMode is "off".

Decision needed

  1. Keep the fork's implementation and drop upstream's (setting, layer, Maintenance toggle, search entry, mobile row). Every future upstream edit to KeepAwake.ts conflicts.
  2. Adopt upstream's implementation and drop the fork's, possibly migrating keepAwakeMode ("agent" maps to true, "off" to false; "always" has no upstream equivalent) and porting the live status RPC on top.
  3. Hybrid: upstream's KeepAwake.ts as the base, extended with the fork's "always" mode and status RPC, with one setting.

Also decide the default: the fork chose off, upstream chose on.

Other notes from the scan (no action needed yet)

  • 70 conflicted files (59 after the classifier and lockfile), no new upstream workflows to disable.
  • Upstream migration 087_ProjectionProjectsCustomTitle.ts touches projection_projects, which a fork migration alters; the fork schema test needs to confirm it.
  • Unauthenticated surface changes upstream in server.ts, ws.ts, McpHttpServer.ts, ServerEnvironment.ts and environmentHttp.ts; these get the usual step 6 audit on the next attempt.

Once the keep-awake direction is decided, rerun the merge-upstream skill.

Activity

  1. added a commit that references this issue on Nov 13, 2026
    9d8bd87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions