Skip to content

v0.49.0

Choose a tag to compare

@alejandroerickson alejandroerickson released this 01 Dec 02:54
1ad7d43

Image: ghcr.io/alejandroerickson/what-build:v0.49.0 (linux/amd64), built from 1ad7d439f2a29c082a0eef1256f4d4425e5477d5.

Migrations. This release changes the database schema since v0.48.0, the last release with an image:

  • 0057_blocking_feedback.sql
  • 0058_search_words.sql

Going back to an earlier release needs the database restored to before these ran. Take a restore point before deploying.

If a release breaks your deployment: recovering from a bad release.

Upgrading.

  • A search reads only the pieces of text that hold its words. Row-level security kept Postgres from using the search index, so every search read every piece of text in the database, every organization's, and on a small server with little memory a search after a quiet spell could pass 5 seconds (503 search_timed_out). Migration 0058 adds text_chunk_words, which copies each piece's search words beside it (and drops text_chunks_tsv, which could never be used). It locks text_chunks against writes while it copies, about as long as reading every piece takes, and the database grows by about the size of the pieces' search vectors. The previous release keeps working on the migrated schema: it still searches text_chunks as before, never changes a piece in place (which the migration refuses), and the pieces it writes get their words from the migration's trigger. Nothing else needs doing. A search for words most texts hold still reads each piece that holds them.
  • Correcting a misspelt word in plain search no longer reads every text in the organization. A word that matches nothing is now corrected from the product's own pieces that hold a word starting with its first three letters (or with two neighbouring letters swapped, or from a title). It took about half a second for every five million characters of text the organization held on a fast computer, several times that on a small database server, where it could stop the search; now it takes milliseconds. People and agents will notice that a misspelling within a word's first three letters is searched as typed unless it is a swap. Looking for a correction has half a second of its own; past it, the words are searched as typed and the answer's correction_skipped says so, never search_timed_out. Agents see tools_version 0.79.0. Nothing needs doing; no migration.
  • A search stopped at its time limit says why it was likely slow. 503 search_timed_out gives details.searches_running, how many other searches ran beside it. When there were any, it tells the agent to send searches one at a time. Connected agents see the guide's new words once they refresh their tool list (tools_version 0.79.0). The Azure guide says why a search can time out on a small database server (reading text from disk after a quiet spell, or CPU credits spent) and how to tell which. Nothing needs doing; no migration.
  • Problems people meet reach the people who run the deployment at once. Errors in people's browsers (a screen that failed, an error the app's own code threw), signed in or not, the sign-in page among them, are written to the service's log as ERROR lines, browser_error, which an alert on error lines mails; a request meant to answer at once that takes 10 seconds or more is a slow_request line; every 5xx answer carries reference, the request's ID, which the web app shows beside the error with Report this problem. Feedback takes severity: "blocking" and a reference, and a blocking report is mailed to WHATBUILD_FEEDBACK_EMAIL at once, within allowances of its own. Migration 0057 adds four columns to feedback and one to feedback_counts, with defaults, which the previous release never reads or writes, so it keeps working on the migrated schema; nothing else needs doing for these. A Cloud Run deployment takes the new alerts by running deploy/cloud-run/alerts.mjs again (it adds slow requests), and, behind the Cloudflare Worker, by deploying the Worker from this release and passing EDGE_URL=https://<the app's host>, which adds an uptime check on /edge-health.txt, a path only the Worker answers, and the edge is down (Cloud Run). Agents see tools_version 0.79.0.
  • A filesystem file store that can't be written is said, not answered as an internal error. A deployment whose files go to a mounted volume (WHATBUILD_BLOB_STORE=fs, as on Azure) checks at start that it can write to WHATBUILD_BLOB_DIR. When it can't, it logs file_store_unwritable as an ERROR line that names the folder and the error, answers writes of files 503 storage_unavailable instead of 500 internal, and GET /api/v1/meta says storage: "unwritable" until a write succeeds. After changing the environment or the volume, check that storage says "ok". A deployment on object storage reads "unchecked" there. Nothing needs doing; no migration.
  • Agents' common guesses at a field's name are taken, or answered with the right one. A write takes etag for expected_etag, derived_read(action="text") takes length for limit, and the Playbook's index, read_files and get_download take folder for prefix. The actions' one-line summaries, which an agent reads before it asks for a schema, now name the fields they take: offset and limit, note_kind, prefix, and that mockups_write(action="request_upload") takes only the ZIP's size. A refused field is matched against the optional fields too, so it comes with the name meant. Nothing needs doing; no migration.
  • Agents keep corrections in the Playbook, and hear of the starter's pages nobody filled. The server's instructions, the guide and the starter's how-to/lessons.md say that writing to a product's Playbook is part of the work the person asked for, and that a correction about the product's work is a lesson there even for an agent with a memory of its own, which may keep a pointer to it. playbook_read(action="housekeeping") answers unfilled_starter, the starter's pages to fill (product/now.md, product/evidence-map.md) that nobody has written, from the first day, and leaves them out of drafts; products_read(action="get") marks such a read_first entry starter: true. A product that has written to its Playbook keeps its own copy of the starter's how-to/ files; playbook_read(action="starter") shows the new text to take. Nothing needs doing; no migration. Agents see tools_version 0.79.0, and a connected agent gets the new instructions only after its client refreshes its tool list (in Claude Code, a new conversation or a restart).

What's Changed

Full Changelog: v0.48.0...v0.49.0