Repository navigation
v0.2.0.0 feat: preserve source directory structure in backups - #4
Merged
Merged
Conversation
Keep relative and home-contained paths in the destination, create safe missing parents, and retain mapped paths through byte and source checks. Cover nested selections, recursive copying, collisions, recovery, and the installed Node package with isolated Git fixtures.
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Use an explicit mapping for the 100 MiB scan fixture so temporary paths beneath the Windows home directory do not change its size-only assertion. Reproduced with an owned temporary directory beneath home before and after the fixture correction; production mapping behavior is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
backup cooking/too.txtstores onlycooking/too.txt, whilebackup cookingcopies its contents recursively undercooking/.Test Coverage
This is a bounded logical-path audit, not an instrumented line/branch-coverage percentage. The diagram groups closely related guards within the 30-path cap. GUI motion and LLM evals do not apply.
Remaining proposals:
Changes from the previous audit:
limit.binto scanSource. It keeps both original assertions. Windows temporary sources beneath home correctly map through AppData under the default resolver, so the old basename assertion mixed size validation with a host-layout assumption. Fixing the fixture isolates the existing size contract; it does not change production mapping behavior or add a logical path.Regression proof: no product regression reproduced by this re-audit. The parent reproduced the existing fixture assertion failure with TMPDIR beneath home, then verified the same assertions pass with the explicit approved key. This is test-fixture repair evidence, not a new production-regression test or base control; regression_proof counts remain zero.
Tests: 6 → 6 (+0 new files) during the original audit and this re-audit. Branch base: 5 → 6 (+1 test file).
Generated across this ship run: 2 retained test definitions / 2 scenarios in existing files; 0 extensions; 2 redundant proposals rejected. Final re-audit pass 2/2 was audit-only with zero generation allowance; 0 tests generated or extended in this pass. No source edits, test execution, commits or pushes by this re-auditor. The only new file from this re-audit is the requested temporary coverage-final.json artifact.
Validation: the parent reports the latest required local check after fixture repair passed with 142 tests, 4 Windows-only skips, 0 failures and 311 assertions. Evidence: 2026-10-07T09-36-10-697Z-tests-49112-63dec835.log, completed 2026-10-07T09:37:45Z. This re-audit did not rerun tests. Native CI rerun remains pending; no native CI success is claimed. Earlier generation evidence remains 2 targeted passes / 0 failures / 9 assertions with TypeScript and git diff --check passing.
Audit snapshot: HEAD 7daa7ec plus the existing two-line test/regressions.test.ts fixture correction, against origin/main.
Coverage gate: PASS — 90% value-weighted, 27/30 logical paths, 0 weak paths, 3 explicit additional-test proposals. The existing independent ratings remain valid after the test-only fixture repair. This is not instrumented line coverage.
Pre-Landing Review
Parent checklist and fresh native adversarial review completed on the final source tree. One misleading zero-copy error sentence and a host-dependent test fixture were fixed; the final passes found no remaining actionable implementation defect. Claude Code structured review: NO_FINDINGS. The final outside adversarial pass also found no actionable defect. All new source and tests are committed. Test fixtures were summary-only in adversarial reviews; their execution and test-value audit are separate evidence.
Exploratory QA
2026-10-07T09:37:45.506Z; native three-OS CI is now verified in the current results below. Exact selected remote paths, exclusion of unselected siblings, and recovered literal bytes are asserted by the integration/package tests.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Scope Drift
Scope Check: CLEAN. The approved path-mapping feature, safety checks, tests, and documentation are present; no unrelated implementation changes.
Plan Completion
Static plan-completion audit refreshed against origin/main at HEAD 7daa7ec plus the sole working-tree change in test/regressions.test.ts. Counts cover implementation and test creation only. All 30 deliverables remain complete; npm package metadata remains 0.2.0.
Refresh evidence: compared source, test, README and CI files against feature commit 0d22fbf. The only subsequent change in those surfaces is test/regressions.test.ts:248-253: the existing exact-100-MiB test now supplies the validated destination name limit.bin to scanSource. The original 100 * 1024 * 1024 size, ['limit.bin'] keys assertion and 'file' kind assertion remain unchanged (test/regressions.test.ts:240-258). This removes host temp/home location dependence without changing production mapping or weakening the size-boundary contract. Home-contained absolute mapping remains covered separately (test/path-mapping.test.ts:27-73; test/backup.test.ts:508-529). No new feature scope is introduced.
Execution-only verification handoff (outside completion counts; this audit ran no tests):
bun run checkso the CLI bundle is rebuilt before integration tests. Confirm package acceptance coverage and the existing three-OS CI matrix. Use fixture repositories only; do not write to the user's real backup clone or global installation during development verification." Required command: bun run check. Expected: typecheck/build and all applicable tests pass, including installed-package acceptance. Parent reports the current repaired-input full local check completed at 2026-10-07T09:37:45Z: 142 passed, 4 Windows-only skipped, 0 failed, 311 assertions. Parent evidence: 2026-10-07T09-36-10-697Z-tests-49112-63dec835.log. The audit did not independently execute that command. Parent also reports the former failure was reproduced with an owned TMPDIR beneath home and passed after this fixture repair.recoverhelper." Executable through bun run check (or existing bun run test:package for a focused run); expected remote path cooking/too.txt, absent too.txt and cooking/other.txt, restored bytes 'selected packaged bytes\n', and no Bun invocation. Test creation remains complete; native execution evidence must be retained with the final CI results.Linked Spec
Closes #3. All implementation and native three-OS acceptance checks are verified on
4ffc684.Spec archive:
20261007-preserve-source-paths-issue-3.md; filed2026-10-07T08:06:22.163108+00:00.Verification Results
3 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN:
bun run check: typecheck, build, full applicable suite4ffc684; current CI checksThe first CI run passed on Linux/macOS and failed one Windows test fixture. The two-line correction is committed in
4ffc684; no production code changed. The repaired commit passed all three native jobs.Skips follow platform/filesystem conditions. Installed npm-package execution under Node and fresh-clone recovery passed on every OS. Both Socket Security checks also passed; all five current-HEAD checks are successful.
The static Plan Completion and coverage audits above record their snapshot-time evidence. Current execution outcomes are tracked here; snapshot mentions of pending CI are historical once this table updates. This section supplies the current execution outcomes. No verification risk was waived.
Documentation
Status: current. README.md and CHANGELOG.md match the complete selected release candidate, including the Windows-independent 100 MiB test fixture repair. No documentation edits or blockers were found.
Audit scope: 16 release files relative to base
27e4fbe935a18d117027beb6e77c73f6aa4e32f9. At the audit snapshot, HEAD was7daa7ec17c8a0e51ce966c1781b0c0fcec3692b8and the two-line repair intest/regressions.test.tswas unstaged. This records the audited input and does not describe the branch state after the parent commits or publishes it. Recursive, NUL-safe discovery found two authored documentation files; both were read in full. Relevant path-mapping implementation, CLI help, the repaired test, and release metadata were checked. Other candidate bytes match the completed first audit, including production source and generated CLI output.Documentation health:
README.md— Current: hierarchy preservation, recursive directory copying, home-relative and absolute paths, destination validation, old-backup retention, mapped commit messages, and the 100 MiB limit agree with the implementation. The test fixture repair changes no public contract.CHANGELOG.md— Current: 0.2.0.0 records the release behavior and fixes, agrees with release metadata, and is discoverable through README.md.ARCHITECTURE.md,CONTRIBUTING.md, repositoryAGENTS.md, andTODOS.md— Skipped: absent from the tracked and nonignored inventory.Documentation coverage:
Coverage debt: no critical gaps or reference-only public behavior were found. Existing reference, examples, and explanations cover this CLI change; no separate tutorial was added. Internal helpers and the test fixture repair introduce no separately published API.
Diagram drift: none. No architecture diagrams were found in the authored documentation.
This was a static documentation audit, not test execution or CI verification. Native CI was pending at the audit snapshot and remains a separate parent-owned verification step. npm 0.2.0 and VERSION/CHANGELOG 0.2.0.0 follow the supplied release decision. No protected metadata, source, tests, generated output, Git state, or PR content was modified by this audit.
Test plan
bun run check— 142 pass, 4 Windows-only skips, 0 fail; includes typecheck/build and installed Node-package recovery.bun run buildandnode dist/cli.js --version— rebuilt release reports0.2.0.git diff --check— clean.Prepared with OpenAI Codex using the gstack ship workflow.