Skip to content

ci(release): publish nightlies every 4 hours during the day - #304

Merged
nixuuu merged 1 commit into
devfrom
ci/nightly-working-hours
Nov 6, 2026
Merged

nixuuu merged 1 commit into
devfrom
ci/nightly-working-hours

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 6, 2026

Copy link
Copy Markdown
Member

The scheduled nightly from dev now runs every 4 hours during the working day, at minute 40, instead of every hour:

  • Cron: 40 7,11,15,19 * * * (UTC).
  • In Polish winter time (UTC+1) that is 08:40, 12:40, 16:40 and 20:40. GitHub cron is always UTC, so in summer (UTC+2) the runs move to 09:40–21:40.
  • Manual dispatch still releases at any time.
  • The skip-when-nothing-to-release logic is unchanged.

docs/release.md is updated. Checked with actionlint (with shellcheck) and format:check.

Copy audit (§8): no UI text changes.

The scheduled nightly runs at 07:40, 11:40, 15:40 and 19:40 UTC, which is 08:40-20:40 Polish winter time, instead of every hour.
@nixuuu
nixuuu merged commit 26bc657 into dev Nov 6, 2026
9 checks passed
@nixuuu
nixuuu deleted the ci/nightly-working-hours branch November 6, 2026 20:48
nixuuu added a commit that referenced this pull request Nov 6, 2026
Restarting Electron previously discarded all thread, bot chat and
exchange state. This stage saves public protobuf projections in the
app's private data directory and restores them before the first watch,
so reopening sends the saved journal checkpoint.

The shared durable LRU holds 32 views / 96 MiB, at most 16 MiB per
entry. Atomic rename, 0700 directories, 0600 files, projection
validation and generation fences protect partial writes and session
changes. Mode change, unpair and revocation clear disk and memory. Plain
browser sessions deliberately remain memory-only: no conversation
content in IndexedDB or localStorage. Polish desktop documentation
records the boundary and limits.

### Restart findings and measurements

The existing mobile caches really do survive force-stop/relaunch. On an
Android Fold emulator, using the current development binary, reopening a
3,000-message thread sent a 433-byte protobuf delta and reopening a
3,000-message bot chat sent a 310-byte delta with zero messages. Cached
bot content rendered before the delta arrived. No mobile
persistence/schema-key fix was needed. An obsolete development binary
initially buffered small streaming responses; the check was repeated on
the current build.

For context, the uncached full thread response was 3,559,707 protobuf
bytes. Desktop persistence plus a real gateway restart is verified by
integration tests; native Electron shell launch-to-paint timing and an
actual packaged Electron quit/relaunch remain unverified. The client
paging stages below address uncached opens.

### Verification

- Rebased onto current `dev`, including #292, #297/#298 and #304. `bun
install`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun
run format:check` and Expo lint passed on this stage.
- Real gateway/storage recreation: durable thread and bot checkpoints
still resume as deltas after gateway restart.
- Private permissions, LRU eviction, corrupt/path traversal rejection,
and clear fencing against late writes.
- The top stage adds full-suite/temp cleanup, web production build, Expo
lint and device/browser checks.

No migrations or new native mobile dependencies. No UI copy changes in
this stage.
nixuuu added a commit that referenced this pull request Nov 6, 2026
Uncached thread, bot chat and exchange reads can now start at the tail.
Additive protobuf fields request a page and return a stable older-page
boundary, continuation flag and reset metadata; generated code is
included.

Thread pages contain complete turns, including inherited fork history,
work segments and footers. Bot/exchange pages use immutable message
sequence boundaries. Current approvals, queue, goal and header
configuration remain complete. Existing journal cursors resume deltas;
the loaded-window reducers ignore edits outside the window until that
older page is read. Older-page merges preserve newer live rows and
replay from the pre-read checkpoint so concurrent edits cannot be lost.

Online linked-computer reads pass the client's cursor/page request to
the owner-scoped home. The top stage also pages the offline mirror.
Fork/moved-history changes, missing boundaries and journal gaps reset
safely. Older clients request page size zero and receive full history;
older gateways ignore the added fields and continue returning full
snapshots. No link-version bump or migration is needed.

### Measurements

Same real gateway/Postgres fixture: 1,500 completed turns, one input and
one answer per turn, approximately 2 KiB of answer/tool-like text, 3,000
messages total. Client stage defaults are 24 turns / 50 bot messages.

| Initial thread response | Full history | Tail page |
| --- | ---: | ---: |
| Gateway protobuf bytes | 3,559,707 | 57,453 |
| Snapshot build, Android measurement | 58.8 ms | 15.1 ms |
| Web first content, warmed development code | 1,390.6 ms | 76.1 ms |
| Web SSE data bytes | 3,906,105 | 63,625 |
| Android first content | 1,771.4 ms | 518.4 ms |

These are single loopback development measurements, not a production
percentile benchmark. Web SSE JSON bytes exclude framing and differ from
mobile protobuf bytes. Cold route compilation was slower (1,541.6 ms
after); warm code is used for the web comparison. Client integration and
device evidence belong to the top stage.

### Verification

- Rebased onto current `dev`, including #292, #297/#298 and #304.
Install, generated-code consistency, typecheck, lint, formatting and
Expo lint passed on this stage.
- Real gateways: all turns/messages reached without omissions during
concurrent append, fork/inherited history, target-item reads,
reset/fallback, owner scoping, cursor after restart, bot edits,
exchanges and linked-computer reads.
- Polish protocol and folding documentation updated; no UI copy changes
here.

Whole-turn pages intentionally do not split one unusually large turn.
Target-item navigation may fetch more than one normal page to retain a
contiguous loaded window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant