Skip to content

Harden synchronization and release verification - #9

Merged
oovz merged 52 commits into
mainfrom
first-review
Sep 12, 2026
Merged

oovz merged 52 commits into
mainfrom
first-review

Conversation

@oovz

@oovz oovz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Hardens SPAS synchronization, CLI contracts, Git reference handling, and release verification.

  • Validate public remote visibility and persist explicit approval.
  • Add command timeouts and improve unlinked-workspace diagnostics.
  • Enforce path, Unicode, branch, and Git reference safety checks.
  • Stabilize JSON output, error codes, diff behavior, permissions, and recovery copies.
  • Strengthen merge protection and non-interactive Git execution.
  • Require CI and CodeQL before releases, and attest checksum artifacts.
  • Update the README and wiki to match the implementation and release process.
  • Prepare the branch for the v0.1.2 release tag after merge.

Contract & Risk Assessment

  • Affected commands include link, add, sync, diff, remove, doctor, and version.
  • JSON payloads, schema metadata, and error codes have intentional contract updates.
  • Git path/ref parsing, merge-option validation, timeout handling, and public-repository checks affect synchronization behavior.
  • Windows path-length and file-replacement handling are stricter.
  • Release builds now require successful CI and CodeQL checks and publish build provenance attestations.
  • No compatibility fallback paths were added. Documentation reflects the updated behavior.

Verification & Testing

  • git rev-list --count first-review --not origin/main — 42 branch-specific commits.
  • Commit-tree verification — all 42 rewritten commits preserve their original trees.
  • Conventional Commit subject check — 47/47 commit subjects pass.
  • Merge-base verification — remains 80f6638.
  • Release configuration review — GoReleaser injects the version from the release tag; the release workflow accepts semantic version tags.
  • go run . version --json — blocked in the review environment because the Go build cache path was inaccessible. No source changes were made by this check.

Contributor Checklist

  • [x ] Tests cover the changed behavior (or the PR explains why no test applies).
  • [x ] gofmt -w, go mod tidy -diff, tests, and go vet pass cleanly.
  • [x ] User-facing documentation in README.md or wiki/ matches the implementation.
  • [x ] The change contains no credentials, private assets, recovery files, or compiled binaries.

oovz added 30 commits August 25, 2026 15:05
Remove redundant branches from sync and GitHub reference checks, and keep the final exclusion set in scope across push retries.
…ralize commit.gpgsign and tag.gpgsign via command-line arguments and safety configuration so global signing settings do not prompt or break non-interactive synchronization.
Propagate the root timeout through Git subprocesses, preserve deadline errors, and document the --timeout flag.
Keep Git, data-directory, lock, and worktree diagnostics available in unlinked workspaces.
… Handle transient ERROR_SHARING_VIOLATION and ERROR_ACCESS_DENIED errors in MoveFileEx with bounded retries and backoff.
Validate total path length alongside component limits before accepting managed paths.
…t Version to "dev" and only adopt debug.ReadBuildInfo when Version is "dev". This prevents runtime build metadata from overwriting ldflags-injected versions.
…p Runner.Timeout from gitexec and rely solely on the caller's context to manage deadlines across child git processes. Release the command timeout cancel function deterministically in Execute and add tests for deadline propagation and exit code mapping.
Use typed Windows errors and return the caller's context error consistently after cancellation.
…wner and repo components to lowercase when resolving GitHub repository paths so references are case-insensitive.
Record approved public remotes in link state, report whether probing occurred, and run probes outside the workspace.
… probe Add workspace and link-state warnings when link checks are skipped in non-git or unlinked directories. Deduplicate the git version check to a single process spawn, and use PID-scoped lock probe files to prevent race conditions during concurrent runs.
…ce and clone roots on Windows during add and sync instead of rejecting long paths globally.
…ess Pass candidate paths over stdin with -z, --verbose, and --non-matching to verify all exclusions in one Git process.
Create workspace files with Git-style modes filtered by umask while keeping recovery copies owner-only.
Normalize error codes, emit empty arrays instead of null, and support JSON output for version.
Align the README and wiki with the JSON contract, audit follow-ups, and checksum-plus-attestation releases.
@oovz oovz changed the title fix multiple issues Harden synchronization and release verification Sep 9, 2026
Run native tests with -count=1 and -json. Upload results, stderr, and command timestamps while preserving test exit codes.
Keep raw selections through Diff and Remove validation, and enumerate staged rename sides without probing workspace write access.
Document read-only selection, Unicode identity checks, and separate captured and streaming budgets.
@oovz
oovz merged commit d643395 into main Sep 12, 2026
18 checks passed
@oovz
oovz deleted the first-review branch September 12, 2026 11:33
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.

1 participant