Stopped writing code? We noticed.
Scry is a read-first, integrated review environment.
Test builds and Scry news only. Unsubscribe anytime. Privacy
Your IDE is designed for old habits.
It was designed for editing: crawling through lines of text, changing characters one keystroke at a time. Reading was always an afterthought. After all, monospaced text is legible, isn’t it?
TerminalProblemsDebug
In this file
- TRetryPolicy
- CDEFAULT_POLICY
- fbackoffDelay
- fretry
- fjitter
Used by 3
- retry()this file
- drain()scheduler/queue.ts
- reconnect()http/client.ts
Uses 1
- jitter()this file
fbackoffDelay
How long to wait before attempt n. Delays double from baseMs and stop growing at maxMs, so a long outage
never turns into hour-long sleeps.
Delay per attemptcapped at maxMs
48export function backoffDelay(49 attempt: number,50 policy: RetryPolicy = DEFAULT_POLICY51): number {52 const raw = policy.baseMs * 2 ** attempt;− return jitter(raw);+ const capped = Math.min(raw, policy.maxMs);+ return jitter(capped);55}
fretry
Runs task until it succeeds or the policy gives up. Only errors the policy calls retryable are tried again.
62export async function retry<T>(63 task: () => Promise<T>,64 policy: RetryPolicy = DEFAULT_POLICY65): Promise<T> {66 for (let n = 0; ; n++) {67 try {68 return await task();69 } catch (error) {70 if (n === policy.attempts) throw error;71 if (!policy.retryable(error)) throw error;72 await sleep(backoffDelay(n, policy));73 }74 }75}
fjitter
Spreads retries out: each delay moves by up to a fifth either way, so clients that failed together don’t come back together.
78function jitter(ms: number): number {79 const spread = ms * 0.2;80 return ms - spread + Math.random() * spread * 2;81}
Change 3 weeks ago
Cap the delay at maxMs
Stalled workers were sleeping for hours after a long outage. The delay now stops growing at the policy’s ceiling.
#418 Cap backoff at the policy ceiling
#412 Workers sleep for hours after an outage
+2 −1 scheduler/retry.ts
Contributors 9 changes
IOTRPN 3 people and agent runs
History
- 3 weeks ago Cap the delay at maxMs Agent run
- 4 months ago Double the delay each attempt Tomás Reyes
- Last year Move backoff out of the queue Imani Okoro
Review the change.
Commits and diffs are reading too. Open any change in a Git or jj stack as a page, with the reasoning written above the diff.
Stack 4 changes
maintrunk
kpqxywon 3f2a91c +3 −1
Stamp entries when they are read
rlvmtzsu 8d04e7b +3 −2
Evict the coldest entry, not the oldest
ymnoqkxw b61c5fa +2 −1
Budget by bytes instead of entries
wsvzplrt e97a30d +2 −1
Pin the eviction order in a test
Change 1 of 4 kpqx · 3f2a91c
Stamp entries when they are read
Eviction needs to know what is still in use. Every read now stamps the entry with the time, so the next change can tell warm entries from cold ones.
cache/store.ts+3 −1
Change 2 of 4 rlvm · 8d04e7b
Evict the coldest entry, not the oldest
The cache dropped whatever went in first, even if it was read a moment ago. It now drops the entry that has gone longest without a read.
cache/store.ts+3 −2
Change 3 of 4 ymno · b61c5fa
Budget by bytes instead of entries
A thousand thumbnails and a thousand video segments are not the same load. maxBytes replaces the entry count, and eviction runs until the cache fits.
cache/store.ts+2 −1
Change 4 of 4 wsvz · e97a30d
Pin the eviction order in a test
The old test passed only because insertion order and read order matched. Reading a first makes the two disagree, so the test says which one wins.
cache/store.test.ts+2 −1
Annotate while your agent works.
Mark up any line the way you would in a pull request. Scry plugs in as an MCP server, so the agent picks up your notes in real time and revises as it goes.
Written by the agent revision 1 revision 2
Notes 1
Select lines to leave a note for the agent.
Your note upload.ts:14-16
This reads the whole file into memory. Stream it, and reject anything over MAX_BYTES.
Draft Sent to the agent Addressed in revision 2
Agent still running
editupload.ts→ revision 1 scry.annotationupload.ts:14-16→ delivered
Writing upload.test.ts… Revising upload.ts… editupload.ts+2−3→ revision 2
Read between the commits.
Trace a line back to the agent conversation that wrote it, then replay the edits in between. It needs operation-level history to work, like Zed’s DeltaDB.
Between two commits agentyou
commit3c8d5f1 60 operations commite7b03f5
Conversation 52 min ago
youList events a page at a time.
agentWriting listEvents with offset paging.
op 0152line 18 added
By hand 38 min ago
youTyped directly, with no conversation behind it: fetch one row more than a page, to see if another follows.
op 0170line 20 added
Conversation 31 min ago
youPages past the first return duplicates. Use the last id as the cursor.
agentReplaced the offset with a cursor on id.
op 0184line 18 rewritten
Conversation 24 min ago
youTell the caller whether there is another page.
agentReturns a Page: the rows, and a more flag.
op 0200line 21 rewritten
From file tree to table of contents.
Browse the codebase instead of managing files. A component, its test, its stories and its styles share one page, and following a name shows you what calls it.
dispatch(req): Promise<Response>
Where every request starts: match a route, check access, then run it.
called by 1 · calls 2 http/server.ts
Code that reads like a wiki.
Headings get bigger type, names go bold, and a diagram can sit right next to the function it explains.
12/**13 * # Link lifecycle14 *15 * A link is in **exactly one** state.16 * Only `open` may send frames.17 *18 * ## Transitions19 *20 * - `connect()` dials, then **opens**21 * - `close()` drains, then goes idle22 * - a failed dial **backs off** and retries23 *24 * 25 *26 * | State | Sends | Timer |27 * | ---------- | ----- | --------- |28 * | idle | no | none |29 * | connecting | no | dial |30 * | open | yes | heartbeat |31 * | closing | no | drain |32 */33export type LinkState =34 | 'idle' | 'connecting'35 | 'open' | 'closing';3637export function canSend(s: LinkState) {38 return s === 'open';39}
Link lifecycle
A link is in exactly one state. Only open may send
frames.
Transitions
connect()dials, then opensclose()drains, then goes idle- a failed dial backs off and retries
Fig. 1 · Link stateslink-states.svg
StateSendsTimer
idlenonone
connectingnodial
openyesheartbeat
closingnodrain
33export type LinkState =34 | 'idle' | 'connecting'35 | 'open' | 'closing';3637export function canSend(s: LinkState) {38 return s === 'open';39}
Docs, tickets, threads and meeting notes, beside the code.
Keep your context with your code. The spec you’re building from, the ticket in progress, the chat that’s still going, this morning’s notes, all open beside the lines they’re about.
Confluence Meeting notes Jira Ticket Slack Thread
Billing / Meeting notes
Billing sync
PNIOTR 3 attended
Decisions
1 Time zone prorate.ts:42
Count days in the customer’s own time zone, not UTC.
2 Whole days prorate.ts:43
Credit whole days left in the period. The day of the change is not refunded.
Open questions
Do annual plans need a different cap? Tomás to ask in #billing.
Billing / BILL-482
Credit a cent too high after downgrade
In progress High proration IOImani Okoro
Rounding to the nearest cent credits more than the unused share.
3 Acceptance prorate.ts:46
Credits round down to the smallest unit of the currency, never up.
PR #519 open · review requested
Thread · 3 replies · latest 2m ago
#billing
4 Priya Nair 10:47 prorate.ts:47
No. Never refund more than they paid, even on annual plans.
Tomás is typing…
prorate.ts billing · main
fprorate
The credit owed when a subscription changes partway through a period.
38export function prorate(39 sub: Subscription,40 at: Instant41): Money {421 const day = at.inZone(sub.account.zone);432 const left = daysLeft(sub.period, day);44 const share = left / sub.period.days;45 const owed = sub.price * share;463 const credit = Math.floor(owed);474 return Math.min(credit, sub.paid);48}
1 Line 42 § Time zone Billing sync, today · Confluence
2 Line 43 § Whole days Billing sync, today · Confluence
3 Line 46 BILL-482 Acceptance criterion · Jira
4 Line 47 Priya Nair, 10:47 #billing · Slack
Read first. Edit when you must.
A quick fix is a key away. Everything else about the screen is built for reading; debugging and the terminal stay in your editor.
Questions
An integrated review environment is a read-first tool for software and technical documents. You use it to read changes, find your way around and trace where each line came from. Small edits are a key away; debugging and terminal work stay in your editor.
Not yet. Scry is in development. The pictures on this page are design renderings, not screenshots. Join the waitlist for early access to test builds.
A reader for the code you won’t write.
Join the waitlist for early access to test builds.
Test builds and Scry news only. Unsubscribe anytime. Privacy