Repository navigation
Add StackBench - #5766
Open
bradleyshep wants to merge 814 commits into
Open
Add StackBench#5766bradleyshep wants to merge 814 commits into
bradleyshep wants to merge 814 commits into
Conversation
Contributor
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
bradleyshep
force-pushed
the
bradley/stackbench-test
branch
from
August 31, 2026 17:38
6a1eb7d to
dc1a416
Compare
bradleyshep
force-pushed
the
bradley/stackbench-test
branch
from
September 7, 2026 20:22
32d3018 to
837c1f7
Compare
Every scenario, contract, reference or SDK change left recipe, fixture, selection, feature catalog, reference source and mutation digests to be re-pinned by hand across the registry, mutation manifests and calibrations. npm run repin recomputes them with the compilers' own functions, writes only changed files, and verifies each calibration. It does not touch qualification evidence. It also drops the checksum of locally built packages (resolved file:) from reference lockfiles. The release builds spacetimedb.tgz itself, so a pinned sha512 only failed npm ci whenever the SDK changed; npm ci installs the package without it.
After a refused sign-up an app can leave its modal dialog open on sign-up; the overlay covers the header sign-in toggle, so the click was blocked and a security check failed on navigation. When sign-up inputs are showing and the contract's overlay-close control is visible, close the dialog before using the toggle.
An application sign-out leaves the SpacetimeDB identity unchanged, so data scoped to ctx.sender stays available to that client. The React provider reconnects with backoff and keeps its token; a connection built with DbConnection.builder() stays closed until the application builds a new one, and onConnectError reports every failed attempt, including an unreachable host.
ctx.senderAuth.isInternal was always false in TypeScript modules, so a scheduled reducer guarded with it, as the authentication docs show, refused every scheduled call. Rust reports a call without a connection (init, scheduled functions) as internal. Match Rust: a call without a connection id is internal, and transactions inside HTTP handlers, which also lack one, are created as external explicitly, as in the Rust try_with_tx override from #5978. HTTP reducer and procedure calls carry a generated connection id and stay external.
The front page stacked a lane for every running attempt and a card for every reference run above the campaign table, so a running study pushed the table off the page, and each lane cost a full campaign sheet read. Running attempts are shown on their campaign page; the table row says the campaign is running. A reference run appears only while it runs, without the caption lines.
…ne line at the bottom
…er reads a control
…nd wait out capacity refusals
…vocation's usage when Codex resumes
…time Seven overlapping gradings failed the grader's fixed time budgets in apps that pass when three run together. Each grading now holds one of the host's grading slots as a resource lock in its run lease, so teardown and recovery free it like any other claim. Waits go to a receipt that the campaign clock, the process timer and reference qualification subtract, and run totals report them as gradingWaitSec. STACK_BENCH_GRADING_CAPACITY overrides the default.
…etry its suite once A fresh client that could not repeat the baseline sign-up writes left an inconclusive check with nothing to explain it. The finding now carries both inventories (transport, destination and argument-shape hashes only) and is retryable, so its suite runs once more from fresh state. Nested actions keep their child's retryable flag instead of dropping it.
In the first study on three slots, passing Convex and SpacetimeDB apps held a slot for 45-55 minutes per L3 grading, and whichever waiter polled first after a release won it, so one run waited 83 minutes behind later arrivals. Waiters now hold queue tickets and only the oldest live ticket may take a free slot; a ticket left by a dead waiter goes stale. The suite runner takes a slot for its setup and one per suite, so short gradings run between a long grading's suites. Bench runs the grader under the pause-aware process timer so these waits do not count against the grading timeout, and reads its recorded wait from the receipt.
Where the fault lands is timing: it can miss the outstanding requests, the clock can move, a reservation can expire, or a checkout can be acknowledged inside the kill window so it cannot be linked to the recovered order. Each left the check inconclusive with no retry, which made the whole run inconclusive. These outcomes are now retryable. A checkout the app left unfinished is how the app is built, so it stays final.
…attribute Reading an action's input attribute from a control that never rendered reported that the control "exposes no" attribute, which blames how the app built the control and is what a repair agent reads. The check result is the same; the finding now says the control did not become available in time.
Seven full Convex and SpacetimeDB regrades on six slots matched their grades exactly, as often as on three, in about 60% of the time.
…arries it A SpacetimeDB app put each stock transfer's input on the transfer form inside its admin row rather than on the row, and lost three checks although every row carried its own input. When a control has no value of its own and exactly one element inside it does, that value is the control's input; two or more would be ambiguous, so the control's own value still stands.
A Postgres app's new product missed the public catalog because the visitor reloaded before the admin's save was committed; an app that does not push updates never showed it, so the race only cost stacks without live updates. Eight synchronous admin, support and cancellation writes followed by another user's reload now await their writes. Queued-write scenarios, where a 202 is a valid answer, are unchanged. Calibrations re-pinned with npm run repin.
The SpacetimeDB write capture accepted only reducers whose arguments its patch codec can read, so waiting for an add-product save with a list of variants left catalog checks inconclusive on every SpacetimeDB app. Waiting for a write needs its request ID and result, not its arguments: a completion check now tracks those directly. Probes that patch arguments still decode and refuse what they cannot read.
…directories d3a16e8 left out what a store's ignore files exclude when hashing the live app, but the saved copy of each level was still hashed as a plain directory. A store with ignored files in its source (Sol and Astra keep .runtime/ and build/) then failed 'preserved first-build source differs from the live application source' at level 1. Each saved copy is now hashed by hashAppSource: a fresh copy under the current rule, a copy checked against an older record under the rule that reproduces it.
…g the store The metrics walk read every folder, so a store whose start locks an ignored folder (Sol 6.2 runs chmod 700 .runtime) failed grading with EACCES after the source hash stopped reading it. The metrics now count the same files as the source identity.
…base setups do Convex says the web client uses VITE_CONVEX_URL and Supabase names its client URL and key; Spacetime named only a package in a table. A plan-only probe on the level 1 task (gpt-6.2-sol and gpt-6.2-astra, three samples each) moved Sol from a server gateway to browser subscriptions for public data, and Astra to the SDK throughout.
Name the connection settings the web client uses, as the other stacks do, instead of naming the SDK package. In the plan-only probe, Sol chose browser subscriptions for public data in 5 of 6 plans (6 of 6 with the earlier wording) and Astra used the SDK in 3 of 3.
…ling the run
The concurrent-purchase check found each shopper's control, then pressed them all at
once. A store that updates live redraws the card when one purchase lands, so another
press could lose its element ("Element is not visible"), and any error other than a
timeout became a harness failure (Astra 6.2 job-7aa8ffd0 r3, check 202a). A press
that lost its element is now sent again on the same locator until the time limit; a
control that never stays long enough to press still fails as a failed click.
Chromium never reports an unread no-store body finished, so UI writes whose response the store ignores were recorded as lost. A response with a Content-Length and no chunked encoding now completes on its headers; a chunked body is still awaited.
…to close A store that pushes updates over a fetch-read application/x-ndjson response kept every privacy reload waiting for a body that never ends, so absence checks came out inconclusive. The proxy already records each written chunk; it now treats ndjson like an EventSource stream.
A reducer's arguments are written to the commit log with its caller and timestamp; a procedure's are not. Stated in each section as a fact, without recommending either.
…install the concepts skill Setups for Spacetime, Convex and Supabase now say only what reaches what; the "web client uses" sentences and the VITE_ variable names are gone, and the port placeholder is <APP_PORT>. New runs give stores neutral names (SPACETIMEDB_URI and SPACETIMEDB_MODULE, the Convex and Supabase names, and APP_PORT). Each run records the rule in its setup; a regrade or campaign extension of a run without the record gives its store the Vite-named set it was built with. Reference apps read the neutral names. Spacetime agents also get Spacetime's concepts skill. Pins refreshed with npm run repin.
… its start script made private stay readable
…empts in the campaign's evidence
…cation data, accounts, and backend functions
…sively as the whole backend
… of failing the job
…ion whose broker dies The broker kept each request's chunks reachable until its reply had streamed, and its 256 MiB container cap could not hold two concurrent requests at its own 32 MiB body limit. A Codex session's broker was killed at that cap and the session ran on without a model until its timeout. The broker now drops the chunks once joined, records its largest request body, and gets a cap that covers concurrent requests at the body limit. A watcher confirms a dead broker with Docker and ends the session at once, reporting the broker's exit.
…e dashboard default as they are
…now every StackBench mutation-test file
…eature incomplete
bradleyshep
marked this pull request as ready for review
November 27, 2026 18:06
This branch has not been deployed
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.
Description of Changes
tools/stack-bench. Each agent builds an online store from a feature list on one stack (Spacetime, Convex, Supabase, PostgreSQL, or MongoDB), and StackBench scores how many of its features hold up under production conditions such as concurrent purchases, restarts, reconnection, live updates, and permissions. Score is the percentage of features that pass every check, averaged over runs.What Spacetime gets that other stacks do not
skills/, and a page StackBench wrote on runningspacetime dev. The other stacks' setup has connection details and start instructions only. The skills are included because the current Spacetime SDK is newer than the models' training data, and agents without them write code for an older API. They include guidance on reducer transactions, private tables, uniqueness across columns, and the caller's identity after a reconnect, which some checks test.SenderError. Any other exception returns the host's fixed crash text, which never counts as a refusal, the same way an HTTP 500 does not.tools/stack-bench/docs/fairness.mdandtools/stack-bench/docs/grading.mddescribe these differences.API and ABI breaking changes
None.
Rollback safety impact
n/a
Expected complexity level and risk
tools/stack-bench, which no other crate or package imports. The main risk is a grading error or an unfair difference between stacks, which would make the published results wrong.Testing
tools/stack-bench/testscover prompt composition, grading, each stack's adapter, scheduling, recovery, evidence, uploads, and the audit that flags agents reading StackBench's own files. "Three concurrent nine-worker campaigns" incampaign-reservations.test.tsfails since 3fb4747, because its fixture does not pin an image.ws_url.test.tschecks that the SDK keeps the URI path for the token request and the subscription.