GeezerVison is showing github.com — pm-console edge: what else the object keeps only in memory · Issue #14001 · developing-today/code
pm-console edge: what else the object keeps only in memory #14001DescriptionWhat
The Worker's Durable Object is put away whenever it is idle (about ten seconds, by Cloudflare's lifecycle; 11 to 14 in the local runtime) and another starts with nothing in memory. #13570 was built as if that were rare, and in service it saved nothing; #14000 moves what it kept into storage and has the real-runtime check put the object away.
Going through the object's other fields for the same assumption found these. Each is in memory only, and each is written as if the object lasted. None of them is a wrong answer shown to anyone; they are things asked for more often than meant, numbers that mean less than they look, or a wait with no end.
| # |
What |
Where |
In service |
| 1 |
The ten-minute gate on asking GitHub for the released Android build (released) |
edge/src/edge.ts, androidRelease |
Every object that starts asks again on its first health read or Android page: a request to github.com each time, and up to eight seconds of deadline. The comment says "GitHub is not asked on every request". |
| 2 |
The queue store is asked with no deadline |
src/ops.ts, pipeline |
A queue store that never answers holds the read, and the object in memory, for as long as the platform lets it. Every other outgoing request has a deadline. |
| 3 |
Health's answered and deferred (sure, unsure) |
edge/src/edge.ts |
Counted since the object answering started, which is seconds ago: the numbers look like totals and are not. (github.answers was the same until #14000.) |
| 4 |
"Someone is looking" (lastDocAt, 90 s) |
edge/src/edge.ts |
The laptop is told to refresh faster while the app is open. An object that starts for the laptop's report has seen no document read, so it says nobody is looking unless a read came within the last few seconds. To be checked against how often the app reads: if it reads more often than the object is put away, this holds. |
| 5 |
The gate on asking the host for its key (lastKeyFetch, 30 s) |
edge/src/edge.ts |
Reset with each object, so the gate is as long as an object lasts. |
| 6 |
The limiters on refused reports and on phone linking (syncRefused, phones.link, phones.refused) |
edge/src/edge.ts |
Reset with each object. A flood keeps the object in memory, so they hold while it lasts; said here so that it is a decision and not an accident. |
| 7 |
A section kept in pieces (putMirror) |
edge/src/edge.ts |
The pieces are not marked as one section's. A write stopped between pieces and the index is caught only because the mixture does not parse. #14000's memory marks each piece; the same would close this. |
| 8 |
The key sets' cache (jwksCache) |
src/auth.ts |
Module memory: each start asks the issuer again. Public keys, one request; noted for completeness. |
Also measured while doing #14000, in the edge's tests: one hour of the object's own clock with nothing changing writes to storage 74 times. 60 are the count of GitHub's answers (one write an answer) and 12 are sections stored again though nothing changed. If the plan's daily allowance of writes ever matters, those are the two to thin.
Done when
- 1 and 2 are fixed (the gate stored with what it gates; the queue store call under
timed), each with a test that starts a new object or lets the deadline run out.
- 3 is either counted across objects or named for what it is.
- 4 is measured on the live Worker (how often
woke changes while the app is open) and fixed if the laptop is being told nobody is looking.
- 5 to 8 are each decided: stored, or left with a line saying why memory is enough.
- How long an object lasts in service is read from
woke on the live Worker and written into edge/README.md beside the local runtime's figure.
Why now
The same assumption cost a day of believing a saving that was not there. The rule that came out of it is in edge/README.md ("The object is put away whenever it is idle"); this is the rest of the object held to it.
Generated by Claude Code Activitydeveloping-today commented on Nov 24, 2026 dezren39 commented on Nov 24, 2026 One more for the list, from the first minutes after #14000 deployed: over three minutes the live Worker asked GitHub nothing. Either no device takes notifications, or the object's own clock (which reads the prompts each minute while one does) is not running. Health does not say which. It should say whether the clock is wanted and when it last read, so that the path notifications depend on can be seen from outside.
Generated by Claude Code dezren39 commented on Nov 24, 2026 Done in #14022 (merged 02:42Z, in service as fc438864af51):
- 1 the released build's gate is stored, and read back once by each object.
- 2 the queue store has twenty seconds to answer, body and all.
- 3 is named for what it is: health says when the object answering started (
woke), which is what answered and deferred are counted from.
- The clock (added above): health has
clock.wanted and clock.next.
- One more of the same kind, found doing these: a time read back from storage further off than could have been set was cut down to the longest allowed counted from now, by every object from its own now, so it never came. That was in three places (GitHub's wait and the release's time from fix(pm-console): keep GitHub's answers in the object's storage; its memory did not last between reads #14000, and what the edge reads back of being turned away, since step 3). None of them believes such a time now, and each is tested with a new object for every look.
Read from the live Worker:
- How long an object lasts in service: over three minutes of health reads twenty seconds apart, eight of nine were answered by an object that had started since the read before. So under twenty seconds idle, as the local runtime (11 to 14) suggested.
clock.wanted is false: no device takes notifications from the edge at the moment, so its own clock is not running and nothing would be pushed. The object's next wake (02:55Z when read) is the check for a machine gone quiet.
Left: 4 (whether the laptop is told nobody is looking), 5, 6, 7, 8, and the two writers to thin (the count of GitHub's answers, and sections stored again unchanged).
Generated by Claude Code added a commit that references this issue on Nov 24, 2026This issue will close once commit d716716 is merged into the 'main' branch.d716716 dezren39 commented on Nov 24, 2026 Done in #14045 (merged 03:23:48Z):
- 4
lastDocAt stored (docAt, write-through + lazy read-back): new object still says watching; tested across restart.
- 5
lastKeyFetch stored (keyFetch, write-through + pre-gate load): gate holds across objects; tested across restart.
- 6 limiters stay in memory by decision (comments on
syncRefused, phones): a flood keeps the object alive, which is when they matter.
- 7 sections in pieces marked
{n,h,t}, index last: interrupted/foreign pieces never read; unchanged sections skip rewrite (thins steady-state writes).
- 8
jwksCache stays module memory by decision (comment): one fetch per object lifetime, 10min TTL while it lasts.
- README: live lifetime <20s idle (8/9 reads new object, 20s apart) beside local 11-14s. Unauthenticated curl 302s at Cloudflare, so no new public read; fix(pm-console): the release's gate kept in storage, a deadline for the queue store, and the clock said in health #14022 authenticated measurement stands.
Left/accepted: GitHub answers count still writes once per answer (~60/hr); not thinned here — follow-up if write allowance matters.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|