Skip to content

One rule for author keys: <backend>_key; the wizard writes it - #276

Merged
renmengye merged 4 commits into
mainfrom
feat/author-key
Sep 5, 2026
Merged

One rule for author keys: <backend>_key; the wizard writes it#276
renmengye merged 4 commits into
mainfrom
feat/author-key

Conversation

@renmengye

Copy link
Copy Markdown
Contributor

Two changes that together remove the last hand-edited step from setup.

One rule for author key files. The Claude author read ~/.config/outerloop/harness_key via OUTERLOOP_HARNESS_KEY_FILE, a name from when Claude was the only author, beside Codex's codex_key. Now every backend follows ~/.config/outerloop/<backend>_key and OUTERLOOP_<BACKEND>_KEY_FILE. Read-both, write-new like the other renames: the legacy env var and file are still honored, the new name wins when both exist, so the Torch fleet keeps working untouched. AUTORESEARCH_CLAUDE_KEY_FILE is added to the exported allowlist in both cli.py and tick_deploy.sh (the parity test covers the pair).

The wizard writes the key. outerloop init asks for the author's model API key with a hidden prompt and writes <backend>_key (0600), or takes --author-key-file for an existing file; the .env records OUTERLOOP_<BACKEND>_KEY_FILE. Asked after the overwrite check, so a declined run never asks for a secret; never asked on the focused --github-app run. A blank answer leaves a hint naming the file.

Docs. The README quick start is three commands and one file with no key sentence and no backend named; the install guide and the onboarding design note use the new names. Changelog under Unreleased. Supersedes #275 (its wording is included here).

Verified: ruff, ruff format, mypy (clean cache), 1220 tests, pre-commit.

🤖 Generated with Claude Code

renmengye and others added 3 commits September 5, 2026 14:54
…ot Anthropic by default

The key sentence named Anthropic and one file. Claude and Codex are both
authors today, each with its own default key file; say so. The install
guide's Level 1 line had the same assumption.
…s what a Codex author needs

Listing the Codex key file beside Claude's implied Codex works key-only, but a
Codex author also needs the container image and a Codex model. The quick start
now names the default and points elsewhere for the rest; the install guide
gains the sentence that was missing.
The Claude author's key lived in harness_key with OUTERLOOP_HARNESS_KEY_FILE,
a name from when Claude was the only author, beside Codex's codex_key. Now
both follow one rule: ~/.config/outerloop/<backend>_key and
OUTERLOOP_<BACKEND>_KEY_FILE. The old spellings are still read (new wins when
both exist), so a machine set up before the rename keeps working untouched;
the exported allowlist carries the new name in both copies.

outerloop init asks for the author's model key (hidden paste) and writes
<backend>_key 0600, or takes --author-key-file for an existing file, and the
.env records the path. The focused --github-app run still asks nothing about
the author. That removes the one manual step the quick start had left: three
commands and one file, the same for every backend.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head b6d98a83 — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.

terra
Advisory findings from autoresearch — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: 2 blocking, 2 advisory.

3 findings attached to the lines below.

Advisory (non-blocking):

  • Suggestion: Document the legacy config-directory location for generated keys. [prose] init uses CONFIG_DIR from paths.py, which selects ~/.config/autoresearch when that existing directory is present, so the new key is written there rather than to the documented ~/.config/outerloop path. (CHANGELOG.md:92; high confidence)

Verdict: request changes. Two blocking defects affect author-key handling: non-atomic permission tightening exposes newly pasted secrets, and relative key paths are resolved after dispatched climbs enter flight directories. Init should also reject unreadable or missing key files early, and the changelog should reflect legacy CONFIG_DIR selection. Deduplicated: the credentials and coverage opinions are merged because both identify the same creation-time permission race at init.py:91. Rejected: none.

Comment thread src/outerloop/init.py Outdated
Comment thread src/outerloop/init.py Outdated
Comment thread src/outerloop/init.py Outdated
…d stored absolute

paths.write_private opens the file with mode 0600 and forces the mode on a
pre-existing file before writing, so a pasted key, the PAT, the App PEM and
JSON, and .env never exist wider than the owner for any window; init and
appmanifest use it everywhere they wrote a secret and then chmod'd it. A
--author-key-file must be a readable file (a typo fails init, not the first
climb) and is stored absolute, since climb jobs read it from their own flight
directory. The changelog says which config dir the key lands in on a machine
set up before the rename.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@renmengye renmengye added the outerloop:review re-request the advisory review label Sep 5, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head 601bab6b — reviewer hermes/gpt-5.6-terra.

terra
Advisory findings from autoresearch — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: no defects found.

@renmengye
renmengye merged commit ab7ffb7 into main Sep 5, 2026
5 checks passed
@renmengye
renmengye deleted the feat/author-key branch September 5, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

outerloop:review re-request the advisory review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant