Skip to content

v3.30.4: preserve sync data on invalid edits and read failures - #97

Merged
puretensor merged 1 commit into
mainfrom
audit/sync-preserve-data-on-errors
Sep 12, 2026
Merged

puretensor merged 1 commit into
mainfrom
audit/sync-preserve-data-on-errors

Conversation

@puretensor

@puretensor puretensor commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Malformed task_edit deadline values currently clear an existing deadline and report success. Incremental sync also treats every task-row read error as deletion, returning an advanced cursor that can permanently hide an update from a client.

This change accepts only strings or explicit JSON null for deadline edits and propagates database/pool/decode failures during delta reads. Missing rows retain the existing tombstone behavior. No schema or valid-request changes are required.

Regression evidence against a95a43b: a boolean deadline returned sync_status: ok with deadline: null; renaming the isolated test database's task table returned HTTP 200 instead of 500. Both regression tests now pass. Coverage also includes numbers/arrays/objects, valid date and null edits, retrying a rejected command ID, missing fields, recovery using the original cursor, and deletion tombstones.

Validation on Rust 1.98.1, all exit 0:

cargo test --workspace --locked
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo build --workspace --locked
cargo test -p ptask-distill --features native-ml --locked
cargo clippy -p ptask-distill --all-targets --features native-ml --locked -- -D warnings
cargo fmt --all -- --check
cargo deny check advisories licenses sources
bash scripts/ci-version-check.sh
bash scripts/generated-artifacts.sh --check
bash scripts/ci-production-build-check.sh
actionlint
python3 -m unittest discover -s scripts/tests -v
PYTHONPATH=dashboard python3 -m unittest discover -s dashboard/tests -v
node --test dashboard/tests/face_unlock.test.mjs dashboard/tests/face_unlock_markup.test.mjs dashboard/tests/domains_markup.test.mjs
git diff --check
git diff origin/main -- . ':!Cargo.lock' | gitleaks stdin --redact --no-banner --log-level warn

The original regression run was cargo test -p ptask-server routes::sync::tests --locked: two expected failures and one existing pass. Final workspace tests include both fixed regressions. Builds used a dedicated audit target directory and CPU fence; database tests used disposable stores. Remote CI is separate from these local results and will run on this PR.

Compatibility: clients receive a command error for invalid deadline types, and HTTP 500 on real delta read failures; they must retry using their previous cursor. Valid inputs, command idempotency and tombstones are preserved. Workspace, internal dependency requirements, lockfile and manpage are bumped together to v3.30.4; no dependencies were upgraded. Independent branch from main at a95a43b, with no dependency on other audit PRs. Other independent audit PRs also bump version metadata, so reconcile those stamps when landing them. No deployment or production testing performed. No overlapping open issue or PR was found.

Additional validation limits

Native-feature tests include existing model-dependent cases that can return early when assets are unavailable; model-loaded coverage is not claimed. Local builds were debug workspace builds, not release or cross-target builds. Dependency-policy checks passed with pre-existing yanked chacha20 0.10.0 and unused BSD-2-Clause allowance warnings. The upstream-backed chacha20 correction is isolated in PR #102, not folded into this defect branch.

@puretensor
puretensor merged commit d46e6a8 into main Sep 12, 2026
7 checks passed
@puretensor
puretensor deleted the audit/sync-preserve-data-on-errors branch September 12, 2026 09:57
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