Skip to content

Refuse unsafe GeoLab Mongo reset targets - #939

Merged
wangyinz merged 1 commit into
masterfrom
codex/issue-797-geolab-reset-guard
Aug 25, 2026
Merged

wangyinz merged 1 commit into
masterfrom
codex/issue-797-geolab-reset-guard

Conversation

@wangyinz

Copy link
Copy Markdown
Member

Closes #797.

Canonicalizes GeoLab's MongoDB reset root and target before any destructive operation. Reset now rejects empty, relative, root, home, workspace, database-root, file, traversal, symlink-escape, and prefix-collision targets, and only removes a canonical nested database directory.

Validation:

  • contract tests: 11 passed; exact master baseline: 10 failed, 1 passed
  • contract plus adjacent sharding regression: 16 passed
  • sh -n, bash -n, Black, py_compile, and git diff --check: passed

Independent agent review: PASS with no code changes. The review additionally verified that all rejected cases exit before rm or directory creation and leave the filesystem snapshot unchanged.

@codecov

codecov Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.34%. Comparing base (f99649a) to head (b98f839).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #939   +/-   ##
=======================================
  Coverage   74.34%   74.34%           
=======================================
  Files         183      183           
  Lines       36506    36506           
  Branches     2540     2540           
=======================================
  Hits        27141    27141           
  Misses       8455     8455           
  Partials      910      910           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wangyinz
wangyinz marked this pull request as draft August 14, 2026 06:00
@wangyinz
wangyinz marked this pull request as ready for review August 14, 2026 15:45
@wangyinz
wangyinz force-pushed the codex/issue-797-geolab-reset-guard branch from fe7718f to b98f839 Compare August 25, 2026 02:59
@wangyinz
wangyinz merged commit 03e993f into master Aug 25, 2026
22 checks passed
@wangyinz
wangyinz deleted the codex/issue-797-geolab-reset-guard branch August 25, 2026 03:22
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.

[P1][GeoLab] Refuse unsafe Mongo reset targets before recursive deletion

1 participant