Skip to content

Merge main into add-xai-endpoint - #3368

Closed
shisirbasel wants to merge 94 commits into
add-xai-endpointfrom
add-xai-endpoint-merge-main
Closed

shisirbasel wants to merge 94 commits into
add-xai-endpointfrom
add-xai-endpoint-merge-main

Conversation

@shisirbasel

Copy link
Copy Markdown
Collaborator

Merges current main into add-xai-endpoint to resolve the merge conflict blocking #3156. Pushed to an intermediate branch because this org's branch ruleset blocks direct pushes to add-xai-endpoint.

netzenbot and others added 30 commits October 23, 2026 15:47
make check-affected selects the Rust and desktop app jobs for any path
under crates/, so a translation change ran every Rust test suite and the
desktop build. localization.md now lists the checks a catalog change
needs and the one test outside the i18n crate that reads French text.
checks.md says to run the narrower checks a page names for a kind of
change and to say in the pull request that the rest was left to CI.
…page (#3149)

The banner, the README's first point and the docs site's tagline and
first feature promised only that a web page cannot redirect bravebot,
which reads as a browsing agent. The guarantee holds for everything
untrusted it reads: a file, a command's output, a tool's result or an
email. The banner is regenerated from the tagline in readme-art.mjs.
Places that give a web page as one example among several are unchanged.
Adds French for the ChatGPT sign-in and its doctor and auth status lines,
the sessions list, delete and purge commands, stats, /hunks, the rule file
notices, the standing instruction size notes and the plan approval prompt.

French counts zero as singular, so the hunk line counts and the missing
hunk message carry a [0] variant. Without it a hunk that removes nothing
would read "1 ligne supprimée". The glossary gains "hunk" as "morceau".

contrib/untranslated-messages.txt is now empty.
* cli: list an unapproved run line once in a one-shot result

The policy already records an unapproved run line as refused under
the approval gate (TRACE-1). The one-shot confirmer kept a second
record of the same question under the run gate with in_the_trail
false, so --json's refusals array listed the line twice. Marking that
record in_the_trail true, the way a write's and a fetch's already
are, lets with_declined drop it as the duplicate it is.

Updates the confirmer test's expectation and comment to say a write,
a fetch and a run are all recorded in the trail and filtered out,
leaving only the plan listed from the confirmer. Adds a pinning test
in crates/cli/tests/running.rs that starts a one-shot run against a
gateway asking for a run nobody can approve and asserts the --json
refusals array holds one entry, not two.

Closes #2899

* cli: name a run among CLI-12's once-listed refusals

CLI-12 named only a write, a fetch and a server's tool call among the
refusals a result object lists once from the policy's trail entry.
This change made a refused run behave the same way without updating
the clause, and no verified-by test drove a refused run through
--json. Add a run to the clause and list the existing end-to-end test
as a CLI-12 verified-by.
SseDecoder held a line until its newline arrived and had no bound of its
own, so how much it held was whatever its caller capped the body at. A
line longer than 16 MiB before its newline, of any kind, now ends the
decoding: payloads from the lines before it are returned, and it and
every byte after it are discarded. Every caller accepts a reply only
once a payload says it ended, so a reply with a line missing is reported
as incomplete and not returned as a whole one. Which line is too long
does not depend on where the reads fall.

Every caller reads through bravebot_net::Streamed, which cuts a body at
2 MiB, so none reaches the limit and no caller's behaviour changes. A
compile-time assertion keeps the limit at or above that cap. The limit
holds the decoder's memory for a caller that raises the cap.

Part of #3144
* Give plan-then-execute runs their own docs page

using/manifest-mode.md holds what was spread over using/headless.md and
using/sessions.md: how a plan is put to you, what a plan cannot use, what
comes back, starting a run from a session with /manifest, and the record a
manifest run leaves. headless.md and sessions.md keep their headings with a
short pointer, so the old anchors still resolve.

Links to the moved text in the README, configuration.md, permissions.md,
commands.md and cli.md point at the new page. The manifest, CLI and sessions
specs list it in documented-by, and the page is in the bravebot-help page
table, which a test holds to the files under docs/website/docs.

* Give incognito sessions their own docs page

using/incognito.md holds what --incognito leaves out, what it still reads,
and the files it does not cover, moved from using/sessions.md. sessions.md
keeps the heading with a short pointer, so the old anchor still resolves.

Links to the moved text in the README, the quickstart, the CLI and tool
references, and the configuration, MCP, sign-in, audit trail, permissions,
trust and vetting pages point at the new page. The incognito spec lists it in
documented-by, and the page is in the bravebot-help page table, which a test
holds to the files under docs/website/docs.

* Give rewinding turns their own docs page

using/rewind.md holds what /undo, /rewind and /hunks do: reading a rewind
before running one, putting back one hunk, what will not go back, what gives
up every point, and how a rewind survives a resume. The text moved from
using/sessions.md, which keeps the heading with a short pointer so the old
anchor still resolves.

The links in sessions.md and trust.md that named the moved text point at the
new page. The sessions spec lists it in documented-by, and the page is in the
bravebot-help page table, which a test holds to the files under
docs/website/docs.
* Let a request ask for the whole body of a refusal

A request that calls `reading_a_refusal` is handed the body of a non-success
reply in `EgressError::Status`, labelled as the call labels its replies, beside
the status and the wait the server asked for. The body is handed over whole or
not at all: one longer than 16 KiB, one whose read fails because the connection
broke or went quiet past the gap bound, and one a request did not ask for leave
the failure as the status alone. A success is unchanged whatever the request
asked.

The body is read with the reply and under the bounds every body is under. Where
the request has a way to be stopped, the read is on the thread a stop abandons,
so stopping the request stops the read. A read that fails is written to the
diagnostic log as the body failing, unless the request was stopped. The crate
reads none of the body: the caller compares what it needs. A refusal after a
redirect is reported against the URL that was asked for, as a status is.

NET-12 states it.

Part of #1106

* End a ChatGPT turn at once on a refusal that names the account

A refusal of a request to the account's serving host whose `error.code` is one
of the seven codes the clause lists, at any status or as a `response.failed` or
`error` event on the stream, ends the turn with a sentence of its own and no
second request. No token is replaced and nothing is waited out, since neither
changes what the code says.

The usage limit has its own sentence. The other six (user not eligible,
capability or route not supported, invalid user, scope or authorization context
not authorized) share one sentence that says the account may not be used this
way, name no cause and do not send the person to sign in again. Both are a
refusal among the failure categories, which no fallback model is used for: the
account answers for every model it serves.

Any other body leaves the refusal as its status, as it was: a 401 is replaced
once and sent again, a 429 and a 5xx are asked for again. The code is compared
as a whole with the list in the one place the body is read, and nothing the
service wrote reaches a sentence, the trail or the diagnosis. The picker's
listing is held to the same rule, and the desktop picker warns of a refused
listing in the refusal's sentence instead of offering to sign in again. A
gateway's reply carrying the same codes is not the account being refused.

CHATGPT-5, CHATGPT-7, CHATGPT-8, CHATGPT-9, BACKEND-53 and BACKEND-61 state it.

Part of #1106

* State NET-12's answer to a request that does not ask in the present tense

The clause said a request that does not ask is answered as it was, which reads against a version that is not in the spec. It now says what the answer is: a non-success status with no body.
The row under the box draws the permission mode but a click on it did
nothing; only the key cycled it. A click that sweeps nothing on the
mode now cycles it, as the key does. Adds MOUSE-14.

Part of #2685
…es (#3166)

* Move the desktop app to a patched Electron

`ui` resolved electron 44.5.0, which is in the range GHSA-jr5w-w6x2-84p9
covers (`>=44.0.0-alpha.1 <44.9.1`, titled "Mitigation for compromised
eMudhra intermediate certificates"). The range floor is now `^44.9.1` and the
lockfile resolves 44.9.3, the newest patch of the same major. Nothing else in
the lockfile moves.

* Pin body-parser to a patched release in the docs website

The documentation site's lockfile held body-parser 1.20.6, reached through
`@docusaurus/core > webpack-dev-server > express`, which is in the range
GHSA-27r3-jxmh-p828 covers (`<1.20.9`). One `overrides` entry moves it to
1.20.9, the first patched release, and nothing else in the lockfile moves.

* Pin body-parser to a patched release in the mobile app

The mobile app's lockfile held body-parser 2.3.0, reached through
`react-native > @react-native/community-cli-plugin`, which is in the range
GHSA-27r3-jxmh-p828 covers (`>=2.0.0 <2.4.0`). One `overrides` entry moves it
to 2.4.0, the first patched release, and its dependency qs moves from 6.16.0
to 6.16.1 with it. The override can be removed once react-native depends on
2.4.0 or later.
…tings their own docs pages (#3165)

* Give installing, updating and uninstalling their own docs page

docs/website/docs/install.md holds what the quickstart said about installing with npm and the
install scripts, checking a download by hand, checking the configuration with `bravebot doctor`,
staying current and uninstalling. It sits after the overview and before the quickstart in the
sidebar.

The quickstart keeps its Install heading as a pointer to the page, so /quickstart#install still
resolves. The landing page's "All install options" link, the overview's start-here list, the
README and the releasing guide link to the new page. The RELEASE and UPDATE specs name it in
documented-by, and the help pages carried in the binary include it.

* Add Ollama, LM Studio and llama-server pages under Reaching a model

Each local server has a page that says how the first run finds it, what the
import writes, the block to write by hand, and what to state for its context
window. The text comes from the configuration page's import section, the
gateway page and the IMPORT spec, and the gateway page now points to the three
pages instead of holding the LM Studio and llama-server blocks itself.

The IMPORT and BACKENDS specs name the new pages in documented-by, and the
configuration page links to them from the import section.

* Move importing, OpenAI, Google Vertex AI and OpenRouter onto pages of their own

Importing from Claude Code, opencode or a local model server moves from the
configuration page to customize/importing.md. The OpenAI and Google Vertex AI
sections of the gateway page move to providers/openai.md and
providers/google-vertex.md, and providers/openrouter.md gathers what the
gateway page says about OpenRouter. The old headings stay as short pointers, so
their anchors still resolve, and every link to the moved text now points at the
new page.

The providers are ordered Anthropic, OpenAI, Google Vertex AI, AWS Bedrock,
OpenRouter, the generic gateway, then Ollama, LM Studio and llama-server. The
help module carries the new pages, and the BACKENDS and IMPORT specs name them
in documented-by.

* Address review: size PAGES to its 47 entries

* Give the sandbox settings their own docs page

run.scrubEnv, run.network, sandbox.network, sandbox.filesystem and
sandbox.holdBackTemporaryDirectory move from the settings.json reference in
configuration.md to security/sandbox.md. configuration.md keeps each heading with a
short pointer, and the links that named those anchors now point at the new page.

The page is listed in documented-by for the sandboxing, run and credential-protection
specs, and in the table of pages the binary carries in help.rs.

* Give the administrator-pinned settings their own docs page

The section on the file an administrator pins moves from configuration.md to
customize/managed-settings.md. configuration.md keeps the heading with a short
pointer, and the links that named the anchor now point at the new page.

The page is listed in documented-by for the permissions and mcp-servers specs, and in
the table of pages the binary carries in help.rs.

* Give choosing a model its own docs page

The section on choosing a model with /model moves from configuration.md to
customize/model.md. configuration.md keeps the heading with a short pointer, and the
links that named the anchor now point at the new page.

The page is listed in documented-by for the commands spec, and in the table of pages
the binary carries in help.rs.

* Give choosing how hard to think its own docs page

The section on choosing an effort level with /effort moves from configuration.md to
customize/effort.md. configuration.md keeps the heading with a short pointer, and the
links that named the anchor now point at the new page.

The page is listed in documented-by for the commands spec, and in the table of pages
the binary carries in help.rs.

* Give choosing a theme its own docs page

The section on choosing a theme with /theme and writing one of your own moves from
configuration.md to customize/theme.md. configuration.md keeps the heading with a short
pointer, and the links that named the anchor now point at the new page.

The page is listed in documented-by for the terminal-transcript and sessions specs, whose
clauses cover user theme files and the stored theme name, and in the table of pages the
binary carries in help.rs.

* Give choosing a language its own docs page

The section on choosing the interface language, with what stays in English, moves from
configuration.md to customize/language.md. configuration.md keeps both headings with a
short pointer, and the links that named the anchors now point at the new page.

The page is listed in documented-by for the localization spec, and in the table of pages
the binary carries in help.rs.

* Give the lsp tool its own reference page

Move the detail of the lsp tool from reference/tools.md to reference/lsp-tool.md: checking a file
with diagnostics, which server runs and what starting one costs, declaring a server of your own,
how a location and the text at it are labelled, what each kind of empty answer means, and the
cached index. The text moves unchanged; the subsections become second-level headings.

tools.md keeps the `lsp` heading, the parameter table and a link to the new page. The links to the
diagnostics and index subsections in tools.md and customize/configuration.md point at the new page.
The new page is listed in the documented-by front matter of the LSP spec and in the pages carried
in the binary, which a test holds to the files under docs/website/docs.

* Say that a location's name is content on the lsp page

The lsp page said a location reaches the planner whatever the trust map says about the file it
names, and that a filename is reported as the answer to the question asked. LSP-3 labels the answer
by the files it names: an answer naming only vouched-for files is read as written, and an answer
naming any other file comes back whole as a reference. Only a name that is shown is pictured, held
to one line and capped at two hundred locations.

State that, and that vouching for the tree is the way to see the locations. The remark about what
an owner of a file can steer applies to a tree the person vouched for.

* Give permission modes their own docs page

Move the "Answering in advance: modes" section of security/permissions.md
(about 165 lines) to security/permission-modes.md. permissions.md keeps the
heading with a short summary and a link, so the anchor still resolves.

The subsections of the moved text (bypassing, two things no mode answers, the
desktop application, a mode belongs to the sitting it was chosen in) are now
sections of the new page. Links to the old section or to #bypassing, in
configuration.md, cli.md, commands.md, run-tool.md, trust.md, vetting.md,
headless.md, interactive-mode.md and sessions.md, point at the new page.

The page is added to documented-by in the permission-modes, permissions,
prompting, read-output and run specs, and to the pages carried in the binary
by crates/agent/src/help.rs.

* Give permission rules their own docs page

Move the "Rules you write down in advance" section of
security/permissions.md (about 130 lines) to security/permission-rules.md.
permissions.md keeps the heading with a short summary and a link, so the
anchor still resolves.

Links to the old section, in configuration.md and commands.md, point at the
new page, as does the link in hooks.md that names where a rule about what to
refuse is written.

The page is added to documented-by in the permissions, prompting and run
specs, and to the pages carried in the binary by crates/agent/src/help.rs.

* Say that a write to a protected path is still put to the person

MODE-2 and PERM-9 keep a write to a protected path (any .git, .bravebot or
.husky component, and .gitmodules, .gitconfig and .pre-commit-config.yaml)
asking under accepting edits, under an Edit allow rule and under the trust
map, and refused where nobody can be asked. The permission-modes page said
accepting edits accepts a write to any path the workspace reaches, and the
permission-rules page listed four prompts no rule can answer where PERM-9
lists five.

The accepting-edits paragraph now names the exception, a new paragraph on the
permission-modes page describes it, and the permission-rules page lists it as
the fifth prompt.

* List the model, effort and managed-settings pages in BACKENDS and untie a sidebar position

The BACKENDS spec governs the effort level (BACKEND-22 and BACKEND-43), the
model roster and the names an administrator pins, so its documented-by now
names customize/model.md, customize/effort.md and customize/managed-settings.md.

importing.md and model.md both held position 11 in the Customize sidebar.
Importing moves to 16, after the pages the configuration split added.
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.8 to 3.1.9.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.8...v3.1.9)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… read first (#3171)

The second half of
`a_refusal_whose_body_fails_while_it_is_read_is_written_to_the_diagnostic_log`
presses a stop 100 ms into a 300 ms gap. When the process stalls for 200 ms
or more, the gap ends the read before the stop is seen, the fetch returns the
401 status, and the assertion that it was stopped fails. It failed this way on
the macOS job for a push to main and for a pull request that does not touch
`crates/net`.

The second half now uses a 2 s gap, so the stop has about 1.9 s of margin, and
waits for the gap plus 900 ms before it reads the log. The assertion prints the
outcome it got.
`ui` resolved undici 6.29.0 and 7.30.0, which are in the ranges
GHSA-xjj6-f33q-929c covers (`>=6.23.0 <6.29.1` and `>=7.18.0 <7.30.1`). The
lockfile now resolves 6.29.1 and 7.30.1, the next patch release of each line.
They are reached through `@electron/get`, `@electron/packager` and
`electron-builder > app-builder-lib > @electron/rebuild > node-gyp`. No
manifest changes and nothing else in the lockfile moves.
A provider entry with the id chatgpt that states no endpoint is read for
its models and nothing else. It is not a gateway, so the ChatGPT account
stays reachable, and the models it names are offered in /model and the
desktop picker in place of the serving host's listing. No listing is
requested and the access token is not renewed to offer them, so the
roster is the same offline. They are offered where a sign-in is stored,
which the agent answers by reading the file.

A model's window is the one its own limit states, by the rule a gateway's
model follows. Its options, its output ceiling and the entry's own
options are not read: a request to the account carries nothing a
settings file says (CHATGPT-10), so none has a reader. A name is trimmed
and one with nothing left is dropped.

The entry is part of the provider block, so a machine-level provider
block replaces it as it replaces the gateways, which also leaves the
models out of the configuration while a gateway holds the id. An entry
that states an endpoint is still a gateway and keeps the id. The rows
the entry's models and the listing become share one constructor.

Part of #1106. Closes #3133.
a_failed_advisor_call_tells_the_planner_only_the_category (agent) and
preserved_history::a_failed_turn_leaves_a_note_the_transcript_does_not_draw_and_a_resume_still_sends
(tui) assert that the request the planner receives does not contain "401", the status the stub
service replies with. The request names the working directory, and the name of each test's scratch
directory holds the process id, so both fail whenever the id contains 401.

Process ids on the CI runner are assigned in sequence, so a run passes through whole ranges such as
40100 to 40199. The tui test failed on main in three runs (pids 40112, 37401 and 40158) and the
agent test failed on #3164 (pid 17401).

Each test now removes its own process id from the request before searching it. The search still
covers the whole request, so a status that reaches the planner through any other channel still
fails it.
* Add a skill that implements a list of issues in one pull request

/implement-issues takes issue numbers, links and search queries and works them
into one pull request. Related issues share a worktree, the others get their
own, and the commits are combined on one branch that carries the pull request.
It reuses pr-fix.py to read issues, make worktrees, open the pull request and
follow CI, and it hands review comments back to pr-fix.

The pull request body lists every decision a maintainer could reverse above the
problem, and a follow-up issue is filed only for a part that cannot be done.
maintainer-jobs.md names the skill beside /pr-fix.

* implement-issues: say what an item becomes when a conflict gives up its behaviour

Step 5 sent the behaviour of the item that gave way to `impossible`, which is
limited to a listed set of causes. The set has a sixth cause for two items whose
behaviour cannot both hold, and step 5 says the item gets `Part of` with a filed
follow-up for what it lost.

* implement-issues: match allowed-tools to the commands the steps run

A pattern such as `Bash(make *)` does not match a command that starts with an
environment assignment, `gh api -X GET search/issues` is not `gh api search/issues`,
and the contrib scripts and the loop's two checks had no entry, so an unattended
run stopped at a permission prompt. The frontmatter now has a pattern for each
command a step gives, and the gate command is two simple commands so that each
matches one.

* implement-issues: cite an issue for a test that also fails on the parent commit

A test that fails on the parent commit is a defect found and left, which GAP-001
asks a pull request to cite an issue for. Step 6 files it with the issue-poster
definition, the body cites it in the details block and under `Not covered:`, and
step 8 and the body template say the same for a failure found after the pull
request is open.
* Send crash reports to Backtrace

When bravebot panics, the hook writes one small file to `crash-reports/` in the
state directory and makes no request. The next launch sends the waiting
reports to the Backtrace project the build was given, oldest first, from a
thread nothing waits for, and deletes each one the service answers for. At
most five wait and none outlives two weeks.

A report holds numbers, words fixed in the source and one source location: the
version and build, the operating system and architecture, which executable
panicked and how it was installed, and the file, line and column of the panic.
A panic message is included only where its payload is a `&'static str`, and
one built at run time is left out. A path is cut so it does not name the
machine that built the binary. There is no call stack, environment, host name
or identifier that persists between reports.

The address is `BACKTRACE_SUBMIT_URL`, baked in at build time like the rest of
the build's configuration, read nowhere at run time and used only if it is
`https`. A build without it writes and sends nothing. It is forwarded into the
cross-build container, dropped from the desktop bridge's check builds, and
documented in `.envrc.example` and the development docs.

Reports are on by default. `BRAVEBOT_CRASH_REPORTS=0`, or `crashReports: false`
in the person's own settings file, turns them off, and a checkout's settings
file is not read for it. An incognito session is given no state directory, so
it leaves and sends nothing. The terminal says once on its startup screen that
reports are sent.

Only the service's answer removes a report. The request goes through
bravebot-net with redirects refused, and the body of the reply is never read.
The new crate holds no HTTP client.

CRASH-1 to CRASH-10 state it.

* Decide the crash report directory in the shared start function

The crash report crate asks `home::writable` for the directory itself, so
`bravebot`, `bravebot-host`, `bravebot-rpc` and `bravebot-acp` call `start`
with their own word and nothing else, and an incognito session gets no
directory whatever an executable would have passed. `start_with` takes the
address, for a test build that has none.

`tests/incognito.rs` runs the function in child processes against a state
directory the environment names. An incognito launch creates no directory and
makes no request, an ordinary one leaves one report, and the environment
switch and the person's settings file each stop a launch.
`crates/cli/tests/crash_reports.rs` reads the six executables' sources. Each of
the four calls `start` once with its own word, the other two name nothing of
the crate, and an executable on neither list fails until it is placed on one.

CRASH-4 and CRASH-5 state it.

* Send crash reports once a launch has run for three seconds

A request to the service takes longer than `--version`, `doctor` or
`completion` takes to finish, so a launch that started one at once was cut off
partway through its handshake and delivered nothing, and a command a shell
prompt runs reached for the network every time. The sender waits three
seconds, so a command that ends first makes no request and a session sends.

`tests/grace.rs` holds a waiting report and a listener for the first second of
a launch and finds neither a connection nor a change to the report.
`tests/launch.rs` still delivers the report once the launch has run longer.

CRASH-6 states it.

---------

Co-authored-by: Brian R. Bondy <netzen@gmail.com>
…he picker, and when a renewal could not be saved (#3182)

* Say in the terminal picker when the ChatGPT account's models could not be listed

A person signed in to ChatGPT who opens `/model` finds no ChatGPT rows when the
listing cannot be read, or when the service refuses it in a code that names the
account, and nothing says why. The desktop picker already warns.

The terminal picker now writes a note in the transcript when it opens, at rest
or mid-turn. For an unreadable listing the note names the command to sign in
again and how to name a model. For a refused one it is the refusal's own
sentence, which does not send the person to sign in again. An account nobody
signed in to and a listing that was read, empty or not, say nothing.

CHATGPT-9 states it, and its Known costs no longer list the terminal's silence.

Part of #1106

* Say what a ChatGPT account reaches when the sign-in is stored

`bravebot auth login chatgpt` ended by telling the person to pick a model in
`/model`, whether or not the account reached any. It now says the sign-in is
stored, asks the account's listing, and says one of three things: pick a model
in `/model`, the account reaches no model, or the listing could not be had. A
listing refused in a code that names the account is said in that code's
sentence, which does not send the person to sign in again. The sign-in stays
stored and the command succeeds in each case.

The agent crate re-exports `Model` and `Refusal`, the types `AccountModels`
already exposes, so the command and its tests can name them.

CHATGPT-8 and CHATGPT-9 state it. CHATGPT-2, "What is built" and the Known
costs now say the command sends a request to the serving host that is not a
turn.

Part of #1106

* Tell the person when a renewed ChatGPT sign-in could not be saved

When the authorization server replaces the refresh token and the file cannot
take the new one, the process keeps it in memory and writes it again before each
later request. Nothing told the person, who found the sign-in ended at the next
start.

A turn now gives a notice after the request that renewed it, and when the turn
ends if it has not been given, so a renewal made by the goal check or a
processor is reported in its own turn. It is given once for as long as the file
stays unwritable, and again after a write succeeds and a later one fails. The
sentence names no path or system error. It says to check that the folder has
room and can be written to, and to sign in again if the next start reports the
sign-in ended. A renewal made outside a turn is reported by the next turn that
makes a request.

CHATGPT-7 states it. Its Not built paragraph is removed, the clause moves to
the list of what is built whole, and CHATGPT-5 and the Known costs say what the
agent now receives and what the notice leaves out.

Part of #1106

* Test that a turn says a renewal the file could not take where it was made

The two calls in the turn that say it had no test: the tests of the state use a
record of their own. A test binary of its own, since the record is process-wide
like the renewer, runs real turns and orders what the reporter is told. The
notice follows the request that renewed it and comes before the report that
follows, is not repeated at the turn's end or in the next turn, and a renewal
made after that report is said when the turn ends.

A function marked `doc(hidden)` records the failure for the test, since the
renewer's hosts are compiled in and it cannot be made to fail from outside.

CHATGPT-7 lists the test.

Part of #1106
… SSE (#3177)

* Expose the regex automaton and the SSE decoder's limit to the fuzz targets

Regex::matches_by_automaton answers from the NFA alone, which skips the
literal shortcuts that Regex::matches takes first, so a fuzz target can hold
the two to one answer on generated input.

SseDecoder::with_limit and SseDecoder::held let a fuzz target build a decoder
with a limit far below the 16 MiB every caller gets and read how much it
holds. At the real limit no input a fuzzer builds could reach the bound.

All three are #[doc(hidden)]. Their unit tests pin what a target relies on:
that the NFA runs where a literal would answer, and that held counts the bytes
waiting for their newline.

Part of #3144

* Add a fuzz package with targets for regex, diff, the event stream and SSE

fuzz/ is a cargo-fuzz package with its own workspace and lockfile, so the root
workspace never compiles libFuzzer's C++. Its lockfile began as a copy of the
root lock and adds only libfuzzer-sys, arbitrary and what they need. It holds
four targets:

- regex compares the engine with an evaluator that reads the syntax tree a
  pattern was rendered from, holds Regex::matches to Regex::matches_by_automaton,
  and checks the limits on pattern length and group depth.
- diff holds a diff to the lines it keeps, the rows it draws and the hunks that
  put the first text back, and holds replace and changed_region to their
  documentation.
- event_stream decodes frames built from fields, the last of them damaged with
  its checksums computed again, and checks that any cutting into reads gives
  the same events.
- sse reads lines of known meaning through a decoder built with a small limit,
  and holds the decoder to that limit and the accumulator to what its chunks say.

make fuzz TARGET=<name> runs one target, and make check-fuzz lints, builds,
replays the seeds and runs each target. docs/development/fuzzing.md says how to
add a target and what to do with a crash. make bump-version refreshes
fuzz/Cargo.lock with the other files that state the version.

Part of #3144

* Address review: say why the diff target's bare helper strips both terminators
* Hold a session record in one process at a time

A process that resumes a record takes an exclusive lock on `<id>.lock`
beside it and keeps it for as long as the session lives. A session that
began in the process takes the lock with its first write. A second resume
of a held record is refused with the session's id and `bravebot --fork <id>`.
That covers `--resume`, `--continue`, the resume list, `/resume`, a one-shot
run given a task, the desktop's `session.open`, and `attach` or `reply` on a
stopped background session.

A record counts its writes in `revision`. A save, name, link or note does
not replace a record whose revision is not the one the session last read or
wrote, and a resume whose record changed while it was opened is refused. A
record with no revision is replaced by any writer. This holds a record where
no lock can be had.

Two terminals on one session cannot replace each other's turns, so the
untrusted rule TRUST-4 records for a file written from fetched bytes is not
erased by a save from an older copy (TRUST-6).

Deleting a session removes its lock when no process holds it, and the
retention sweep removes a lock with no record by its own age.

SESSION-38 specifies the rule. CLI-25, BG-9, TRUST-6, STATE-4, SESSION-30
and CLI-33 are updated to match.

Closes #3173

* Pin the terminal's start and the desktop's session.open to the lock on a record

`restore_resumed` returns the refusal for a record another process holds
before it shows or restores anything, and `session.open` answers a bad
request that names the session and `bravebot --fork <id>`. Each test fails
when a held lock stops refusing and passes with it.

SESSION-38 names both tests.

Part of #3173

* Return from remove_lock whether it removed the lock

The sweep counts a removal by what `remove_lock` returns, and
`is_open_elsewhere` leaves the lock it takes to drop with its file. That
removes the `let _ =` sites the change added over the base, which
`check-lint-increase` holds the session crate to.

Part of #3173

* Cover the held background host and a pull request's list in the resume refusals

`a_record_a_terminal_holds_is_not_resumed_or_started_again` also starts
`__bg-host` on a held record and expects it to fail naming the session.
The list `--from-pr` opens refuses a held record on Enter as the plain list
does. The comments on `Held` that restated its fields are dropped.

Part of #3173

* Wait for a closed session's work before refusing its record in session.open

A `session.open` that finds its record held, or written after it was read,
waits for up to two seconds for the threads still working for sessions the
bridge closed, then opens from a fresh read of the record. A turn that has
ended may still be writing its record, so a conversation reopened as it was
closed is opened, and a record written after it was read is read again.

The bridge tests that reopen a session wait for the first window's work
with `shut_down`, and the terminal and desktop handoff test does the same
before the terminal resumes the record.

SESSION-38 says so.

Part of #3173
* tui: pick a row of the /effort and /config pickers with a click

A left press on a row puts the cursor on it and a second press on the same cell takes it, as Enter does. Nothing else the mouse does leaves the picker. Part of #2685.

* Address review: pin regions() to where draw renders the picker rows
* tui: put the caret where a click lands in the prompt box

A single click that sweeps nothing on a cell of the box's text moves the
caret there, read through the same wrap, row window and row lead the box
is drawn with. A marker is entered at its start. A drag, a double click,
the scroller, a history search, the vi box and the files state leave the
caret alone.

Part of #2685 (MOUSE-16).

* Address review: a picker over the box takes the click, and test each refusal

offset_in_the_box answered for a picker painted over the box, so a click on a picker cell moved the hidden caret. Refuse while one is open, and pin the history search, files state, picker and vi refusals with a test that fails with each guard removed.
…essed, say why an account's turn failed, and offer built-in model names when its list cannot be read (#3196)

* Add ring and ruzstd and a test-hosts feature for the ChatGPT sign-in

ring becomes a direct dependency of bravebot-skus, for the RS256 signature check of the ID token.
It is already in Cargo.lock through rustls-webpki with the same features, so the lock gains the
one line that names bravebot-skus as a user and nothing is built twice. It has a build script and
C and assembly, which every binary already carries.

ruzstd is a dependency of bravebot-aichat, for the zstd body of a request to the ChatGPT account.
It is pure Rust with no build script and no native code, and brings twox-hash for the frame's
checksum. The zstd crate would compile libzstd for every cross-build target.

test-hosts is a feature of bravebot-skus and bravebot-config that only the dev-dependencies of
bravebot-cli enable, so a test can point the sign-in and the account's requests at a stand-in.
No dependency, build or release script enables it.

Part of #3178, #3179 and #3180

* Verify the ID token of a ChatGPT sign-in against the key set

The code exchange's reply must hold an ID token, and the sign-in stores
nothing until it verifies: RS256 only, with no crit, under the key the
kid names in the key set fetched from auth.openai.com with no credential
and no redirect; then the issuer, the audience, the expiry, the nonce
the sign-in sent and the subject. No other claim is read, and the
command says which step stopped it in a sentence that quotes nothing.

The signature is checked with ring, which rustls already brings.

Closes #3179

* Point the ChatGPT sign-in and the account's requests at a stand-in in test builds

The test-hosts feature of bravebot-skus and bravebot-config reads
BRAVEBOT_TEST_CHATGPT_STAND_IN as the base of the authorization server,
the key set and the serving host. Only the dev-dependencies of
bravebot-cli enable it, so the binary cargo test runs has it and a
release does not; a build without it holds no code that reads the
variable, and a release build with it does not compile. A layering test
fails where a manifest enables it anywhere but dev-dependencies.

Part of #3180

* Test that no value of a ChatGPT sign-in reaches an output of a run

The built binary signs in against a stand-in in a terminal, renews a
refused token, answers a turn and ends the sign-in when its refresh is
refused, and every refusal repeats every value the stand-in has seen.
The sign-in's terminal less the authorization URL, each command's
streams under --trace and the debug log, every file left in the home
and the environment of the program each turn starts hold none of them.

Part of #3180

* Test that an incognito session writes the renewal of its ChatGPT sign-in

The built binary runs a turn with --incognito over a stored sign-in
whose access token is within the minute of its expiry, against a
stand-in, and the file afterwards holds the renewed tokens with the
client and host it had.

Closes #3180

* Send the body of a request to the ChatGPT account as a zstd frame

A request to the account carries its JSON body as one zstd frame with
`content-encoding: zstd`, whatever the body's size. The request states the
frame's length, and the 1 MiB limit applies to the frame: a frame over it is
not sent, spends no token and is refused as a body the service refused, so the
turn shortens the conversation. A body over 1 MiB as it is built and under it
compressed is sent. A gateway's request is unchanged and carries no
`content-encoding`.

The encoder is ruzstd, which has no build script and no native code. It writes
one level, roughly zstd level 1, with the frame's checksum, so frames are about
1.4 times the size of libzstd's default level on request-shaped JSON. libzstd
decodes them through its command line tool, Node's zlib and Python's
compression.zstd, for bodies from empty to 8 MiB and for ones that do not
compress.

CHATGPT-10 states the encoding and the limit on the frame, and its Not built
paragraph, What is built, Decisions left open, Known costs and What the exchange
has to record are updated. BACKEND-61 states the body and drops the zstd body
from its Not built.

Closes #3178

* Carry which failure of a ChatGPT account a failed turn was

The diagnosis of a failed turn gains `account`, one of the closed values of
CHATGPT-8: a step of the sign-in, the refusal that names the account, or the
class of a failed renewal. The agent copies it from the account's error and
compares nothing. The desktop's failure payload carries its fixed name as
`account`, null for a failure that did not come from the account. The planner
is told the category and the request count only, as before.

The value is not worded yet, so the terminal and the desktop say what they said.

Part of #3145

* Say a ChatGPT account's failure in its own sentence in the terminal

The failure line of a turn that failed in the account's own way is the sentence
of CHATGPT-8 for that failure: not signed in, the sign-in has ended, the token
was refused, the sign-in file cannot be read, the usage limit, the account may
not be used this way, or a renewal that was refused, rate-limited, unavailable,
incomplete or not completed. The terminal chose the line of the category before,
so each of them read as the service rejecting the credentials or the request,
with no command to run.

The sentences are catalog messages worded as the one-shot run's report words
them, in English and French, and a test holds the two equal. The sentence is
the whole reason, so no status or count of tries follows it. The session record
keeps the same line in the terminal and the desktop. A failure with no account
value keeps its category line, status and count. The desktop still words the
failure from its category.

Part of #3145

* Say a ChatGPT account's failure in its own words in the desktop

The failure card of a turn or a run that failed in the account's own way is
worded from the `account` name the bridge sends, one title and sentence for each
of the eleven. The sentences that send the person to sign in name
`bravebot auth login chatgpt` and say to run it in a terminal, since no window
starts the sign-in. The usage limit and the account not being usable this way
are two cards and neither says to sign in again. A name the table does not hold
is treated as absent: the card is the category's and the name is not drawn.
Every other failure keeps its card.

The spec's two Known costs about the terminal and the desktop saying why a turn
failed from its category alone are closed, and one records that the sentences
are written in three places.

Closes #3145

* Offer the compiled model names where the ChatGPT account's listing cannot be read

Where the listing cannot be read because the token could not be had, the request failed or its
body is not a listing, both pickers offer sixteen model names compiled into bravebot under the
chatgpt identifier, and say that the list is built in and that a row may name a model the account
cannot reach. A listing the service refuses in a code that names the account, and one it answers
empty, offer nothing, as before. The sign-in command says the same where it asks for the listing.

The names are the fallback set of opencode's source at commit ac68d6a929. None has been observed
against the service.

Closes #3134

* Address review: the window draws the agent's sentence for an account failure

The bridge sends the terminal's catalog sentence beside the account's name, so the
desktop keeps no table of the wording and the compiled-list warning reads from the
catalog too. The spec states the present behaviour of a usage limit's wait, and the
stand-in header comment says why instead of what.
…y changes with a stated hook bypass, and read issue text from any writer (#3185)

* Read an issue's text whoever wrote it

`pr-fix.py issue` printed only what members of the brave organization wrote and
replaced everything else with a marker, so an issue or comment written by the
bot's own account reached an agent as `[Content filtered ...]` and could not be
acted on. It now prints the title, body and comments of every writer. A writer
whose login is not a plain login is shown as `unknown`, so a login cannot carry
text into the header above what it wrote. The last line says the text is data
about what to build and that no command is run and no link opened because it
says to.

The membership lookup, its markers and its selftest are removed, and the pr-fix
and implement-issues skills no longer say to implement only what organization
members ask, or to avoid `gh issue view`.

An agent now acts on text written by anyone who can comment on the repository.
The text was data before and stays data: both skills still say to run no command
and open no link because it says to.

* Make implement-issues finish every requirement of an issue

The skill ended with `Part of` whenever an item could not be finished, and the
session that ran it was the only judge of whether it could not. It did the work
itself for a single group, and a dependency or a manifest edit was a reason to
stop.

The orchestrator now writes a checklist before any work: one row for each thing
an issue asks for, and for each place a governing spec says something is not
built or an earlier pull request left a case undone. A worker subagent does each
group's rows in a worktree of its own. A verifier that has not seen the worker's
report checks the tree against the rows, and the orchestrator starts another
round for what is unmet, for at most three rounds. `Closes` is the default, a
row is blocked only for a short list of causes the orchestrator checks, and a
row is never parked on the issue it belongs to.

A worker may add or change a dependency. The commit hook refuses a staged
dependency file for this account, so that commit alone is made with
`git commit --no-verify`, each time. The commit says so, the pull request body
opens with a warning callout listing each such commit and its DEP-001
justification, a comment on the pull request repeats it, and the final report
starts with it. A check lists every commit that touched a dependency file
against the callout.

`## What is impossible` becomes `## What is blocked`: a dependency, a manifest
edit, a hook bypass, a design that needs plumbing, and a test seam are work.

* Give the dependency callout a slot for each statement DEP-001 asks for

The callout template had room for what a dependency buys and what the
alternative costs. What the dependency brings (transitive crates, build
scripts, native code, the targets it builds for), its licence and its upkeep
were asked for in the same section and had no place in the pull request.

The template now has a slot for each of those statements and a form for a
dependency that is changed rather than added.

* Refuse a pull request body whose callout leaves out a dependency commit

`pr-fix.py open` lists the commits on the branch that touch a manifest or a
lockfile and refuses a body whose first `> [!WARNING]` block does not name
each of them by at least seven characters of its hash. The implement-issues
skill left that comparison to the agent.

A bypass of the commit hook on a commit that touches no dependency file
leaves no trace in the history, so nothing checks for it, and the skill says
so.

* Check what earlier work says is built, and keep the bypass line whole

A spec's own list of edits to other specs is a source of checklist rows, since
an issue can be left unfinished by a list nobody opened. A spec sentence that
says something is built does not show the code does it, so a verifier now checks
the rows earlier work claims to have built against the tree before any worker
starts, and the orchestrator adds a row for each one it finds unmet.

The `Hook bypassed:` line of a dependency commit is one unwrapped line so that
`git log --grep 'Hook bypassed'` finds it. A commit that says it bypassed the
hook and touches no dependency file is reworded.

A group whose conflicts are more than a few lines, or touch code two groups both
changed, is combined by a worker and checked as any group is.
… the dependency policy (#3192)

* Measure what the event stream decoder allocates for a frame that claims too much

A frame whose prelude claims more than 16 MiB is refused as the prelude arrives. A decoder that
reserved the claimed length first would pass every property the event_stream target held it to,
since none of them read how much it allocated.

fuzz/src/allocation.rs adds Counting, a global allocator that wraps the system one and counts the
bytes the calling thread holds, peak_growth, which gives the most a closure held at once, and
counting, which says whether Counting is the global allocator. The event_stream target registers it,
checks on every input that it is registered, and fails when a stream holding a prelude with a
correct checksum that claims more than MAX_FRAME_BYTES makes the decoder allocate a sixteenth of
that or more, with the stream read whole and cut. claims_more_than finds such a prelude after the
frames before it. No other target registers the allocator.

A global allocator is an unsafe impl, so fuzz/src/lib.rs denies unsafe_code and the impl allows it
with a reason, while every other module and the target forbid it. The unit tests pin that a buffer
is counted at its size, zeroed, grown and shrunk, that the peak is what was held at once, that
memory held before the call is left out, that another thread's allocations are not counted, and
where claims_more_than stops. LAYER-4 names the fuzz package among the sites of unsafe.

Part of #3144

* Run the fuzz build, replay and a short run in CI where the fuzz package or a crate it builds changed

The fuzz package builds with a nightly toolchain in a workspace of its own, so no CI job compiled
it, and a change to a function a target calls could break its build with every check green.

contrib/affected-checks.py has a fuzz area. Anything under fuzz/ needs it, as does the root
manifest and a crate the fuzz manifest names or any crate those name, found the way the crates the
desktop app builds are. The manifest and lockfile under fuzz/ also need the dependency policy. The
area has no local gate, since make check-fuzz needs a nightly toolchain and cargo-fuzz, so
make check-affected says that and runs nothing for it.

The Fuzz build and replay job in ci.yml runs make check-fuzz where the area is needed, uploads
fuzz/artifacts/ when it fails, and its name is a context in contrib/required-checks.txt. cargo-fuzz
is installed with make fuzz-install, at the version the Makefile names. taiki-e/install-action has
no manifest for cargo-fuzz, and its fallback fetches whichever cargo-binstall is current.

Part of #3144

* Run each fuzz target for an hour every week and keep its corpus between runs

The Fuzz build and replay job runs each target for seconds, which finds what a short run can. A
weekly workflow runs each target for an hour on the default branch, from the corpus the last run
left, so that the inputs an hour grows reach code a short run does not.

.github/workflows/fuzz.yml takes its legs from FUZZ_TARGETS through make fuzz-targets, so a target
added to the Makefile is fuzzed without another edit. A leg restores its corpus from actions/cache,
runs make fuzz, reduces the corpus with make fuzz-cmin and saves it, also when the target stopped
on a crash, and warns when no corpus was restored. Only this workflow saves a corpus. The corpus is
held to 50 MB before it is saved, since the repository's caches share a 10 GB allowance. A crash, a
timeout or an out-of-memory stop uploads fuzz/artifacts/<target>/ as an artifact kept for 30 days
and fails the leg. The workflow files no issue. It can be dispatched with a target and 1 to 300
minutes, and a pull request that changes the file runs one target for one minute, so that its steps
run before it is on the default branch.

make fuzz and make fuzz-cmin share one check that TARGET names a fuzz target.

Part of #3144

* Hold the fuzz package's dependencies to the dependency policy

fuzz/ is a workspace of its own, so make check-deps never read its graph, and deny.toml said
nothing about libfuzzer-sys, arbitrary or what they depend on. make check-deps now also runs
cargo-deny over fuzz/Cargo.toml with the same deny.toml. The skip entries describe the root graph,
so that run does not report them. The licence exception describes the fuzz graph, so that run fails
on an exception that matches nothing, and the root run does not report it.

libfuzzer-sys is (MIT OR Apache-2.0) AND NCSA, and no licence in deny.toml is NCSA. It gets an
exception that allows NCSA for that crate alone, with a comment saying why. cargo-deny rejects a
reason key on a licence exception, so contrib/check-deny-reasons.py fails a licence exception that
has no comment on its line, above it, or above its table header, as it fails an exception elsewhere
that has no reason. fuzz/Cargo.lock does not follow the root lock on its own, which fuzzing.md says.

Part of #3144

* Leave the event stream allocation property to a pull request of its own

This reverts "Measure what the event stream decoder allocates for a frame that claims too much".
The counting allocator, the allocation bound of the event_stream target and the deny(unsafe_code)
root of fuzz/src are an unsafe impl and a new property, and a pull request of their own can review
them. The CI job, the weekly workflow and the dependency policy in this one need none of them.

Part of #3144
* tui: pick a row of the /theme picker with a click

A left press on a row of the /theme picker puts the cursor there, with the theme under it
previewed as for a key, and a second press on the same cell takes it. Nothing else the mouse
does leaves the picker.

Part of #2685 (MOUSE-17).

* tui: test the /theme picker's click wiring against a drawn frame

`theme_prompt::choose` takes its events from `run`, which reads them from a closure along with the
time each arrived. A test plays two presses on the cells where a row was drawn, read from the
buffer and not from `list_picker::regions`, and checks that the theme of that row is returned
with its preview in force. The wiring in `choose` is now exercised: the rectangle taken from the
draw, the mouse branch, and returning the chosen theme on a second press (MOUSE-17).
The label exists on GitHub and is on issues filed from the BraveBot researcher, but the page that says what every label means did not describe it. Say what files those issues, the labels it applies, and how to close them.
…ms too much (#3199)

A frame whose prelude claims more than 16 MiB is refused as the prelude arrives. A decoder that
reserved the claimed length first would pass every property the event_stream target held it to,
since none of them read how much it allocated.

fuzz/src/allocation.rs adds Counting, a global allocator that wraps the system one and counts the
bytes the calling thread holds, peak_growth, which gives the most a closure held at once, and
counting, which says whether Counting is the global allocator. The event_stream target registers it,
checks on every input that it is registered, and fails when a stream holding a prelude with a
correct checksum that claims more than MAX_FRAME_BYTES makes the decoder allocate a sixteenth of
that or more, with the stream read whole and cut. claims_more_than finds such a prelude after the
frames before it. No other target registers the allocator.

A global allocator is an unsafe impl, so fuzz/src/lib.rs denies unsafe_code and the impl allows it
with a reason, while every other module and the target forbid it. The unit tests pin that a buffer
is counted at its size, zeroed, grown and shrunk, that the peak is what was held at once, that
memory held before the call is left out, that another thread's allocations are not counted, and
where claims_more_than stops. LAYER-4 names the fuzz package among the sites of unsafe.

Part of #3144
…on a cold cache (#3201)

CI starts with an empty transform cache. The first test in a file that renders the app compiles
react-native's modules while it runs, which takes about 2.5 s on an idle machine and more than the
default 5 s when the runner is busy. With the cache cleared and the default workers, race.test.tsx
and the first test of five other files failed on that limit. testTimeout is 30 s, and a test that
hangs still fails after it.
contrib/measure-flakes.py passes --label flaky-test for every issue it opens, so
label:flaky-test lists the flakes the Test determinism workflow files. It applies no other label,
since nobody has read what it files.

The issue-poster definition applies flaky-test to an issue about a flaky test filed from a session.
labelling-issues.md describes the label and holds its creation command, which check-issue-posters
requires of every label the definition writes. checks.md and contrib/README.md say the workflow's
issues carry it.
netzenbot and others added 26 commits October 26, 2026 07:15
… the whole plan (#3346)

* Generate a select's text once where every one of its forms says the same

A translation may pluralise only a message whose reference states the forms of its count, so a
reference that wants a translation to tell the forms apart has to write them as a select, even where
English does not. Written alike, those forms generated an `if` over equal branches, which clippy
refuses in the generated code.

A select whose variants all say the same is now generated as that text, once, for the reference, and
a translation keeps its own forms. LOCALE-5 says the reference may do this, and a test pins three
things: no choice among equal forms in the reference, the translation's own forms kept, and a select
in which one form differs still chosen between, so a form a language needs is not dropped.

Part of #3319

* Show a long plan's rows still to do first in the info panel and count what it leaves out

A plan longer than the panel's room drew its first rows and counted the rest as more. A plan of
eight finished rows followed by two pending ones drew only finished rows, and the pending ones were
the rows the count hid.

The panel now chooses the rows from each row's status alone: the task in progress, then the pending
rows, then the finished rows nearest the first row still to do (the earlier of two as near), drawn
in the plan's order. The row after them counts what it left out in words of its own, as `+3 to do,
+40 done, +2 cancelled`, with the rows still to do first and a kind with none left out. A cancelled
row is not counted as done, and a count of finished work cannot be read as work still to come. A
status the panel does not recognise reads as outstanding. Where the room cannot hold every row still
to do and the count, the count keeps its row and the rows still to do that do not fit are counted in
it, which PANEL-10 records with its reason.

The French catalog translates the three counts, the done and cancelled ones with plural forms. The
reference states the done and cancelled counts as selects whose English forms are alike, since a
translation may pluralise only what the reference does, which the previous commit lets the generator
write as the text once.

PANEL-10 states the selection and the counts, and the tests of the old window are replaced by tests
of the order, the priority of the task in progress, the filling of spare room, each kind of count,
the plan at no rows, one, twelve, fifty and the least height, and the choice by status and not by
text. The sessions page and the changelog describe the new rows.

Part of #3319

* Add /todos, which prints the whole plan with every task's status

The info panel draws the rows it has room for, each cut to the width of the panel, so the plan the
planner is working to cannot be read whole there. /todos puts the plan the session holds in the
transcript: a heading with how many tasks are done, and how many are cancelled where any are, as the
planner's own result counts them, then every task in the plan's order with its mark, its status in
words, and its text wrapped to the width. A session with no plan says so. The command takes no
argument, starts no turn, sends nothing, and is carried out as it is typed while a turn runs.

A task that is neither completed nor cancelled is drawn with the mark and ink the panel gives it
when the command is typed: filled, as work being done, while a turn runs, and hollow and dim while
none does, when the whole row matches the panel's. Both the plan and that state are kept as of the
press, so the entry does not change when the turn ends or the planner reports another plan. The
status word is the planner's either way.

The text of a task is the planner's, so it is laid out by marked_rows as the lines of a call's
result are. Control characters, a line break among them, are drawn as visible characters, and every
row a task breaks into has a margin the interface draws, with the mark and status on the first row
only. A task that writes a mark, a status or a margin into its text draws it after the margin of the
mark and status it carries. No row is wider than the transcript at any width: the margin is
shortened to leave the text two columns, the status word is cut with an ellipsis where the margin
cannot hold it, and a single column holds the mark alone. The inks are the ones the plan has under a
turn, taken out of todo_lines so both read from one place, and the margin is written from named
column counts so the printed margin and the tests derive from the same ones.

The printed plan is an entry of its own, held apart from the plan a turn worked to, so it is not
saved with the session as any turn's plan and is not exported.

CMD-28 specifies the command, VIEW-37 the drawing, and CMD-8 lists the command among those carried
out as typed. The commands reference, the interactive mode page, the sessions page and the changelog
describe it.

Part of #3319

* Add the todos key action, which prints the whole plan on Alt-A

The `todos` action prints the plan as /todos does, on Alt-A by default. It is one of the chords a
settings file can move, so fifteen actions are movable (fourteen where there is no suspend). It is
answered in the ladder every key mode shares, so it works at the box, and while a turn runs, and
says what /todos says where there is no plan. In the files state, the watch view and the pickers
that take no letters it does nothing. Where the prompt search, a search typed in the transcript
scroller or the model picker takes letters, it is read as the letter it carries, as is any chord a
mode did not ask the bindings about, and INPUT-32 says so once. The `?` list names the chord in
force.

Alt-A is the default because Alt-T would contest a `trail` binding that an Alt-T remap of the
audit-trail key already holds, and Alt-P and Alt-G read as plan mode and goals. It follows the
outputs action on Alt-L, which has no click target either. A `keybindings` block that already put an
action on alt-a gets that action back on its default, as the outputs chord's default does for alt-l,
and the changelog says so.

INPUT-32 counts the fifteen and lists the action, and CMD-28 and VIEW-37 say the key prints what the
command prints. The keybindings tests are two, one for the default and the move and one for the
contest, and a test of both entries compares what the key and the command print. Three tests pin the
exception: the key prints nothing in the files state, and is typed as the letter in the prompt
search, in the scroller's search and in the model picker. The commands reference, the configuration
and interactive mode pages, the command-line key table, the sessions page and the changelog describe
the key.

Part of #3319

* Name the key that prints the whole plan on the info panel's plan

The plan section of the panel ends with a row naming the key, `alt-a whole plan` by default, so a
person who sees a plan cut to the room, or a task cut to the width, finds how to read it whole. It
is drawn where the plan has three rows of room or more, does not fill the room exactly, and has
every row still to do drawn beside it, so the row takes the place of no row still to do and of no
task of a plan that fits the room. It is cut to the width of the panel, and a moved chord is the one
named. Three rows is the least that hold a task, the count and the key, and a test pins it.

The layout chooses the rows once. `choose_rows` returns the cut and whether the key row follows it,
decided from that cut, and `plan_rows` draws the cut it is given.

PANEL-10 states the key row and lists the tests that show the plan can be read whole through the
key. The panel tests of the cut plan are written against the key row, with a property test that the
key row never takes the place of a pending row or a task in progress. The sessions page, the
commands reference and the changelog describe the row.

Closes #3319

* Address review: drop doc comments that restate the code
…age (#3345)

The path was cut to the width less a fixed 14 columns, which left the French
count 11 columns, so it was clipped mid-word on a long path. The path is now
cut to what the rendered count leaves.

Closes #3276
…service takes, and send images over 1 MiB (#3347)

* Ask a start about the model `-i` names

`before_the_session` takes the model the command line named and asks about it
before the model in force, as a one-shot run does. `bravebot -i "<prompt>"
--model chatgpt/<model>` starts when a stored ChatGPT sign-in serves the model
named, and a model nothing serves ends the start with the refusal for no
service. `interactive` makes no second check, since `before_the_session` asks
about the named model. `--plain` and `--bg` pass no model, since neither takes
`--model`.

Part of #1106

* Ask a start which of a ChatGPT account's models to use

A person who has only signed in with a ChatGPT account has no model name to
give, and a session that would list the account's models does not open until a
model is served. `bravebot`, `bravebot --plain` and `bravebot --bg` show the rows
the pickers list for the account, numbered, and ask which to use before they
refuse. A number records the pick through `record_model`, which the picker
shares, and the start opens on it. The start says the pick is remembered only
where it reads that name back; otherwise it says the name could not be
remembered and ends as a decline does. An empty answer, the end of the input and
any answer that is not a row number decline, and the start is refused with the
lines it has where nothing can be asked.

Nothing is asked where a person cannot be (a stream that is not a terminal, an
incognito session), where a model was named on the command line, or where a
service is configured beside the sign-in. The account is asked for its listing
only where a person can be asked. Where it offers no row, the refusal says why in
the sentence the sign-in command uses and is built from the sign-in as it stands
after the listing, since asking for the listing removes a sign-in that has ended.
The compiled names that stand in for a listing in a picker are not offered at a
start. The stand-in serving host answers a listing.

Part of #1106

* Name commands that work in the advice for a stored ChatGPT sign-in

The refusal for a start that nothing serves, where a ChatGPT sign-in is stored,
names `bravebot -i "<prompt>" --model chatgpt/<model>` and `bravebot "<task>"
--model chatgpt/<model>`, says that /model lists the account's models once a
session is open, and says that `bravebot` started on its own asks which one to
use, in a terminal outside an incognito session, where the account lists its
models. A one-shot run, a start that names a model and `doctor` end in the same
refusal and never ask, so the last sentence is about the start that does.
`bravebot --model chatgpt/<model>` alone starts nothing and is not named. The
French sentence says the same.

One test runs each command the refusal names, as typed. Another runs each start
that shows the refusal without asking and holds that it asks no question and does
not ask the account.

Part of #1106

* End the ChatGPT sign-in command with steps that work

After a sign-in is stored, the command reads whether a start would ask which model
to use. Where one would, it says to run `bravebot` to be asked, or to name a model
in `bravebot -i "<prompt>" --model chatgpt/<model>` or `bravebot "<task>" --model
chatgpt/<model>`. Where one would not, because a Bedrock or gateway block is
configured or a model in force is served, it names the commands and says nothing of
a question. The two sentences for a listing that could not be had name the same
commands and promise nothing, and /model is named only as what lists the models
once a session is open.

The driver of the sign-in is in the shared test module so a test can make a real
sign-in under Brave's own hosts: with nothing else configured, with a gateway and
with a served model, and run the start that follows each.

Part of #1106

* Mark the model in force in the /model picker

The `/model` picker takes the model in force as its current row: the pick where the
session has one, and otherwise the configured default, which the `model` key of the
settings file sets. With a ChatGPT model in the `model` key and no pick it marks and
opens on that model, and on Brave's Automatic row only where Automatic is the
default. `model_in_force` decides this for the picker, the terminal's `/model` and
the budget lookup.

The note that a ChatGPT session keeps the level it began with reads the model in
force, so it is given for a session on the settings model. Tests hold both.

Part of #1106

* Name only commands that work in the picker's notes and the docs

The notes the picker leaves where the account's listing or a gateway's could not
be read name a model with `bravebot -i "<prompt>" --model <model>` and `bravebot
"<task>" --model <model>`, the forms the refusal names, in English and French.
BACKEND-19, the line of the ChatGPT spec that describes the notes, the configuration
page and the getting-started page say the same. The configuration and
getting-started pages say that `bravebot` started on its own asks which of the
account's models to use where nothing serves the model in force.

The desktop sends no command line. Its warnings name only the sign-in, and a test
holds that each listing that gave no row sends a warning and none carries the flag.

Part of #1106

* Read the model in force in one function wherever the pick or the default is meant

`model_in_force` is the one place the tui writes the rule that the pick answers
where there is one and the configured default otherwise. The sign-in a session
makes before a turn, the refusal of a level a turn or a manifest run learned
(`refused_level_in_force`), the roster's ordering and the level the roster says
is read call it. A test asks `refused_level_in_force` about the model in force with
the model set by settings and with a pick. `list_models`,
`adopt_window_of_model_in_force` and `runs_on_chatgpt_account` take the pick and
read the default themselves, and are unchanged.

Part of #1106

* Take the inputs the roster lists for the model in force

The inputs the roster lists are taken for the model in force: the pick, or the
configured default where nothing is picked. A session on the settings model
carries the inputs its row lists, so a picture put to a model the listing says
takes text only is held to that. A test holds it.

Part of #1106

* Reach the idle /model list without a terminal and test it

`choose_model_with` decides what the idle `/model` offers and which row it marks,
and is given what puts the list in front of a person. `choose_model` passes the
terminal's picker. A test runs it with the model set by settings, with a pick and
with a row chosen.

Part of #1106

* Offer the seven models the service takes where the listing cannot be read

The compiled list held the 16 names of another program's fallback set. A signed-in account's service accepts seven of them and refuses gpt-5.5 and every -fast name with 400 model_not_found. The list is now the seven models the service's listing offers. CHATGPT-9 and its known costs state this, and the two observations are recorded in the observed list.

The -fast names are not offered. The service refuses them as models, accepts the service_tier priority and refuses fast. Whether the -fast names stand for that tier was not observed, and no tier is built.

The tests that took gpt-5.5 as a name on the compiled list use gpt-6-sol.

Part of #1106
Part of #3186

* Say a model the account does not offer in one sentence on each front end

A request for a model the account does not offer is refused with 400 and the body's error.code model_not_found. The turn ended with the status alone, and the 400 also made the client send the request again without the effort level and made the conversation shorten as for a body the service would not take.

The client now reads that code, compared as a whole, as a twelfth failure of the account, model-not-offered. Only a 400 was seen, and the code is read at any status. It is told as one sentence that says OpenAI does not offer that model to the account and that another can be chosen, in the terminal, the one-shot report, the session record and the window. It names no model, quotes nothing, sends nobody to sign in again, replaces no token and sends no second request. A body that holds only a detail, or error as a string, keeps its status.

Part of #1106
Part of #3186

* Send a ChatGPT turn whatever size its body is

The client refused to send any frame over 1 MiB to the serving host. The service takes plain bodies of 8 MiB and frames of 12.6 MiB, so a conversation with a 2.9 MiB picture ended before a request was made. The ceiling, the error that reported it and the tests that existed for it are removed. The zstd encoding stays.

The service refused a text field of 16 MiB and over, whose message states a maximum length of 10485760, with a 400. A refusal like that is reported as any refusal of the service is, by its status, and a turn answers it by shortening the conversation once. CHATGPT-10, BACKEND-61 and the website page state this, and the observations of sizes and of the frames this program writes are in the observed list.

Part of #1106
Part of #3186

* Test the refusals and the stream in the shapes the real service sends

The token endpoint refuses a refresh as {"error":"invalid_grant"} with a string error and the serving host refuses a request with an error object holding a code. The renewal reads the first and the client reads the second, and each already ignored the other's shape. The tests hold that with the bodies the service was seen to send: an object-shaped error naming invalid_grant, a 405 with an error object, a detail-only body, and the invalid_jwt, invalid_api_key and null-code refusals of a token on the serving host.

The serving host answers a stream in a chunked body with no content-type header. A test serves one that way, and the reply is read.

Part of #1106
Part of #3186

* Record what the account showed and correct the clauses it contradicts

Two changes to the ChatGPT spec, BACKEND-61 and the website page.

The observed list holds what a real ChatGPT account, whose plan is not recorded, showed of the sign-in, the tokens, the listing, the serving host and the program, as names, shapes, statuses and sizes: an ID token that verifies, the 403 the authorization endpoint gives a client that is not a browser, how the token endpoint and the serving host refuse a refresh and a token, the cache hits and misses by header and by effort level, the shapes of refusals, no native compaction, the effort values taken, a reply stopped at its ceiling, a picture and the model's own words in the history. The lists of what is stated and what is not observed hold what the observations leave open, each with the document or source that states it.

The clauses are corrected where the service differs. A refusal body is not an object with one field. The renewal reads invalid_grant from error as a string, which is what the token endpoint sends. The listing's effort names are not read. The service accepts a change of effort level and misses its cache once, which is why a session holds one level. The service has no native compaction for this token, takes the frames of the turns made through this program, and echoes the model asked for. The Known costs about an unobserved model echo and about a content size are removed.

Part of #1106
Part of #3186

* Say in the ChatGPT spec status that the command was exercised against a real account

The README row and the decisions section state that the command is built and exercised against a real ChatGPT account, and that what the account did not show is listed. The status stays proposed because whether OpenAI's terms allow this is a person's decision, which no test settles, and both places say so.

Part of #1106
Part of #3186

* State what was seen of the prompt cache in the effort page and comments

A real account's service hit its cache on 4 of 6 calls with all three session headers, on 3 of 5 with session-id alone, on 1 of 5 with thread-id alone or with x-client-request-id alone, and on none of 9 with none of them. It missed once at each change of effort level inside a session and hit again after. The effort page and the doc comments of AccountSession, holding_the_level and the task's session say that and no more.

Part of #1106
Part of #3186

* Correct two comments on the refusal codes and the listing row

One of the seven refusal codes, subscription_sharing_unsupported_capability, was seen as the error.code of a 400, and the other six were not. The comment on the codes says so. The comment on a listing row says why its fields are held as they arrived.

Closes #1106
Part of #3186

* Record that revoking a ChatGPT refresh token ended an access token minted before it

A call to the revocation endpoint with a refresh token was answered 200 with an empty body. Within seconds after it, an access token minted from that refresh token before the call, and not yet expired, was refused with 401 on the listing, an access token of another sign-in was still accepted, and a refresh with the revoked refresh token was refused 400 invalid_grant. That was one revocation of one account's sign-in.

Held::ChatgptAccount.outlives_revocation() is false, doctor prints no outlives line for the sign-in, and the message that said an access token may run to its own expiry and that this has not been observed is removed from both catalogs. CHATGPT-6, the Known costs about the revocation call and the code of a refused refresh, the unobserved list and the provider page state the observation and say nothing of other accounts, a longer delay, or signing out of the account or removing the program's access in its settings. The test that holds the record is renamed to what it asserts, and its verified-by lines follow.

Part of #1106
Part of #3186

* Record the ports and the client a ChatGPT sign-in used

Two sign-ins were completed, each through a loopback listener on a port the operating system chose, and the two ports differed. Two others, on other ports, were not answered in time, so nothing is claimed of them. A second sign-in made where none was stored registered a new client and a new host identifier, and the access tokens of both sign-ins were accepted by the listing at the same time.

The observed list of the ChatGPT spec holds both. The unconfirmed list says two ports were accepted and no other, and the unobserved list keeps whether OpenAI limits the clients registered for one host identifier. The provider page says two ports have been tried.

Part of #1106
Part of #3186

* Say what was seen of revoking a ChatGPT sign-in and that signing out and removing access were not observed

The surfaces the record names for ending a ChatGPT sign-in are signing out of the account and removing the program's access in its settings. The observation is of another one, a refresh token revoked at OpenAI's revocation endpoint, which this program does not call: an access token minted from it before the revocation was refused within seconds, in one account's sign-in. It shows nothing of the two surfaces or of other accounts.

Held::ChatgptAccount.outlives_revocation() is true, and doctor prints the line doctor-outlives-chatgpt-account in both catalogs: the access token was refused within seconds after the revocation at the endpoint (one account, one revocation, a call this program does not make), and whether signing out or removing access ends it has not been observed. The config test keeps the name a_chatgpt_sign_in_is_held_renewed_unaided_and_possibly_outlives_revocation, and the doctor test requires those words and rejects both silence and the claim that the token may run to its own expiry. CHATGPT-6, the CHATGPT-11 doctor sentence, the unobserved list, the Known costs about the revocation call and the provider page state the same.

Part of #1106
Part of #3186
…irectory, and draw what they did apart from what they refused (#3344)

* Take a relative path in /add-dir and /add-dir close

`/add-dir ../notes` replied "must be an absolute path", so a person working in a checkout had to
type the whole path of the one beside it. `/add-dir` and `/add-dir close` now take a path relative
to the working directory, which is the primary root that `/cd` moves, as `/cd` and the names in a
settings file already do.

`named_directory` in `app/directories.rs` is the one place a typed or settings-file name becomes an
absolute path, and `/add-dir`, `/add-dir close`, `/cd` and the names of a settings file all call
it. It reads a leading `~` first, then takes a relative name against the working directory. The
leading `.` and `..` of the name are taken out against the path of that directory, which is
canonical and so holds no link, and the remaining components are appended in order, so `../notes`
becomes the spelling an opened directory is recorded under. `/add-dir close` matches a name with no
`..` after a name as spelled before it asks where the name leads, so a link put where the directory
was cannot send that close to the link's target. A `..` after a name is left to the file system.

A relative name against a working directory whose name is not text is refused with the new
`session-directory-root-not-text` reason, in the refusal each command already writes, and nothing
is opened, trusted or closed. The string becomes a reach grant and a trust key, and a rendering of
such a name names another directory. An absolute name needs no working directory and is unaffected.

What is opened, recorded as trusted under its canonical key and named in the "added" note is the
directory the path resolves to, so `/add-dir ../` opens and trusts the directory that holds the
project. A refusal begins with the path as typed and then quotes the absolute spelling made of it.
`Workspace::add_directory` and `existing_directory` still require an absolute path, and every
refusal applies to the resolved path: a directory that does not exist, a file, a directory inside
the project, a credential location and `permissions.readsStayInWorkspace`. `--add-dir` on the
command line is unchanged.

`/add-dir close` alone is the close command, so a directory called `close` is named with a
separator, as `../close` does. The comment on that parse and its test say so.

TRUST-9 states the rule and lists the tests that pin it.

Closes #3330

* Draw what /add-dir did apart from what it refused

`/add-dir` and `/add-dir close` wrote a success and a refusal through `Session::note`, so both were
drawn in the one orange every note shares. Under `brave` that orange reads as red, so a directory
added looked like a third error beside two refusals.

A system entry has a tone, `Note` by default, which the code that writes the note sets from what
happened through `Session::note_done` and `Session::note_refused`. Only `note_lines` reads it: a
done note is drawn in `theme::ok()`, a refused one in `theme::fail()` and any other in
`theme::note()`. None of the three is `theme::running()`, the ink that marks untrusted content, and
no ink is chosen from the words of a note. Under a palette where every ink is the terminal's own,
the wording ("added", "could not add") is what tells the notes apart.

`add_directory` and `close_directory` write the added, closed and withdrawn notes as done and the
refused, not-closed and needs-a-path notes as refused. The names a settings file gives are opened
through `add_directory`, so their success is a done note, and `named_to_open` writes the same
"could not add" message as a refused note. The checkouts note and the notes `/cd` writes keep the
shared ink.

A refusal is not recorded as a `Speaker::Failure` entry. An export writes those under "Failed", the
status area repeats the latest one as the turn's reason and a turn is recorded under the first one
in its span, and a refused command is none of those. The tone leaves the speaker as it was, so an
export, `failure_said` and the recorded reason of a turn are unchanged, and a test holds each.

`inks_on_row_containing` moves from the render tests to `testutil` so the handler tests read the
drawn ink with the same code, and `plain_palette` is visible to the tests so the no-colour test
uses the palette `NO_COLOR` selects. VIEW-8 states which call sites write which tone and lists the
tests that pin it, and the transcript page of the website says the same.

Closes #3329
…3342)

While the state is open no character reaches the box, so a person cannot
type /diff to end it. FILES-3 and the website named /diff among the ways
out. They now name q, Escape, Ctrl-C and the panel chord, and say that a
/diff queued earlier and dispatched with the state open ends it.
* tui: hide the info panel with a click on its hide row

A click that sweeps nothing on the panel's last row, the one that names
the key hiding the panel, does what the key does. A drag, a double click
or a triple click is still a selection, and nothing happens over the
scroller or a history search. Adds MOUSE-21.

Part of #2685

* Address review: assert the cut rows are the hide row
…ind removes files (#3335)

end_files_if_nothing_written ended the state only when no file was left. When the
removed calls held the highlighted last file and others remained, state.selected
stayed past the list, so list_rows drew no highlighted row while the edits drawn
were the clamped last file's. The index is now held to the last remaining file.

Closes #3290
begin_unique checks each open session's handle id through id_taken, which
took a blocking lock on the state of every open session of the project. A
second session mid-turn holds that lock until its turn ends, and dispatch is
one thread, so the fork stopped the bridge answering the confirm.reply or
turn.cancel the turn was waiting for. id_taken now skips a session whose
state is held, as delete_session already does.

Closes #3208
* Drop the runs of spaces inside the spawn_agent task description

The literal kept the next source line's indentation as text, so the planner
was sent six runs of 41 spaces. End each line with a backslash like the
neighbouring descriptions, and pin it with a scan of the tool table.

Closes #3210

* Check every string of the tool table for runs of spaces

The test read only the source line that holds `"description": "`, so the later
lines of a description written across several lines, a description passed as
a positional argument, and a sentence built with format! were never checked.
It now serializes the tools as the planner is offered them, for each
combination of scheduling, watch arming and `run` availability, with the
advisor, propose_plan, message_session and load_tool tools and the
withheld-variables sentence added. It fails on any string holding two spaces
in a row and names the tool and the field.
`is_empty` listed fields by hand and left out `references`,
`references_unread`, `network_ignored` and the six model and agent
keys. A settings file holding only one of the first three made
`bravebot doctor` print "no settings.json" above the path of that same
file. The six model and agent keys were masked by `names()`; they are
read here too, so `is_empty` is false whenever `names()` is not empty.

Closes #3211
…leans (#3312)

* Name the flags manifest_conflict is given instead of passing four booleans by position

manifest_conflict took has_agent, has_advisor, has_output_schema and has_goal
as four bools in a row, so its call and its nine test rows could only be read
by counting. A Given struct names each flag, and a test row sets just the one
it is about.

* Name the flags manifest_conflict is given instead of passing four booleans by position

manifest_conflict took has_agent, has_advisor, has_output_schema and has_goal
as four bools in a row, so its call and its nine test rows could only be read
by counting. A Given struct names each flag, and a test row sets just the one
it is about.
The triage-issues intake kept only issues whose author has is_bot == false, and
the workflow files its issues as app/github-actions, so a full run never read
them and they received no importance, urgency or size. The intake now also
takes an open issue labelled flaky-test, a label only a person applies, and the
Step 6 check uses the same set. The labelling page says so under Flaky tests.
…ut of turn.rs (#3316)

LimitReached, TurnError, Wakeup, Outcome, Decisions and CompletedTurn move to
turn/result.rs. Hooked, fire_hooks, fire_checkout_made, firing_in,
say_prompt_notices and trouble_sentences move to turn/hooked.rs. The join half
of collect_delegates, which takes back a delegate's decisions, clock, spend and
retired checkout, becomes join_delegate in turn/delegate_end.rs. Paths under
bravebot_agent::turn are unchanged through re-exports, and both new files are
governed by every spec that governs turn.rs.

Closes #3239
… it (#3351)

Step 8 ended when the checks finished, so a pull request could be reported done while the reviewer's review of its head was still pending or asked for changes. The step now reads the reviewer's verdict for the current head, polls while it is pending for up to 120 minutes after the last push, and runs a fix round when it asks for changes. A fix round makes exactly the changes the comments ask for, pushes, replies to each thread without resolving it, and asks for the review again.

The loop stops after five reviews that ask for changes, after a fix round that pushed nothing, or when the pull request is merged or closed. The final report lists each review round.
* cli: run the Linux packaging inside the pinned packers

`make cli-packages-linux` ran the two packers on whatever host invoked it, and
the recipes needed a docker daemon to start the format containers.

Each format now has a target of its own, running wherever its tool is:
`cli-packages-linux-deb` where `dpkg-deb` is and `cli-packages-linux-rpm`
where `rpmbuild` is. `cli-packages-linux` runs each in the digest-pinned
container the app's packages use, one per format, with the tree mounted
read-only beside `dist/`. The recipes need no daemon of their own, so a
caller can run each one inside its container rather than on its host.

Part of #1048

* Fix volume mounts in cli-packages-linux target

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Open the /model picker before its listing arrives

Typing /model asked every endpoint for its models on the thread that draws and reads keys, so the command showed nothing until the slowest endpoint answered. The picker now opens at once as a mode of the session, shows a loading line, and takes the rows from a listing made on a thread of its own. What is typed meanwhile narrows the rows when they arrive, Enter chooses nothing until then, and a failed listing closes the picker and says why. The same path serves the command at rest and during a turn, so the blocking picker loop is removed.

Part of the commands spec: the pickers clause no longer says a slow listing holds the drawing.

* Test the loading picker's drawing and its per-frame settle during a turn

The picker's loading line is drawn and gone once the rows arrive, and a search that matches nothing in a list that arrived does not say it is loading. The step a turn takes each frame to settle a picker opened under it is its own function, tested for taking the rows, for recording what it says as said while working, and for closing the picker when the listing fails. The call to it from run_turn_animated needs a terminal and has no test.

* Keep the picker's listing hand-off from adding a let_underscore_must_use site
…#3357) (#3359)

login refuses a word after a gateway's id without printing it, since it is
most likely a key. status and logout refused the same word and printed it.
Closes #3357
…bout earlier edits (#3348)

heading built the note as two spaces plus the message and passed it to
status::cut, which trims each line, so the gap was dropped and the note ran
into the last count (+17280earlier edits are not kept). Cut the message to
the room left after the gap, then put the gap in front (FILES-10).

Fixes #3275
…palette (#3343)

a_triple_click_takes_the_row_without_its_padding, a_word_of_wide_characters_is_taken_whole
and the render tests that go through recognised_in_the_box compare a cell's colour with
theme::picked_out() or theme::brand_primary() without holding the lock a test that applies a
theme holds, so they can read another test's theme.

Closes #3278
… of a run small (#3362)

* Make implement-issues commit once for each item

The skill described its pull requests as having as many commits as the work needs, planned several commits for an item that needed several changes, and committed after each checklist row. Verifier rounds added commits and never folded them. A run on one issue made 40 to 90 commits, each replayed by every rebase and cherry-pick, and a pull request is squash-merged so none of them reach main.

Each item now has one commit holding its rows, tests, spec clauses and documentation. Another commit is made only for a dependency or for a refactor that changes no behaviour. Workers commit when a planned commit is complete, fixes found before the first push are folded into the commit that holds the code, and the plan is compared with the branch before the gates run. A review-fix round makes one commit.

* Keep the contexts of an implement-issues run small

In twelve recorded runs the subagents made up 84% of the token cost, and workers and the orchestrator reached contexts of 900,000 tokens. The orchestrator read every issue, diff and log, one worker took every row of a group, and a continued worker carried every earlier round, so each turn read a context that held other items' text. The review wait took a turn a minute.

The orchestrator now holds the ledger and short results. A briefer reads each item and writes its brief and checklist to a file, and every subagent returns a path and at most ten lines. A worker takes at most eight rows and hands off through a file, a round, rebase, fold or combine gets a new worker, and a brief holds one group. Gate and review waits are one call that loops, and a log is read from its EXIT line and last lines. A batch branch name given as the argument resumes a run from its ledger.
…ck written first (#3361)

bravebot auth login gateway lists the services bravebot already has an
endpoint for (openrouter, openai and anthropic) beside the gateways the
settings name, and takes a key for one with no provider block. Once the key is
stored, the entry "provider": {"<id>": {}} is added to the person's settings
file where that file does not name the id, so a session sends the key to the
host compiled in for the id.

known_ids() lists the ids in the endpoint table, and Provider::known reads one
as an entry that names nothing. A settings file that cannot take the entry is
refused before the key is asked for. A key already stored for a known id that
no block names gets its block whichever way the question about replacing it is
answered. Where the machine-level file names the gateways, no known service is
offered and the picker and the refusal name the file. A configuration that
lacks only Brave's credentials names no gateway for the sign-in. auth status
and auth logout take the same ids, and logout names the host a forgotten key
still works at.

Closes #3353
…e app modules sit under the specs they implement (#3339)

* Add the app modules that hold their clauses to the governs of four specs

background-sessions.md gains app/keys.rs and app/session_commands.rs, where the background
binding and the /resume refusal of a running background record are implemented. scroller.md gains
app/side_requests.rs and app/turns.rs, which walk the stop-key ladder with keys.rs. tools/lsp.md
gains app/actions.rs, app/directories.rs and app/turns.rs, which hand the session's language
servers to a turn and back and drop them on a directory change. chatgpt-sign-in.md gains
app/session_commands.rs, app/side_requests.rs and app/turns.rs, which say the account's failure
sentences and the level the session keeps. shell-mode.md already lists every module that holds
shell mode code, so it is unchanged.

Closes #3305

* Make the Bedrock pause and retry ceiling honour Retry-After

A throttled Bedrock request waited the computed doubling whatever delay the service asked for with a 429, and a wait past the two minute ceiling was still sat through. The pause now takes the wait the service asked for, never less than the doubling, and a wait past LONGEST_WAIT fails at once with the figure on the failure, as the aichat clients do. The helper is shared from bravebot-aichat so the two cannot differ.

Part of #3300

* Run the Responses and generateContent clients on the shared attempt driver

Both clients carried their own copy of the retry, refusal and Retry-After loop, which could drift from call::drive. Each now implements Driven and calls drive, so the wait a 429 asked for, the ceiling on it, the dropped thinking level and the stop between attempts come from one place. EffortRefused, which only these two used, is removed with its unit tests; the client tests keep pinning the same behaviour. The Responses client replaces a refused account token through a new Driven::mend hook, which sends the request again at once and counts against no limit. A predicate for a transient reported failure is shared between the two clients.

Closes #3300

* Test which service's refusal record refused_a_level reads

refused_a_level asks Bedrock, a gateway entry, the ChatGPT account or the default endpoint, in the order Backend::select picks them. Only the gateway branch had a test, and only on Linux. These tests run on every platform and pin:

- a slug the default endpoint refused is not refused at a gateway that offers the bare slug, and the gateway is reported once it has refused it itself;
- a model Bedrock serves is looked up in Bedrock's record and not in a gateway's record under the same name, while the gateway's own spelling still reports its refusal;
- a level the ChatGPT account refused is reported for that account model alone.

The Bedrock refusal record is written by the Bedrock client against a fixed host and its recorder is private to bravebot-bedrock, so a refusal cannot be recorded for it from the agent crate. The agent tests pin the lookup order and the Bedrock model's exclusion from a gateway's record. The per-service Bedrock record is held by the bravebot-bedrock tests, so the Bedrock true case stays untested here.

docs/specs/backends.md lists the three tests beside the other pins of the refused-level clause.

Part of #3256

* Keep held prompts in the shared Interjections buffer

The terminal kept each waiting prompt in the queue, a copy in the shared buffer and, for the prompts held back from the turn in flight, a second copy in a separate deque. The buffer now holds that run itself: lines held back are invisible to take and drain, forget_last drops the newest line wherever it is, push_behind keeps a line behind a held one, and begin_turn hands the oldest lines to a turn that starts and moves the rest. The held count is read from the buffer.

Closes #3295

* Record why the terminal queue stays beside the shared buffer

The terminal queue holds commands and command lines, the line as typed, what each line named and the hurried flag, none of which the shared buffer can carry, so INPUT-10 now says what the queue keeps and what it reads from the buffer. The queued and pending doc comments point to it. The buffer tests for forgetting and beginning a turn use held lines on both sides of the boundary they claim to pin.

Closes #3295

* Say why the fake counts repairs in the attempt-driver test
hidden::read wrote the question and only then enabled raw mode, so a key
pasted as the question appeared was echoed and stayed in the scrollback.
Raw mode is now enabled first, and where it cannot be nothing is asked.

Closes #3354
…lper (#3365)

`serve` returns once it has read what it takes, so it can close its end of the socket pair before
the helper calls `shutdown(Write)`. macOS then returns `NotConnected` where Linux accepts the call,
and the `expect` panicked in `a_client_without_the_secret_is_closed_unanswered_and_unread`,
`a_client_with_the_secret_is_served` and
`a_message_over_the_socket_needs_the_secret_and_is_answered_with_what_became_of_it`.

The helper now accepts that one error kind and still fails on any other. The shutdown stays for the
`attach` client, which `serve` reads from until end of input.

Closes #3364
# Conflicts:
#	docs/specs/backends.md
#	docs/website/docs/customize/providers/openai-compatible.md
@shisirbasel

Copy link
Copy Markdown
Collaborator Author

Investigating an alternate path; closing this helper PR without merging, will reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants