Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,41 @@ arrive together, it takes a third; a repeated Ctrl-C, which Just does not
forward, kills at the second. There is no timeout except `--quick`'s: any other
command waits its turn for as long as the host stays busy.

### Record each run

A process that starts an agent, such as a job runner or a CPU audit, can read
back what the agent's gated commands waited for by setting `QUEST_GATE_RECORD`
in the agent's environment to an absolute path. Every outermost `quest gate`
run on Linux or macOS, including those the agent's parallel shells and
subagents start, then appends one JSON line to that file, however the run ends:

```json
{"command":["cargo","test"],"directory":"/home/me/src/app","started":"2026-11-12T19:40:01.120Z","admitted":"2026-11-12T19:40:31.452Z","unit":"quest-gate-0d6c3f9e-5a51-4c1b-9d0e-2f4b8a7c6e10.scope","exit":0,"cancelled":false,"error":null}
```

- `started` and `admitted` give the wait. A run cancelled before admission has
a null `admitted`.
- `unit` is the command's systemd user scope, null where the gate owns it
another way, such as on macOS. Once the scope ends, systemd logs
`<unit>: Consumed 1.386s CPU time over 1.357s wall clock time, 8.1M memory
peak.` to the user journal (`journalctl --user -u <unit>`) at info level when
the scope used a notable amount, such as a second of CPU, and at debug level
otherwise. The memory peak needs systemd 255 and Linux 5.19.
- `exit` is the status the gate returns, `cancelled` whether it was cancelled,
and `error` the gate's own failure, such as a scope it cannot confirm
stopped.

Each line is one write to a file opened for appending, so concurrent gates
leave only whole lines; give each agent its own file to tell them apart. Nested
gates write nothing, since their command runs inside their outermost gate's.
An unset or empty variable writes nothing, a relative path or a symlink is
refused, and a file the gate cannot open fails it before the command runs. A
new file is readable only by its user. A line it cannot write fails the gate
too, except that a cancelled run exits as it would have without the record.
Windows refuses the variable, since it cannot refuse a symlink atomically.
The agent's own processes write the file, so a record is only as trustworthy
as the agent.

## Route work by size

`quest` ranks the harnesses, models, and efforts that write work of each size,
Expand Down
112 changes: 0 additions & 112 deletions quest/m0/gate-record.md

This file was deleted.

11 changes: 11 additions & 0 deletions quest/m0/review-login-flake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# [S] Fix the flaky logged-out review test

## Goal

`test/review.test.ts`'s "a login the API rejects fails as logged out" passes on every run, with the flake's root cause fixed rather than retried or skipped.

## Plan

- Known: during validation of [#685](https://github.com/moq-dev/quest/pull/685), a full `just test` run failed this test once; it then passed three reruns. #685 does not touch the code it covers.
- Reproduce it first, such as by running the test in a loop or under the full suite's load, then fix the cause in the test or the code it exercises.
- The maintainer chose: ✅ add a quest to reproduce the flake and fix it at the root cause (rejected: plan it only if it recurs).
37 changes: 0 additions & 37 deletions quest/m1/gate-record-windows.md

This file was deleted.

Loading
Loading