Skip to content

fix(backup): preserve literal repository and restore paths - #195644

Closed
Leon-SK668 wants to merge 3 commits into
openclaw:mainfrom
Leon-SK668:leon/fix-backup-literal-paths-20261109
Closed

Leon-SK668 wants to merge 3 commits into
openclaw:mainfrom
Leon-SK668:leon/fix-backup-literal-paths-20261109

Conversation

@Leon-SK668

@Leon-SK668 Leon-SK668 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Backup commands silently trim quoted filesystem paths. backup git init --repository '<parent>/backup ' initializes the differently named <parent>/backup; SQLite listing likewise reports the trimmed repository.

Why This Change Was Made

Preserve each original nonblank path through the existing owner chain: shared backup argument resolution, snapshot directory creation via fs-safe's absolute-path API, and Git repository-root readback that removes only the terminating newline.

Existing-solutions preflight: reuse current home expansion and pinned fs-safe0.27.1 APIs; no new path library or global normalizer. Direct dependency implementation confirms absolute directory creation retains literal components and guards directory identities. Existing ancestor canonicalization, private modes/ACLs, directory pins and durable publication remain at their current owners.

This refresh merges main 4f592f12c35c631c857c206d71177f420c30ff9c without rewriting contributor/upstream history. It resolves the shared-resolver conflict by retaining main's ExpectedCliError blank validation alongside this PR's literal path resolution. Backend production code and its added regressions are unchanged from the previously reviewed head 038885153418fff113651caa105b6933a44eba38.

User Impact

User impact: quoted repository, snapshot, restore-target and scratch paths retain their leading/trailing spaces. Blank required inputs keep their existing rejection and structured remedy. The Backup CLI reference explains the literal-path contract.

Relative to merged main: 7 files, production +27/-31 (net -4), tests +37/-7, docs +4/-3, existing test-allocation metadata +2. Main's inherited changes are not part of this PR's seven-file repair. No dependency, config/default, database/schema, backup-format, remote-push, permission or compatibility-fallback change.

Evidence

  • Same frozen native CLI driver on Linux/Node24.22.1: RED 48b92409887ac4e7b8c67883918a3fee2d9250c9 at 2026-11-15T15:08:09.617Z; GREEN adc987b8fc64b12ed4174c2c81ef4d16c8c97883 at 2026-11-15T15:35:23.747Z. Final native build commit equals the refreshed contributor head.
  • Two Git initializations: before, both select the distinct trimmed neighbor; after, both select the exact absolute/relative whitespace-bearing directory. Independent stat and native git rev-parse --absolute-git-dir confirm the intended metadata, and both neighbor sentinels remain unchanged.
  • SQLite listing returns the exact existing repository after the fix. Ordinary Git initialization and blank-input JSON rejection remain controls.
  • Current merged-source command suites: OPENCLAW_VITEST_RUNTIME=node node scripts/run-vitest.mjs src/commands/backup-shared.test.ts src/commands/backup-git.test.ts src/commands/backup-sqlite.test.ts src/commands/backup-schedule.test.ts --maxWorkers=1 --reporter=dot: 65 passed, exit0,294.76s Vitest/307.43s wrapper. Tests ran against the prepared merged tree, which was verified identical to the committed tree.
  • Targeted tsgo, typed oxlint, oxfmt and git diff --check pass. Exact-head node --import ./scripts/tsx.mjs scripts/build-all.mts sourcePerformance build passes in260.1s, not full release/package validation.
  • Previous head038885's backend suite passed71 tests with3 platform/fixture skips. Those backend sources/tests are byte-identical after this refresh; that historical suite result is not represented as a new run. The native Git-init/SQLite-list behavior above was rerun on the refreshed head.
  • Baseline48b924's three relevant backup production owners are byte-identical to merged main4f592f12, so the reused built baseline demonstrates the current gap. No production backup environment was accessed.

Not tested: remote Git push, production backup data, native end-to-end restore/schedule, Windows/macOS, full repository suite, full release packaging or current upstream CI. Directory safety beyond the exercised scenarios retains the unchanged owner/dependency contracts and prior focused coverage.

