Files
puter/extensions
Daniel Salazar 8969c8b3b4 refactor(backend): layer pass for duplicated logic, dead code and round trips, with the bugs it turned up (#4754)
* refactor(util): shared helpers for hosts, timeouts, chunking, paging, shutdown flush and codes

Adds normalizeHost/getPuterHostedDomains, withTimeout, chunk, nowSeconds,
isMissingTable, clampLimit/parsePageQuery/pageEnvelope, finalFlush,
parseRetryAfterMs/doublingBackoffMs, randomCode, sweepInBatches,
hashPassword/generateEmailConfirmCode, requestIp and isTemporaryAccount, and
removes util exports nothing called.

* refactor(clients,core): drop unread alarm state and dead shutdown paths, share host helpers

DynamoDB batches still throttled after the retries answer 503 db_unavailable.

* refactor(stores): one cache read per miss, tombstones on every write, batch methods for callers above

The multi-check permission cache is read with pipelined GETs. claimOwnership,
replaceDataUrlIcon and setLabel tombstone their keys. updateMetadata merges in
one statement. App stats reject an unknown period and cap grouped answers.

* refactor(services): fewer serial round trips in permission, share, metering and events paths

checkMany no longer caches a check that threw. Account deletion revokes its
sessions first. OIDC email_verified strings are read as booleans. Events
limits, FS service types and the events worker deployer live under services.

* refactor(drivers): one teardown path for workers, shared credit hold and provider helpers

A URL input and a generated-media download have a deadline and a size cap.
Azure chat clients take the shared client options. xAI and Mistral chat send
tools through toolsToWire and honor apiBaseUrl.

* refactor(controllers): shared download, paging and second-factor helpers, store methods for raw SQL

/batch answers a non-HTTP op error generically and logs it. /fs/search returns
the client entry shape. The unused /puterai/video/proxy route is removed.

* refactor: thumbnails accept raster types only, boot failure exits, docs for new limits

* fix: sessions stay listed after a rename, token grants follow the whole revoke cascade, app delete in one transaction

- listSessions asks the primary about rows marked as changed, so a renamed
  session stays on the list under its new label.
- The revoke cascade reports the access tokens it revoked, and their grants
  are dropped at any depth. The read before each revoke is gone.
- App delete records the deletion, clears filetype associations and deletes
  the row in one transaction.
- A local worker deploy waits for the runtime to start, so a script it cannot
  load fails the deploy.
- Speechify plain text: an & that starts no XML entity and a < that starts no
  complete tag are escaped.
- The events forward queue's byte bound counts UTF-8 bytes.
- Without a dedicated store, thumbnails stay in the default bucket.
- AppStore.invalidateWrittenByUid for writers that hold the uid.
- subdomainFromHost takes the configured domain list; the sorting wrapper only
  tests called is removed.
- Changelog and alarm docs match the code.

* fix: cache pipelines fall back to single commands across shards, TURN records metered one by one, allowance baseline kept

- execTogether runs single-key cache commands in one round trip and, on a
  cluster that cannot route them in one pipeline, sends each on its own. The
  row cache, tombstone reads and writes, the FS entry backfill, the permission
  check cache and the revoked-session cache write use it.
- TURN usage ingestion makes one metering call per user with each record as
  its own usage, so one malformed record does not affect the others.
- The allowance settlement keeps the baseline fold for month records without
  allowanceUsed.
- Speechify plain text keeps a self-closing tag without attributes.

* fix(localworker): a deploy waits for the runtime to start and a failed cold start answers 502

A script the runtime cannot load fails the deploy. What was serving before
goes back in place, and a first request for such a worker answers 502.

* fix(subdomains): the sites rooted under a folder are read in name order, a page at a time

subdomainsRootedUnder takes the name to start past, so a caller pages
through every match instead of stopping at one query's limit.
2026-11-23 14:00:35 -07:00
..