You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9b81f46
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Improve testkit robustness and release readiness (#1)
## Summary
- harden snapshot restoration by rejecting unsafe archive paths and
skipping root pseudo-entry when creating tar snapshots
- replace custom string splitting utilities with standard library
parsing for remotes, branch lists, and SHA trimming
- add baseline CI (`go vet` + `go test`) and expand README
requirements/common usage patterns for release readiness
## Test plan
- [x] `gofmt -w fixtures.go snapshots.go`
- [x] `go test ./...`
- [x] `go vet ./...`
Made with [Cursor](https://cursor.com)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touching snapshot restore and path handling can break existing tests
or introduce regressions in file extraction behavior, though changes add
explicit safety checks and new test coverage. CI/toolchain updates are
low risk but may surface new failures on older Go versions.
>
> **Overview**
> Improves release readiness by adding a GitHub Actions CI workflow that
runs `go vet` and `go test` on PRs and `main`, and by expanding
`README.md` plus a new `DEVELOPER_GUIDE.md` with usage and
contribution/release guidance.
>
> Hardens snapshot creation/restoration by skipping the tar root
pseudo-entry, normalizing snapshot names, and preventing path
traversal/absolute paths during `RestoreSnapshot` via `safeJoin` (with
new snapshot safety tests).
>
> Makes git-output parsing more robust by switching `GetRemotes`,
`GetBranches`, and `GetCurrentSHA` to standard-library string
trimming/splitting, adds coverage for remote URLs containing spaces,
introduces new USB-volume fixture helpers (`usb_fixtures.go`) with
tests, and updates `go.mod` to Go 1.22.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d0c6cb2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Expanded README with API overview, quickstart, usage examples
* Added developer guide with setup, testing, contribution, and release
guidance
* **Chores**
* Updated declared Go toolchain version to 1.22
* Added CI workflow to run vet and tests on PRs and main
* **Bug Fixes**
* Safer snapshot restore/load path handling and normalized snapshot
naming
* More robust parsing of repository metadata output
* **New Features**
* Test utilities for USB-volume fixtures and related helpers
* **Tests**
* Added tests for snapshot safety, name normalization, restore behavior,
remotes parsing, and USB fixture utilities
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ben Schellenberger <TBRX103@users.noreply.github.com>
0 commit comments