Exact-head proof receipt
status: PASS
product_sha: adc987b8fc64b12ed4174c2c81ef4d16c8c97883
base_sha: 48b92409887ac4e7b8c67883918a3fee2d9250c9
claims: C1=backup CLI preserves literal nonblank paths through repository creation and Git path readback; C2=upstream expected-error blank validation and original directory safety remain intact
covered_by: C1=same native absolute/relative Git init and SQLite list before/after, independent filesystem/native Git readback; C2=ordinary repository and blank rejection controls, neighbor sentinels, 65 current merged-source command tests and unchanged previously tested backend owners
entry: built openclaw backup git init --repository PATH --json; backup sqlite list --repository PATH --json
owner: shared backup path resolver -> snapshot local directory creation -> Git repository-root assertion; existing archive sibling already preserves literals
boundary: subprocess,disk
readback: exact requested .git directories statted and checked with native git rev-parse --absolute-git-dir; returned SQLite repository path; distinct trimmed neighbors and their sentinel files inspected independently
proof_command: node replace-four-backup-path-proof-20261109.mjs CHECKOUT PHASE OUTPUT; same five commands and fixtures, PHASE changes observed before/after assertions only
harness: frozen driver SHA256 ef3f6d8eb8c31f5fe3066e9624d0f6fc4ca5033d43f7afc1e3c6696e01b6a898; full driver and sanitized captured records in body; final native build commit equals product_sha
before: RED 48b92409887ac4e7b8c67883918a3fee2d9250c9 at 2026-11-15T15:08:09.617Z; exact Git metadata count0/2 and trimmed-neighbor metadata count2/2; SQLite path equality count0/1
after: GREEN adc987b8fc64b12ed4174c2c81ef4d16c8c97883 at 2026-11-15T15:35:23.747Z; exact Git metadata count2/2 and trimmed-neighbor metadata count0/2; SQLite path equality count1/1
negative_claim: yes
control: trimmed-neighbor Git metadata0 versus2 on baseline, exact metadata2 versus0; two neighbor sentinels unchanged; ordinary repository1 succeeds and blank rejection1 retains structured reason and exit1 on both revisions
consumers: Git/SQLite/schedule use the shared resolver; backend directory and Git assertion repairs unchanged from reviewed038885; archive path sibling remains literal; merged upstream ExpectedCliError blank guards preserved
tests: node scripts/run-vitest.mjs src/commands/backup-shared.test.ts src/commands/backup-git.test.ts src/commands/backup-sqlite.test.ts src/commands/backup-schedule.test.ts --maxWorkers=1 --reporter=dot:65passed,exit0; targeted tsgo,typed oxlint,oxfmt,diff pass; exact-head sourcePerformance build exit0
tests_changed: yes
test_cost: merged-source command suites294.76s Vitest/307.43s wrapper; exact-head native build260.1s; previously reviewed backend71pass/3skip not rerun for this refresh
visual: no
screenshots: N/A: CLI/filesystem/Git metadata, no GUI claim
published: pr-body
not_tested: remote Git push, production backup data, native end-to-end restore/schedule, Windows/macOS, full repository suite, full release packaging or current upstream CI
reuse: native baseline48b924 backup owner blobs identical to mergedmain4f592f12; frozen driver rerun both phases; final adc987b8 merge tree verified, backend source unchanged from original reviewed038885
Captured native before/after readback

Only the temporary fixture prefix is replaced by <fixture>.

