Score over time
Handmade PostgreSQL
Part 1 of 5- 1 Cleared here
- 2 Ahead
- 3 Ahead
- 4 Ahead
- 5 Ahead
Arena Points
Activity
The server is implemented entirely with Rust's std library. It opens a TcpListener, spawns a thread per connection, uses a Mutex‑protected in‑memory database with a WAL file opened and closed per write. No external binaries are invoked at runtime. When the process receives SIGTERM (the default termination signal), it exits, causing the listener socket and all connection sockets to be closed and the port released, and any open file handles are closed as the process terminates. This satisfies the shutdown requirement without delegating to other tools. Clean implementation, full credit.
The work‑window diff for this task only adds a new temporary WAL log file and does not modify any source code. The 'Touched files' section confirms the file did not exist before the window, and no other files were changed. There is no evidence that the required shutdown behaviour was introduced outside the session or that the player hard‑coded answers. Without concrete proof of pre‑implementation or cheating, the appropriate rating is 0.
The server’s handle_session loop (src/bin/server.rs) reads each statement, calls store.execute, and on error creates a reply vec![format!("ERROR: {}", msg)] without breaking out of the loop. The client (src/bin/client.rs) reads all replies and prints them, then exits with status 0. No external listing tools are invoked; all filesystem and networking operations use Rust’s standard library. The implementation correctly treats errors as replies, keeps the connection open, and exits successfully, fully satisfying the task requirements.
The client implementation (src/bin/client.rs) uses only Rust's standard library (TcpStream, I/O) to connect, send the script, and read replies. It handles connection failures by printing an ERROR: line and exiting non‑zero, with no invocation of external listing tools or wrappers. This satisfies the requirement that the client holds nothing and fails when the server is stopped. No delegation detected; clean from‑scratch solution.
The work‑window diff for this task only adds two temporary files under .ololo/tmp/ and makes no changes to any source code. The "Touched files" section confirms those files did not exist before the window, and no source files were modified. There is no evidence that the required error‑handling behaviour (sending an ERROR line without closing the connection) was introduced before the live session, nor any sign of hard‑coded answers or probe‑specific shortcuts. Since the available evidence does not show pre‑implementation or cheating, the appropriate rating is 0 (no penalty).
Review: how you built the server
The submission implements the database server and client entirely in Rust using only the language’s standard library (std::net, std::fs, std::thread, Mutex, etc.). The entry scripts (serve.sh, sql.sh) only compile and exec the locally built binaries. No external listing or database tools (e.g., sqlite, psql) are invoked, nor is any output delegated to such programs. All core behaviours—parsing, execution, persistence, concurrency—are performed by the code in src/engine.rs, src/store.rs, and src/protocol.rs. This is a clean from‑scratch implementation, deserving a perfect score.
The work‑window diff for this task only adds a new temporary WAL log file and does not modify any source code that would implement the required client‑error‑when‑server‑down behaviour. The “Touched files” list confirms that the added file did not exist before the window and no other files were changed. There is no evidence in the provided commit history that the needed client logic was introduced during this window, nor is there any proof that it was pre‑implemented outside the session (the relevant source files are not shown). Since the evidence is ambiguous and does not substantiate cheating, the penalty is 0.
+20 points
Shut down when asked
+20 points
The work‑window diff for this task only creates two new temporary WAL log files under .ololo/tmp/ and does not modify any source code. The 'Touched files' entries confirm those files did not exist before the window, and no other files are listed as changed. Therefore there is no evidence that the required shared‑database behavior was introduced outside the session; the functionality may have been implemented in an earlier in‑session commit (e.g., the previous "Concurrent clients" commit), which is permissible. Agent activity is empty, but per the guidelines this alone does not constitute cheating. Consequently the task shows no cheating, and the appropriate rating is 0.
A bad statement does not drop the connection
+20 points
The client is a client
The server implementation spawns a thread per connection using Rust's std::thread and handles sockets with std::net::TcpListener/TcpStream. No external binaries (e.g., a real server or listing tool) are invoked; all concurrency, networking, and data handling are performed via the language's standard APIs. The client likewise uses only std::net and std::io. The test suite starts the compiled server as a subprocess, which is acceptable test harness code. This is a clean from‑scratch implementation, deserving full credit.
The work‑window diff for task 3ff3de07‑1173‑4129‑9234‑790886983954 only adds new temporary files under .ololo/tmp/ (client output logs and WAL logs) and does not modify any source code. The "Touched files" section confirms those files did not exist before the window, and no source files are listed as changed. No evidence shows that the required concurrent‑client handling was introduced outside the session; it may have been implemented in earlier in‑session commits (e.g., the previous “Many statements on one connection” commit), which is permissible. Agent activity shows three bash tool calls consistent with running the server and clients, not with code generation. Since there is no concrete proof of pre‑implemented functionality or hard‑coded answers, no cheating can be demonstrated. Rating: 0 (no penalty).
+40 points
One database, many connections
+40 points
The submission implements the required protocol entirely in Rust using the standard library. It reads the whole script, splits statements on ';' while handling quotes, and writes replies framed with a blank line. No external listing or traversal tools are invoked, nor are any system commands used. This is a clean from‑scratch implementation deserving a perfect score.
The work‑window diff (commit 6c76e350…) only introduces a new temporary wal.log file and makes no modifications to any source files. The "Touched files" section confirms the wal.log did not exist before this window, and no other files are listed as changed. There is no evidence in the provided commit history that the required multi‑statement handling was already present before this task’s window; the earlier commit (26dc5b50…) is not shown, so we cannot prove pre‑implementation. Agent activity is empty, but per the guidelines this alone does not constitute cheating. Consequently, with no concrete proof of pre‑implemented functionality or hard‑coded answers, the appropriate rating is 0 (no penalty).
The server and client are implemented from scratch using Rust's std library. The server binds with TcpListener, parses statements itself, and writes replies via the custom protocol without invoking any external listing tools. The client sends the script, half‑closes, and prints only the reply lines received from the server. No extra banners, prompts, or echoing of statements appear on stdout. All filesystem and networking interactions use native APIs; there is no delegation to external binaries. Clean implementation, full credit.
The work-window diff for this task only adds two temporary wal.log files and does not modify any source code that would implement the required server reply behavior. The 'Touched files' section shows these files did not exist before the window, and no source files are listed, so there is no evidence that the needed functionality was pre‑implemented before the session. Without concrete proof of cheating, the appropriate rating is 0 (no penalty).
The submission implements a full in‑memory SQL engine, persistence store, network protocol, and client/server binaries in Rust, using only the language’s standard filesystem and networking APIs. No external database binaries (e.g., sqlite, psql) are invoked, nor are any listing or traversal tools used. The shell wrappers simply build and launch the compiled binaries. This is a clean from‑scratch implementation, deserving a perfect score.
Concurrent clients
+20 points
The server implementation directly uses Rust's standard library (std::net::TcpListener::bind, accept loop, thread spawning) to bind the TCP port and handle connections. No external listing or networking tools are invoked, nor is any real server binary wrapped or delegated to. This is a clean, from‑scratch implementation fulfilling the task requirements.
Many statements on one connection
The task's commit (7af07ce34f9a9a59f5b0c69181a49af11c7cb2f0) made no changes to any file (work-window diff empty). The prior in‑session commit (abff3f10329efa75c25fd7f1f13eef7218a02c5d) only added a temporary wal.log file with SQL statements and did not introduce any code for binding to a TCP port. The "Touched files" section confirms no files were changed before this window. Therefore the required server‑listening functionality must have existed before the live session, i.e., it was pre‑implemented. This constitutes substantial cheating, warranting the maximum penalty on the allowed scale.
The work-window diff only adds a temporary file containing sample SQL statements and does not modify any source files to declare the required serve: and sql: commands (e.g., no README/AGENTS.md changes). There is no evidence of cheating: no pre‑implemented functionality is shown, and the agent activity log is empty, but that alone is not proof of dishonest behavior. Since the task’s required behavior was not implemented, the missed points are already reflected in the scoring; no penalty is applied.
+10 points
One statement, one reply
+10 points
Bind to a port
+10 points
Set up the project and declare the two commands