Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs(w13): generic wording for the PR1 hardening in CHANGELOG, BEHAVIOR_CHANGES, key-files, test titles and comments

time-attackc45d64c5778a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93cfe4e8a4..877b8c759d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,16 +12,16 @@ identifiers and attribution are available in the pre-removal Git revision
## [Unreleased]
-**`embed --max-usd` is enforced, a fence write no longer wipes a database-only page, and synced quarantine overrides and Git children are locked down.**
+**`embed --max-usd` is enforced, a fence write no longer wipes a database-only page, and write-gate overrides and Git child processes are hardened.**
-An approved `gbrain embed --max-usd` cap was never metered, so a run could spend past it; it is now enforced on every paid call, and `--yes` with no cost estimate runs under the default $5.00 cap. A facts fence write to a page with no file wrote a stub that overwrote the stored body (#6398); it is refused now. A file's own `quarantine_override` is kept only for an owner-tier source, and Git children no longer follow an inherited `GIT_DIR`. Nothing needs doing after you upgrade; to let an embed run spend more than $5.00 without an estimate, pass `--max-usd <usd>`.
+An approved `gbrain embed --max-usd` cap was never metered, so a run could spend past it; it is now enforced on every paid call, and `--yes` with no cost estimate runs under the default $5.00 cap. A facts fence write to a page with no file wrote a stub that overwrote the stored body (#6398); it is refused now. Which files can carry a write-gate override is hardened, and Git child processes now get a sanitized environment. Nothing needs doing after you upgrade; to let an embed run spend more than $5.00 without an estimate, pass `--max-usd <usd>`.
### Itemized changes
- `gbrain embed` meters an approved `--max-usd` while it spends, for text, `--slugs`, `--images` (multimodal and OCR) and `--background` runs. A run that reaches its cap keeps what it wrote, exits 11 with reason `cost_cap` and prints the shell-quoted resume command; rerun it with `--max-usd <usd>` to raise the cap. `--yes` with no cost estimate is now capped at the default $5.00. Consent counts a paid multimodal or OCR model when `--images` is set, and `--slugs` stops at the next flag.
- A facts fence write to a database-only or soft-deleted page is refused with `db_only_page` instead of writing a stub over it (#6398). Doctor `stub_guard_24h` counts these separately and they do not raise its warning.
-- A synced or imported file's `quarantine_override` is kept only when the source's write-gate tier is owner-tier; file repairs and reconcile apply the same rule, and an unreadable tier strips it (CSO T1).
-- Git children drop inherited repository-locating variables (`GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE` and the rest Git lists), checkout discovery stops at a world-writable ancestor owned by someone else, hardened Git calls take literal pathspecs and only the exact options callers use, and `eval drift-watch` runs Git without a shell (CSO G1 to G4).
+- Hardened which files can carry a write-gate override; sync, import, file repairs and reconcile apply the same rule.
+- Git child processes now get a sanitized environment, checkout discovery is stricter, gbrain's hardened Git calls accept a narrower set of arguments, and `eval drift-watch` runs Git without a shell.
- `pollCommand` output is shell-quoted and `LLMS_REPO_BASE` is normalized; the paid-consent skill lint says it is a documentation check, not enforcement.
### For contributors
diff --git a/docs/architecture/key-files/quarantine.md b/docs/architecture/key-files/quarantine.md
index d6470eccab..916b51ab18 100644
--- a/docs/architecture/key-files/quarantine.md
+++ b/docs/architecture/key-files/quarantine.md
@@ -37,5 +37,5 @@ gets no body (fetch: empty `text`) unless it holds `admin` and passes
`include_quarantined: true`.
Test: `test/quarantine-read-write-surface.test.ts`.
-- `src/core/quarantine-override.ts` — #6259 (fix wave 12): the `quarantine_override` frontmatter key `gbrain quarantine clear --force` records: `{ binding, cleared_at }`, where `binding` is a sha256 over the classifier's inputs (title, type, body) as the gate canonicalizes them (`quarantineOverrideFor`). `assessImportSanity` (`import-screen.ts`) wraps its verdict in `withQuarantineOverride`, which removes the junk-pattern, literal and markup-flag outcomes while the binding is current (size outcomes stay). `importFromContent` calls `stripGateOwnedMarkers` (`import-screen.ts`, `GATE_OWNED_FRONTMATTER_KEYS`): every writer loses `quarantine`, `content_flag`, `embed_skip`, `atoms_scan_hash` and `quarantine_override` unless an owner-tier path passes `preserveGateMarkers: true` (`importFromFile`, managed sync and file import, reindex, file repair, reconcile, the cycle derivers and their `managed_maintenance_page` intents, `quarantine clear/scan` and the owner-internal `managed_quarantine_clear` put_page kind); local put_page, connectors and ingest lanes do not. A preserving path keeps its own override only while current, and a current override drops classifier markers the content still carries. CSO T1 (fix wave 13): the binding is a public hash, so a preserving call that carries a `writeGate` (unmanaged sync/import via `ownerSourceGateInput`, managed sync and file import via `ownerGateInput`) keeps the override only when the gate's tier is owner-tier (`OWNER_TIER_FLOOR`); a lowered, mirror or connector source, or a remote authority, loses it and the gate decides; an unreadable tier fails closed. Paths that pass no gate (file repair, reconcile, the cycle derivers, `quarantine clear`) are unchanged. Tests: `test/quarantine-override-tier.test.ts`. `opts.remote` keeps only its fence-merge/hidden-row meaning. Tests: `test/gate-marker-strip.test.ts`. For a stripped write the classifier would hide or markup-flag, `carryStoredQuarantineOverride` reads the stored override and keeps it when it still binds (so a remote tag edit does not re-hide the page); a clean remote write reads nothing extra (#6007 statement budget). Company-brain inspection refuses files carrying it (`hidden_input`). Doctor's quarantine row names `clear <slug> --force` and `content_sanity.disabled_patterns`.
+- `src/core/quarantine-override.ts` — #6259 (fix wave 12): the `quarantine_override` frontmatter key `gbrain quarantine clear --force` records: `{ binding, cleared_at }`, where `binding` is a sha256 over the classifier's inputs (title, type, body) as the gate canonicalizes them (`quarantineOverrideFor`). `assessImportSanity` (`import-screen.ts`) wraps its verdict in `withQuarantineOverride`, which removes the junk-pattern, literal and markup-flag outcomes while the binding is current (size outcomes stay). `importFromContent` calls `stripGateOwnedMarkers` (`import-screen.ts`, `GATE_OWNED_FRONTMATTER_KEYS`): every writer loses `quarantine`, `content_flag`, `embed_skip`, `atoms_scan_hash` and `quarantine_override` unless an owner-tier path passes `preserveGateMarkers: true` (`importFromFile`, managed sync and file import, reindex, file repair, reconcile, the cycle derivers and their `managed_maintenance_page` intents, `quarantine clear/scan` and the owner-internal `managed_quarantine_clear` put_page kind); local put_page, connectors and ingest lanes do not. A preserving path keeps its own override only while current, and a current override drops classifier markers the content still carries. Fix wave 13: a preserving call that carries a `writeGate` (unmanaged sync/import via `ownerSourceGateInput`, managed sync and file import via `ownerGateInput`) keeps the override only when the gate's tier is owner-tier (`OWNER_TIER_FLOOR`); file repair and reconcile pass the source's owner tier as `overrideTier` for the same rule; an unreadable tier fails closed. Paths that pass neither (the cycle derivers, `quarantine clear`) are unchanged. Tests: `test/quarantine-override-tier.test.ts`, `test/quarantine-override-repair-reconcile.test.ts`. `opts.remote` keeps only its fence-merge/hidden-row meaning. Tests: `test/gate-marker-strip.test.ts`. For a stripped write the classifier would hide or markup-flag, `carryStoredQuarantineOverride` reads the stored override and keeps it when it still binds (so a remote tag edit does not re-hide the page); a clean remote write reads nothing extra (#6007 statement budget). Company-brain inspection refuses files carrying it (`hidden_input`). Doctor's quarantine row names `clear <slug> --force` and `content_sanity.disabled_patterns`.
- `src/core/ops/get-page-projection.ts` — `projectGetPage` shapes the get_page response from the reader-visible body (#2225 `content`, content_only round-trip fields, `timeline_entries`, `file_held`). #6259: `quarantinedView` decides whether a quarantined page's body is withheld (`body_omitted` for an untrusted reader without `admin` + `include_quarantined`); a withheld body empties compiled_truth and timeline and drops `content`.
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index c1f34816e3..2e2381f9b0 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -383,8 +383,8 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }
// Fix wave 13 PR1. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
{ since: '0.60.159.0', text: '`gbrain embed --max-usd <usd>` is now enforced while the run spends, for text, `--slugs`, `--images` (multimodal and OCR) and `--background` runs; before, an approved cap was never metered. A run approved with `--yes` and no cost estimate now runs under the default $5.00 cap instead of none. A run that reaches its cap keeps the embeddings already written, exits 11 with reason `cost_cap` and prints the command that resumes; raise the cap by rerunning it with `--max-usd <usd>`.' },
{ since: '0.60.159.0', text: 'A facts fence write to a page that exists only in the database (no file, or a soft-deleted page) is now refused with `db_only_page` instead of writing a stub file that then overwrote the stored body and timeline (#6398). Doctor `stub_guard_24h` counts these refusals separately and they do not raise its warning.' },
- { since: '0.60.159.0', text: 'A `quarantine_override` carried in a file is now kept only when the file\'s source is owner-tier (operator_curated or above), on sync, import, file repairs and reconcile alike; a mirror, connector or lowered source loses it and the content gate decides, and a file repair of such a file refuses as an overlay.' },
- { since: '0.60.159.0', text: 'Git commands gbrain runs no longer inherit `GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE` and the other repository-locating variables, so gbrain started from a Git hook or a nested shell operates on the brain\'s own repository; a `.git` found above a world-writable directory owned by someone else is no longer treated as the brain\'s checkout; and gbrain\'s hardened Git calls take literal paths and only the exact options they use.' },
+ { since: '0.60.159.0', text: 'Hardened which files can carry a write-gate override: an override in a file is kept only for an owner-tier source (operator_curated or above), on sync, import, file repairs and reconcile alike; otherwise the content gate decides, and a file repair of such a file refuses as an overlay.' },
+ { since: '0.60.159.0', text: 'Git child processes gbrain runs now get a sanitized environment, checkout discovery is stricter, and gbrain\'s hardened Git calls accept a narrower set of arguments.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */
diff --git a/src/core/git-checkout.ts b/src/core/git-checkout.ts
index 72dbc8dc30..830e29b509 100644
--- a/src/core/git-checkout.ts
+++ b/src/core/git-checkout.ts
@@ -11,10 +11,9 @@
*
* - `not_git`: no `.git` entry (directory or gitdir file) at the directory or
* any ancestor below the first world-writable ancestor owned by someone else
- * (POSIX). Git refuses a repository found there ("dubious ownership"), and
- * any local user can plant one in a shared directory such as `/tmp` (CSO G3).
- * An inherited `GIT_DIR` is not trusted: every Git spawn drops it
- * (`git-env.ts`, CSO G4), so it can't make a plain directory a checkout.
+ * (POSIX). Git refuses a repository found there ("dubious ownership").
+ * The inherited Git environment is not trusted: every Git spawn sanitizes it
+ * (`git-env.ts`), so it can't make a plain directory a checkout.
* - `git`: a `.git` entry exists at or above the directory, within that
* boundary; whether Git can use it is the Git probe's question.
* - `unknown`: the directory itself is missing or not a directory, or a
diff --git a/src/core/git-env.ts b/src/core/git-env.ts
index 630836eac6..f88b8c641b 100644
--- a/src/core/git-env.ts
+++ b/src/core/git-env.ts
@@ -1,9 +1,7 @@
/**
- * The environment for a Git child process (CSO G4, wave 13). A gbrain started
- * from a Git hook, or under a shell that exported `GIT_DIR`, inherits Git's
- * repository-locating variables; passed on, they make `git -C <root>` read and
- * write the repository they name instead of `<root>`, so a commit meant for a
- * brain checkout can land in another repository. Every Git spawn under
+ * The sanitized environment for a Git child process (wave 13): Git's
+ * repository-locating variables are dropped so `git -C <root>` always works on
+ * `<root>`. Every Git spawn under
* `src/core` builds its env here (guarded by `test/git-env-guard.test.ts`).
* Transport and credential variables (`GIT_SSH_COMMAND`, `GIT_ASKPASS`,
* `SSH_AUTH_SOCK`, proxies) pass through; `extra` wins over both.
diff --git a/src/core/hardened-git.ts b/src/core/hardened-git.ts
index 917ef404aa..1fb7848f15 100644
--- a/src/core/hardened-git.ts
+++ b/src/core/hardened-git.ts
@@ -33,9 +33,8 @@ export function hardenedGitEnvironment(): NodeJS.ProcessEnv {
export type HardenedGitResult = { ok: true; stdout: Buffer } | { ok: false; reason: 'exit' | 'timeout' | 'too_large' | 'unavailable'; status?: number };
/**
- * The exact options each allowed plumbing subcommand may take (CSO G1): Git
- * accepts unambiguous abbreviations (`--textc` is `--textconv`), so a blocklist
- * of converting options can't hold; anything not listed here refuses.
+ * The exact options each allowed plumbing subcommand may take; anything not
+ * listed here refuses.
*/
const ALLOWED_OPTIONS: ReadonlyMap<string, ReadonlySet<string>> = new Map([
['rev-parse', new Set(['--show-toplevel', '--absolute-git-dir', '--verify', '--quiet', '--show-object-format'])],
diff --git a/src/core/import-file.ts b/src/core/import-file.ts
index 03f80f9228..eb10e1b535 100644
--- a/src/core/import-file.ts
+++ b/src/core/import-file.ts
@@ -315,7 +315,7 @@ export async function importFromContent(
* and reindex leave it unset so the guard stays armed.
*/
allowEmptyOverwrite?: boolean;
- /** CSO T1: with no writeGate, the tier that decides whether a preserved `quarantine_override` is kept (owner tier only; present but unreadable strips it). */
+ /** With no writeGate, the tier that decides whether a preserved `quarantine_override` is kept (owner tier only; present but unreadable strips it). */
overrideTier?: unknown;
/** #5575: the caller's trust tier and origin for this write; absent skips the write gate (owner paths). */
writeGate?: WriteGateInput;
diff --git a/src/core/import-screen.ts b/src/core/import-screen.ts
index 1b5abcf3f9..e14be2e2f6 100644
--- a/src/core/import-screen.ts
+++ b/src/core/import-screen.ts
@@ -279,12 +279,10 @@ export const GATE_OWNED_FRONTMATTER_KEYS = [QUARANTINE_KEY, CONTENT_FLAG_KEY, EM
* mining (`atoms_scan_hash`) or forge a cleared state (`quarantine_override`).
* A preserving path keeps its own override only while it binds the content,
* and a current override drops classifier markers the content still carries.
- * The override's binding is a public hash anyone can compute, so a preserving
- * file import that carries a write gate (owner sync and file import, managed
- * sync and import) keeps it only when that gate's tier is owner-tier; a
- * mirror, connector or lowered source can't clear its own page (CSO T1). File
- * repair and reconcile pass no gate, so they pass the source's owner tier as
- * `overrideTier` and the same rule applies. An unreadable tier fails closed.
+ * A preserving file import that carries a write gate (owner sync and file
+ * import, managed sync and import) keeps it only when that gate's tier is
+ * owner-tier (wave 13). File repair and reconcile pass no gate, so they pass
+ * the source's owner tier as `overrideTier` and the same rule applies. An unreadable tier fails closed.
*/
export function stripGateOwnedMarkers(parsed: Pick<ParsedMarkdown, 'frontmatter' | 'title' | 'type' | 'compiled_truth' | 'timeline'>,
opts: { preserveGateMarkers?: boolean; writeGate?: { tier?: unknown }; overrideTier?: unknown }): void {
diff --git a/test/git-checkout.test.ts b/test/git-checkout.test.ts
index 9fd86e6a5c..1b09d494c8 100644
--- a/test/git-checkout.test.ts
+++ b/test/git-checkout.test.ts
@@ -25,14 +25,14 @@ test('a .git directory or gitdir file at or above the directory makes it a check
expect(classifyGitCheckout(linked)).toBe('git');
});
-test('CSO G4: an inherited GIT_DIR does not make a plain directory a checkout', async () => {
+test('an inherited Git environment does not make a plain directory a checkout', async () => {
const other = scratch();
mkdirSync(join(other, '.git'));
const plain = scratch();
await withEnv({ GIT_DIR: join(other, '.git') }, async () => { expect(classifyGitCheckout(plain)).toBe('not_git'); });
});
-test.skipIf(process.platform === 'win32')('CSO G3: discovery stops at a world-writable ancestor owned by someone else', () => {
+test.skipIf(process.platform === 'win32')('discovery stops at an untrusted shared ancestor', () => {
const shared = scratch();
mkdirSync(join(shared, '.git'));
mkdirSync(join(shared, 'brain', 'notes'), { recursive: true });
@@ -55,7 +55,7 @@ test.skipIf(process.platform === 'win32')('CSO G3: discovery stops at a world-wr
});
const sudo = process.platform !== 'win32' && process.getuid?.() !== 0 && spawnSync('sudo', ['-n', 'true']).status === 0;
-test.skipIf(!sudo)('CSO G3 on the real filesystem: a root-owned .git in a 1777 directory above a user directory is not this checkout', () => {
+test.skipIf(!sudo)('on the real filesystem: a .git above an untrusted shared ancestor is not this checkout', () => {
const user = scratch();
const shared = join(user, 'shared');
mkdirSync(shared);
diff --git a/test/git-env-guard.test.ts b/test/git-env-guard.test.ts
index c7b01df1a9..cb3e123688 100644
--- a/test/git-env-guard.test.ts
+++ b/test/git-env-guard.test.ts
@@ -1,6 +1,6 @@
/**
- * CSO G4 guard (wave 13): every Git child process under `src/core` builds its env
- * through a helper that drops Git's repository-locating variables (`gitChildEnv`,
+ * Wave 13 guard: every Git child process under `src/core` builds its env
+ * through a helper that sanitizes the inherited Git environment (`gitChildEnv`,
* or the stricter `backupGitEnv` / `hardenedGitEnvironment`). A new spawn that
* inherits `process.env` (implicitly or with `...process.env`) fails here.
* PENDING lists files owned by another lane that still need the helper (empty:
diff --git a/test/hardened-git-filters.test.ts b/test/hardened-git-filters.test.ts
index e4a7ba5dc8..585d8005d9 100644
--- a/test/hardened-git-filters.test.ts
+++ b/test/hardened-git-filters.test.ts
@@ -134,8 +134,8 @@ describe('W4.3: hardenedPathDirty matches git status without running it', () =>
});
});
-describe('wave 13 CSO G1/G2: exact options and literal pathspecs', () => {
- test('G1: abbreviated converting options and unknown options refuse; every current call shape passes', () => {
+describe('wave 13: exact options and literal pathspecs', () => {
+ test('options outside the allow-list refuse; every current call shape passes', () => {
for (const args of [['cat-file', '--textc', 'HEAD:note.md'], ['cat-file', '--filt', 'HEAD:note.md'], ['cat-file', '-p', 'HEAD:note.md'],
['ls-files', '--with-tree=HEAD'], ['rev-parse', '--git-path', 'hooks'], ['ls-tree', '--format=%(objectname)', 'HEAD'],
['hash-object', '--no-filters', '--path=x', '--', 'note.md'], ['diff-index', '--cached', '--ext', 'HEAD']]) {
@@ -152,7 +152,7 @@ describe('wave 13 CSO G1/G2: exact options and literal pathspecs', () => {
}
});
- test('G1: an abbreviated --textconv never reaches git, so a repository textconv cannot run', () => {
+ test('a refused option never reaches git, so repository config cannot run', () => {
const root = repo(r => writeFileSync(join(r, '.gitattributes'), 'note.md diff=evil\n'));
const marker = join(root, '..', `${root.split('/').pop()}-textconv-ran`);
git(root, 'config', 'diff.evil.textconv', `sh -c 'touch ${marker}; cat "$1"' -`);
diff --git a/test/persistence-effect-git-env.test.ts b/test/persistence-effect-git-env.test.ts
index 54b3bba935..090fb78719 100644
--- a/test/persistence-effect-git-env.test.ts
+++ b/test/persistence-effect-git-env.test.ts
@@ -1,11 +1,10 @@
/**
- * CSO G4 (wave 13): a gbrain started from a Git hook or a shell that exported Git's
- * repository-locating variables must still read and write only the checkout it was
- * asked about.
+ * Wave 13: Git work must read and write only the checkout it was asked about,
+ * whatever Git environment the process inherited.
* Protects: the Git effect (`commitGitTargets`), the classic write-through commit
* (`commitWriteThroughFile`) and git-remote probes build their env through
- * `gitChildEnv`, so an inherited `GIT_DIR`/`GIT_WORK_TREE`/`GIT_INDEX_FILE` aimed at
- * another repository leaves that repository's HEAD and index untouched.
+ * `gitChildEnv`, so an inherited environment naming another repository leaves
+ * that repository's HEAD and index untouched.
* Seams: none; real repositories, the variables set on process.env for the test.
*/
import { afterEach, expect, test } from 'bun:test';
@@ -43,7 +42,7 @@ test('gitChildEnv drops every repository-locating variable and keeps transport o
expect(gitChildEnv({ GIT_TERMINAL_PROMPT: '0' }, source)).toEqual({ GIT_SSH_COMMAND: 'ssh -i key', GIT_ASKPASS: '/bin/askpass', SSH_AUTH_SOCK: '/run/agent', PATH: '/usr/bin', GIT_TERMINAL_PROMPT: '0' });
});
-test('the Git effect commits into its own root under an inherited GIT_DIR, GIT_WORK_TREE and GIT_INDEX_FILE', async () => {
+test('the Git effect commits into its own root under an inherited Git environment naming another repository', async () => {
const brain = repo('brain', 'main');
const other = repo('other', 'trunk');
writeFileSync(join(brain, 'a.md'), 'brain second\n');
diff --git a/test/quarantine-override-repair-reconcile.test.ts b/test/quarantine-override-repair-reconcile.test.ts
index 81273a494e..3ce6306954 100644
--- a/test/quarantine-override-repair-reconcile.test.ts
+++ b/test/quarantine-override-repair-reconcile.test.ts
@@ -1,5 +1,5 @@
/**
- * CSO T1 follow-up (wave 13 PR1): file repair and reconcile import with
+ * Wave 13 PR1: file repair and reconcile import with
* `preserveGateMarkers` and no write gate, so before this fix they kept a file's
* own `quarantine_override` whatever the source's tier. Protects: both paths keep
* the override only when the source's owner tier is owner-tier; a lowered source
diff --git a/test/quarantine-override-tier.test.ts b/test/quarantine-override-tier.test.ts
index c6939c685d..6f686be9fe 100644
--- a/test/quarantine-override-tier.test.ts
+++ b/test/quarantine-override-tier.test.ts
@@ -1,6 +1,5 @@
/**
- * CSO T1 (wave 13, Tier A): `quarantine_override` binds a public hash of title,
- * type and body, so a synced file's author can compute one for their own page.
+ * Wave 13: which files can carry a `quarantine_override`.
* Protects: a preserving import that carries a write gate keeps the override only
* when the gate's tier is owner-tier. An unmanaged sync of an owner source keeps
* it; a lowered (`trust_tier` below operator_curated) or connector source loses it
diff --git a/test/w13-small-hardening.test.ts b/test/w13-small-hardening.test.ts
index 5ecdce85fe..a396ff1f54 100644
--- a/test/w13-small-hardening.test.ts
+++ b/test/w13-small-hardening.test.ts
@@ -1,5 +1,5 @@
/**
- * Fix wave 13 P1.14-P1.16 (CSO lows, lane E).
+ * Fix wave 13 P1.14-P1.16 (lane E).
* Protects: the paid-consent skill lint names itself a documentation tripwire
* (the runtime consent check is the gate); `pollCommand` renders a server-supplied
* `fix.argv` shell-quoted, so `$(…)` and spaces paste inert; `parseRepoBase` emits