{
  "before": {
    "phase": "red",
    "at": "2026-11-15T15:08:09.617Z",
    "runtime": "v24.22.1",
    "head": "48b92409887ac4e7b8c67883918a3fee2d9250c9",
    "build": {
      "version": "2026.11.3",
      "commit": "48b92409887ac4e7b8c67883918a3fee2d9250c9",
      "builtAt": "2026-11-15T12:56:22.377Z",
      "buildId": "2026.11.3-48b92409887a-2026-11-15T12-56-22.377Z"
    },
    "ownerSha256": "637f69ce2b43a905edf22c641e4274ff674ad9df9332e07428b3bc4f6f49344f",
    "fixture": "<fixture>",
    "commands": [
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          "<fixture>/git absolute ",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"repositoryPath\": \"<fixture>/git absolute\"\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          " relative git ",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"repositoryPath\": \"<fixture>/relative git\"\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "sqlite",
          "list",
          "--repository",
          "<fixture>/sqlite repository ",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"ok\": true,\n  \"repositoryPath\": \"<fixture>/sqlite repository\",\n  \"snapshots\": []\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          "<fixture>/plain",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"repositoryPath\": \"<fixture>/plain\"\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          "   ",
          "--json"
        ],
        "code": 1,
        "signal": null,
        "stdout": "{\n  \"ok\": false,\n  \"error\": {\n    \"type\": \"cli_error\",\n    \"message\": \"Missing required --repository value.\"\n  }\n}\n",
        "stderr": "Missing required --repository value.\n"
      }
    ],
    "observations": [
      {
        "boundary": "backup git init",
        "argument": "<fixture>/git absolute ",
        "expected": "<fixture>/git absolute ",
        "actual": "<fixture>/git absolute",
        "exactMetadataExists": false,
        "neighborHasMetadata": true,
        "sentinelIntact": true
      },
      {
        "boundary": "backup git init",
        "argument": " relative git ",
        "expected": "<fixture>/ relative git ",
        "actual": "<fixture>/relative git",
        "exactMetadataExists": false,
        "neighborHasMetadata": true,
        "sentinelIntact": true
      },
      {
        "boundary": "backup sqlite list",
        "argument": "<fixture>/sqlite repository ",
        "expected": "<fixture>/sqlite repository ",
        "actual": "<fixture>/sqlite repository",
        "snapshots": []
      }
    ],
    "pass": true,
    "limits": "Isolated local repositories only. No remote push, production state or database format change."
  },
  "after": {
    "phase": "green",
    "at": "2026-11-15T15:35:23.747Z",
    "runtime": "v24.22.1",
    "head": "adc987b8fc64b12ed4174c2c81ef4d16c8c97883",
    "build": {
      "version": "2026.11.3",
      "commit": "adc987b8fc64b12ed4174c2c81ef4d16c8c97883",
      "builtAt": "2026-11-15T15:29:52.960Z",
      "buildId": "2026.11.3-adc987b8fc64-2026-11-15T15-29-52.960Z"
    },
    "ownerSha256": "ccac5208f8a344e349bc31bb9a8a1501c35823cb58bbbca9e9db4cbf05563000",
    "fixture": "<fixture>",
    "commands": [
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          "<fixture>/git absolute ",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"repositoryPath\": \"<fixture>/git absolute \"\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          " relative git ",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"repositoryPath\": \"<fixture>/ relative git \"\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "sqlite",
          "list",
          "--repository",
          "<fixture>/sqlite repository ",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"ok\": true,\n  \"repositoryPath\": \"<fixture>/sqlite repository \",\n  \"snapshots\": []\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          "<fixture>/plain",
          "--json"
        ],
        "code": 0,
        "signal": null,
        "stdout": "{\n  \"repositoryPath\": \"<fixture>/plain\"\n}\n",
        "stderr": ""
      },
      {
        "args": [
          "backup",
          "git",
          "init",
          "--repository",
          "   ",
          "--json"
        ],
        "code": 1,
        "signal": null,
        "stdout": "{\n  \"ok\": false,\n  \"error\": {\n    \"type\": \"cli_error\",\n    \"message\": \"Missing required --repository value.\"\n  }\n}\n",
        "stderr": "Missing required --repository value.\n"
      }
    ],
    "observations": [
      {
        "boundary": "backup git init",
        "argument": "<fixture>/git absolute ",
        "expected": "<fixture>/git absolute ",
        "actual": "<fixture>/git absolute ",
        "exactMetadataExists": true,
        "neighborHasMetadata": false,
        "sentinelIntact": true
      },
      {
        "boundary": "backup git init",
        "argument": " relative git ",
        "expected": "<fixture>/ relative git ",
        "actual": "<fixture>/ relative git ",
        "exactMetadataExists": true,
        "neighborHasMetadata": false,
        "sentinelIntact": true
      },
      {
        "boundary": "backup sqlite list",
        "argument": "<fixture>/sqlite repository ",
        "expected": "<fixture>/sqlite repository ",
        "actual": "<fixture>/sqlite repository ",
        "snapshots": []
      }
    ],
    "pass": true,
    "limits": "Isolated local repositories only. No remote push, production state or database format change."
  }
}
Complete frozen native proof driver

