Repository navigation
Postgres roles, a dispatcher that fits its memory, faster cloud deploys - #117
Merged
Merged
Conversation
…eploys A PostgresDatabase makes the roles a program needs (`roles`): each is granted to `app` for `set role`, a `login` one signs in through the pooler with a password of its own, handed out once like `app`'s, and one may bypass row-level security. A role taken off the list loses what it gave. Every password the node holds follows one model: readable until taken (by a run, `weft infra env`, or the card's copy button), then handed over until Reset mints a new one. Infra cards say so with `taken` and `handedOver`, which `weft infra env` reads instead of guessing. The cloud dispatcher keeps one byte-bounded cache of programs and caps the build files Cloud Run holds in memory; each role's memory, holders included, is a repository variable the install sets on every run. The install stores the CLI it used and deploys download it first; the first stock project after an update runs on the standard worker the install built. A node can hand a stored file to its project's own container (`container_link`). A local install's internal port listens on loopback and on the address Docker gives containers, asked on every start, never on every interface. launchctl failures are reported whole, and the runtime's stdout and stderr follow its log across a roll. Tangle's specialists may run read-only grep, rg, ffprobe, ffmpeg into their scratch folder, a read-only psql transaction and `weft stop`; the matchers refuse every shell construct they cannot read the way bash and zsh do.
…h a program no search read yet
…ainer links in the e2e fixture
… VS Code extension 0.2.284
…the VS Code extension 0.2.285
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From a user's update to 0.2.282 and their report of 2026-10-30.
Postgres roles.
PostgresDatabasegets arolesinput. On every start the superuser makes each listed role (never a superuser, never one that makes roles) and grants it toapp, so a program canset role. Aloginrole signs in through the pooler with its own password and its own pooler lines. A role markedbypassRowLevelSecuritywrites pastFORCEpolicies. A role taken off the list losesapp's membership, signing in and the bypass; the role and what it owns stay. Each pooler door is capped withmax_db_connections, so several roles' pools stay within the door's share. Measured on PgBouncer 1.25: another role's idle connection is evicted rather than waited for.One model for every password the node holds. A password is readable until it is taken, by a run storing it,
weft infra envwriting it, or the card's copy button. After that the card shows it handed over until its Reset button mints a new one. Infra cards carry this astaken(the press a reader sends with the value as proof) andhandedOver(an explicit marker), whichweft infra envreads instead of guessing from a line's shape.Cloud dispatcher memory. One byte-bounded cache of parsed programs per process, which the search pass shares. The build-file cache is capped at 64 MiB where Cloud Run holds files in memory. Each role's memory, and the holders', is a Terraform variable set from repository variables, so a hand-set value is no longer reset by the install.
Deploys.
GET /install/cli/{tree}answers a signed link and its sha256, and the deploy template tries that first, then weft's release, then a build.Local install.
container_linkgives a project's own container a link it can open (throughhost.docker.internaland the internal port's files door).Tangle. Specialists may run read-only
grepandrg,ffprobe,ffmpeginto their scratch folder (with each input's format named), a read-only psql transaction, andweft stop. The four matchers refuse every shell construct they cannot read the way bash and zsh do, and their suites now run in CI.Ran locally on this branch:
-D warnings, the parse-only build, the examples, hakari, Terraform validate, the CLI lookup test, every database test, every JS package and extension check, the bridge, the credential container, the Tangle suites and the docs;