fix: forward single-edit jump wipe + backup same-second overwrite - #32
Draft
cursor[bot] wants to merge 2 commits into
Draft
fix: forward single-edit jump wipe + backup same-second overwrite#32cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
…_target The classic edit UI only sends host/ports/whitelist. updateRule treated a missing remote_target as clear-when-existing, so any edit of a jump rule silently fell back to agent localhost. Co-authored-by: Ethan <sreyun@users.noreply.github.com>
PG/VM/recordings backups used second-precision filenames with O_TRUNC / pg_dump --file. Concurrent admin + scheduler (or two admins) in the same second destroyed the other dump while both reported success. Reserve via O_EXCL + seq suffix; drop orphaned compile-broken test helpers. Co-authored-by: Ethan <sreyun@users.noreply.github.com>
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
Two high-severity correctness fixes from the critical-bug audit:
PUT /api/v1/forward/{id}treated an omittedremote_targetas clear-when-existing. The classic edit UI only sends host/ports/whitelist, so any edit of a jump rule permanently fell back to agent localhost.O_TRUNC/pg_dump --file. Concurrent admin + scheduler (or two admins) in the same second destroyed the other dump while both reported success. Now reserves unique stamps viaO_EXCL+ seq suffix.Also drops orphaned test helpers (
licenseResetForTest,classicAppJS) that already broke package compile after license cleanup.Test plan
go test -count=1 -run 'TestForwardEdit|TestUniqueBackupStamp|TestOpenExclusiveBackupFile|TestBackupKindOfAcceptsStampSuffix|TestForwardRules' ./cmd/server/go build ./cmd/server ./cmd/agent