Use the supported Node runtime against independently built checkouts:
node replace-four-backup-path-proof-20261109.mjs CHECKOUT red OUTPUT or green.
The output receipt includes its temporary fixture prefix; replace that prefix before sharing.

import assert from 'node:assert/strict';
import { execFileSync, spawnSync } from 'node:child_process';
import { createHash } from 'node:crypto';
import fs from 'node:fs/promises';
import os from 'node:os';
import path from 'node:path';

const [repo, phase, output] = process.argv.slice(2);
assert(repo && ['red', 'green'].includes(phase) && output);
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'leon-backup-path-'));
await fs.chmod(root, 0o700);
const home = path.join(root, 'home');
await fs.mkdir(home, { mode: 0o700 });
const config = path.join(root, 'openclaw.json');
await fs.writeFile(config, JSON.stringify({
  meta: { migrations: { skillWorkshopPlugin: true } },
  gateway: { mode: 'local' },
  agents: { ownership: 'explicit', entries: { main: { workspace: path.join(root, 'workspace') } },
    defaults: { systemAgent: { agentId: 'main' } } },
  plugins: { allow: [] },
  logging: { file: path.join(root, 'runtime.log'), consoleLevel: 'error' },
}), { mode: 0o600 });
const env = {
  PATH: process.env.PATH, LANG: 'C.UTF-8', NO_COLOR: '1', HOME: home,
  OPENCLAW_HOME: home, OPENCLAW_STATE_DIR: path.join(root, 'state'),
  OPENCLAW_CONFIG_PATH: config, OPENCLAW_NO_RESPAWN: '1',
  XDG_CONFIG_HOME: path.join(root, 'xdg-config'), XDG_CACHE_HOME: path.join(root, 'xdg-cache'),
};
const clean = value => value.replaceAll(root, '<fixture>').replaceAll(repo, '<checkout>');
const commands = [];
function cli(args, success = true) {
  const result = spawnSync(process.execPath, [path.join(repo, 'openclaw.mjs'), ...args], {
    cwd: root, env, encoding: 'utf8', timeout: 45000, maxBuffer: 2e6,
  });
  commands.push({ args: args.map(clean), code: result.status, signal: result.signal,
    stdout: clean(result.stdout ?? ''), stderr: clean(result.stderr ?? '') });
  if (result.error) throw result.error;
  assert.equal(result.signal, null);
  assert.equal(result.status === 0, success, clean(result.stderr));
  return JSON.parse(result.stdout);
}
const observations = [];
let failure;
try {
  for (const argument of [path.join(root, 'git absolute '), ' relative git ']) {
    const expected = path.resolve(root, argument);
    const neighbor = path.resolve(root, argument.trim());
    await fs.mkdir(neighbor, { recursive: true, mode: 0o700 });
    await fs.writeFile(path.join(neighbor, 'sentinel.txt'), 'existing neighbor remains private\n');
    const result = cli(['backup', 'git', 'init', '--repository', argument, '--json']);
    const actual = result.repositoryPath;
    const exactMetadataExists = await fs.stat(path.join(expected, '.git')).then(s => s.isDirectory(),
      error => error.code === 'ENOENT' ? false : Promise.reject(error));
    const neighborHasMetadata = await fs.stat(path.join(neighbor, '.git')).then(s => s.isDirectory(),
      error => error.code === 'ENOENT' ? false : Promise.reject(error));
    assert.equal(await fs.readFile(path.join(neighbor, 'sentinel.txt'), 'utf8'),
      'existing neighbor remains private\n');
    if (phase === 'green') {
      assert.equal(actual, expected);
      assert(exactMetadataExists);
      assert.equal(neighborHasMetadata, false);
      const gitDir = spawnSync('/usr/bin/git', ['-C', expected, 'rev-parse', '--absolute-git-dir'],
        { env, encoding: 'utf8' });
      assert.equal(gitDir.status, 0);
      assert.equal(gitDir.stdout.replace(/\r?\n$/, ''), path.join(expected, '.git'));
    } else {
      assert.notEqual(actual, expected);
      assert.equal(actual, neighbor);
      assert.equal(exactMetadataExists, false);
      assert(neighborHasMetadata);
    }
    observations.push({ boundary: 'backup git init', argument: clean(argument),
      expected: clean(expected), actual: clean(actual), exactMetadataExists, neighborHasMetadata,
      sentinelIntact: true });
  }
  const argument = path.join(root, 'sqlite repository ');
  await fs.mkdir(argument, { mode: 0o700 });
  const result = cli(['backup', 'sqlite', 'list', '--repository', argument, '--json']);
  assert.deepEqual(result.snapshots, []);
  assert.equal(result.repositoryPath === argument, phase === 'green');
  observations.push({ boundary: 'backup sqlite list', argument: clean(argument),
    expected: clean(argument), actual: clean(result.repositoryPath), snapshots: result.snapshots });
  const plain = path.join(root, 'plain');
  assert.equal(cli(['backup', 'git', 'init', '--repository', plain, '--json']).repositoryPath, plain);
  const blank = cli(['backup', 'git', 'init', '--repository', '   ', '--json'], false);
  assert.equal(blank.ok, false);
  assert.match(blank.error.message, /Missing required --repository value/);
} catch (error) {
  failure = error;
} finally {
  const receipt = { phase, at: new Date().toISOString(), runtime: process.version,
    head: execFileSync('/usr/bin/git', ['-C', repo, 'rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(),
    build: JSON.parse(await fs.readFile(path.join(repo, 'dist/build-info.json'), 'utf8')),
    ownerSha256: createHash('sha256').update(await fs.readFile(path.join(repo,
      'src/commands/backup-shared.ts'))).digest('hex'),
    fixture: root, commands, observations, pass: !failure,
    limits: 'Isolated local repositories only. No remote push, production state or database format change.',
    ...(failure ? { error: String(failure) } : {}),
  };
  await fs.mkdir(path.dirname(output), { recursive: true });
  await fs.writeFile(output, `${JSON.stringify(receipt, null, 2)}\n`);
  console.log(JSON.stringify({ phase, pass: !failure, observations, output }));
}
if (failure) throw failure;

AI-assisted implementation and author audit. Independent model review was waived by the contributor; no independent-review claim. No unsafe mixed/private agent logs are attached. Reproducible proof driver and sanitized readback are included above.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: S labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Preserves leading and trailing whitespace in backup repository, snapshot, restore-target, and scratch paths.

Example: Run openclaw backup git init --repository '/private/backup ' --json.

  • Before: Git initializes '/private/backup', silently dropping the trailing space.
  • After: Git initializes the requested '/private/backup ' directory.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, useful repair with credible shipped-CLI before/after evidence, meaningful regression coverage, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Reviewed-head built-CLI output on Linux exercises absolute and relative Git initialization and SQLite listing, with independent filesystem/native-Git readback, untouched trimmed neighbors, and ordinary/blank controls; supplied focused suites support other consumers, while native restore/schedule and Windows/macOS remain unclaimed.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Quoted backup paths can silently select a differently named neighboring directory.
Reason: Exact filesystem selection has clear correctness value, and the focused repair preserves existing validation, permissions, and durability.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR fixes wrong-directory selection still present on current main, and no actionable code defects were found.

Priority: P2
Reviewed head: adc987b8fc64b12ed4174c2c81ef4d16c8c97883

Before merge

  • Await maintainer action - Approve the pending GitHub Actions workflows for head adc987b so required CI can run.

Findings

None.

Agent review details

How this fits together

Backup CLI arguments flow through shared path resolution into Git and SQLite snapshot owners, which validate filesystem safety and create repositories or restore destinations.

flowchart TD
  A[Backup CLI arguments] --> B[Shared path resolution]
  B --> C[Git backup owner]
  B --> D[SQLite snapshot owner]
  C --> D
  D --> E[Guarded directory creation]
  E --> F[Identity pins and durable publication]
Loading

Technical review

Best possible solution:

Preserve literal whitespace through the existing shared resolver, snapshot directory owner, and Git path-output boundary while retaining their safety checks.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the trimming path, and supplied baseline/head built-CLI traces demonstrate wrong-directory selection and its correction; this review executed no target code.

Is this the best way to solve the issue?

The patch repairs the three demonstrated trimming boundaries using existing owners and dependency APIs, with no unnecessary production machinery or parallel policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d3f4f94fbb46.

Provenance checked

  • Shared required backup path resolution changes intended behavior with a stated reason (68b4aab: refactor(backup): unify required path resolution #128132 consolidated duplicate resolvers while preserving existing trimming and home expansion; this PR demonstrates why trimming selects the wrong directory.)
  • Archive versus repository path handling changes intended behavior with a stated reason (e32d529: fix(backup): preserve literal archive paths #186746 scoped literal handling to archive lifecycle operations; this PR supplies a separate reproduction for repository paths.)
  • Snapshot directory creation and publication keeps the original intent (0920946: fix(snapshot): make SQLite publication crash recoverable #113367 established identity-pinned directory creation and durable parent links; those checks remain around the replacement creation primitive.)
  • Git worktree-root validation keeps the original intent (37b4fc8: Git backup initialization verifies that the supplied repository is the actual worktree root; preserving path whitespace retains that comparison.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 68b4aab adds src/commands/backup-shared.ts:19 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 68b4aab8b389; files: src/commands/backup-shared.ts)
  • Alix-007: Raw commit e32d529 adds src/commands/backup-shared.ts:122 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e32d529a3b5d; files: src/commands/backup-shared.ts)

PR surface

Source -4, Tests +30, Docs +1, Other +2. Total +29 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 27 31 -4
Tests 2 37 7 +30
Docs 1 4 3 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 7 70 41 +29

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: canonical
Canonical: #195644
Summary: This PR owns the remaining repository-whitespace repair; related archive-selection work has distinct scope.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on maintainer.

Label justifications:

  • P2: Explicit backup paths with surrounding whitespace can silently select a different directory; the affected input shape has a limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-09T04:09:52.272Z sha 0388851 :: needs maintainer review before merge. :: none

Reviewed November 15, 2026, 10:47 AM ET / 15:47 UTC (Revision 2).

@Leon-SK668

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed head adc987b8fc64b12ed4174c2c81ef4d16c8c97883 merges current main and resolves the backup-path conflict while retaining its expected-error validation. All 65 current command tests and targeted static checks pass. The exact-head native build and frozen Git-init/SQLite-list proof were rerun: the literal directories are selected, trimmed neighbors remain untouched, and ordinary/blank controls pass. Full readback, the driver, prior-suite qualifications and current-head limits are in the updated PR body.

@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 15, 2026
@obviyus

obviyus commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the work here. We're closing this along with the other open PRs that apply the same change one call site at a time. This series changes symlink, physical-path and literal-path handling at each command separately; path resolution policy belongs in one shared owner and needs a maintainer decision. Please open one issue (or one PR at the shared owner) that covers the whole pattern, with a reproduction of real user-visible harm, instead of separate per-site PRs. Further per-site variants of this pattern will be closed.

@obviyus obviyus closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants