Commit Graph

222 Commits

Author SHA1 Message Date
TapTap 5dfc262cf7 fix: scanner leak, remove TSan (Docker incompatible)
CI / lint (push) Successful in 6s
CI / lint (pull_request) Successful in 5s
CI / build-and-test (push) Successful in 48s
CI / sanitizers (address) (push) Successful in 5s
CI / build-and-test (pull_request) Successful in 47s
CI / sanitizers (address) (pull_request) Successful in 4s
- Fix ArrayList leak in directory_scanner_next when no files found
- Remove TSan from CI matrix (Docker 'unexpected memory mapping')
- Keep ASan which now passes clean
2026-07-19 16:22:16 +02:00
TapTap ba6d42ea2d fix: const-correct local Config* in multiprocessing.c for cppcheck
CI / lint (push) Successful in 5s
CI / lint (pull_request) Successful in 6s
CI / build-and-test (push) Successful in 47s
CI / sanitizers (address) (push) Failing after 4s
CI / sanitizers (thread) (push) Failing after 4s
CI / build-and-test (pull_request) Successful in 47s
CI / sanitizers (address) (pull_request) Failing after 4s
CI / sanitizers (thread) (pull_request) Failing after 5s
2026-07-19 16:16:28 +02:00
TapTap 256e1d7567 fix: const-correct receive_incremental_check for cppcheck
CI / lint (push) Failing after 6s
CI / build-and-test (push) Has been skipped
CI / sanitizers (address) (push) Has been skipped
CI / sanitizers (thread) (push) Has been skipped
CI / lint (pull_request) Failing after 5s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (thread) (pull_request) Has been skipped
2026-07-19 16:13:47 +02:00
TapTap f6eeb69d77 ci: use find|xargs for clang-format to fix directory handling
CI / lint (push) Failing after 5s
CI / build-and-test (push) Has been skipped
CI / sanitizers (address) (push) Has been skipped
CI / sanitizers (thread) (push) Has been skipped
CI / lint (pull_request) Failing after 6s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (thread) (pull_request) Has been skipped
2026-07-19 16:09:13 +02:00
TapTap f899085de4 fix: reformat queue.c/queue.h after const-correctness change
CI / lint (push) Failing after 2s
CI / build-and-test (push) Has been skipped
CI / sanitizers (address) (push) Has been skipped
CI / sanitizers (thread) (push) Has been skipped
CI / lint (pull_request) Failing after 2s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (thread) (pull_request) Has been skipped
2026-07-19 16:06:57 +02:00
TapTap 5ede5c8bec ci: use fastsync-ci:v7 image with cppcheck and clang-format pre-installed
CI / sanitizers (thread) (push) Has been skipped
CI / lint (pull_request) Failing after 2s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (thread) (pull_request) Has been skipped
CI / lint (push) Failing after 3s
CI / build-and-test (push) Has been skipped
CI / sanitizers (address) (push) Has been skipped
2026-07-19 16:01:48 +02:00
TapTap 23b1d6660c fix: reformat codebase and fix const-correctness for CI lint
CI / lint (push) Failing after 16s
CI / build-and-test (push) Has been skipped
CI / sanitizers (address) (push) Has been skipped
CI / sanitizers (thread) (push) Has been skipped
CI / lint (pull_request) Failing after 44s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (thread) (pull_request) Has been skipped
- Reformat all C/H files to match .clang-format (LLVM style)
- Fix 26 cppcheck const-correctness warnings (constParameterPointer,
  constVariablePointer, constVariable)
- Update function declarations in headers to match const parameters
2026-07-19 15:57:31 +02:00
TapTap 1078b47955 Merge pull request 'feat: add delta transfer for incremental sync' (#22) from feature/delta-transfer into main
CI / build-and-test (push) Successful in 52s
Reviewed-on: #22
2026-07-19 15:51:27 +02:00
TapTap 02266710fb ci: add static analysis, sanitizers, and formatting enforcement
CI / lint (push) Failing after 16s
CI / build-and-test (push) Has been skipped
CI / sanitizers (address) (push) Has been skipped
CI / sanitizers (thread) (push) Has been skipped
CI / lint (pull_request) Failing after 30s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (thread) (pull_request) Has been skipped
Add Tier 1 review automation to catch issues before human review:

- Add cppcheck and clang-format to CI lint job
- Add sanitizer matrix (ASan + TSan) CI job
- Enable -Wextra -Wpedantic -Werror in CI build
- Add SANITIZER and STRICT_WARNINGS CMake options
- Add .clang-format for consistent code style
- Update Dockerfile with cppcheck and clang-format
- Fix sign-compare and unused-parameter warnings for -Werror
2026-07-19 15:37:18 +02:00
TapTap 12557c351c refactor: replace vendored xxhash.h with CMake FetchContent dependency
CI / build-and-test (push) Successful in 33s
CI / build-and-test (pull_request) Successful in 32s
Remove 7490-line vendored xxhash.h, use FetchContent to pull xxHash v0.8.3
at CMake configure time (SOURCE_SUBDIR cmake_unofficial). Links as static
library via the xxhash target.
2026-07-19 15:21:35 +02:00
TapTap d73d5c9d85 Merge pull request 'refactor: split test.py into modular pytest integration tests + benchmark tool' (#21) from refactor-tests into main
CI / build-and-test (push) Successful in 47s
Reviewed-on: #21
2026-07-19 15:11:29 +02:00
TapTap 045965f74c benchmark: add --progress flag with progress bar and ETA
CI / build-and-test (push) Successful in 48s
CI / build-and-test (pull_request) Successful in 47s
2026-07-19 15:07:53 +02:00
TapTap 784c57bd13 shell: add pytest to nix-shell environment
CI / build-and-test (push) Successful in 48s
CI / build-and-test (pull_request) Successful in 48s
2026-07-19 15:03:23 +02:00
TapTap 1fec43be0e Merge pull request 'feat: add opencode agents and skills for development workflows' (#23) from feat/opencode-agents-and-skills into main
CI / build-and-test (push) Successful in 26s
Reviewed-on: #23
2026-07-19 14:54:47 +02:00
TapTap 8141158a3d feat: add opencode agents and skills for development workflows
CI / build-and-test (push) Successful in 27s
CI / build-and-test (pull_request) Successful in 26s
New agents:
- architect: system design, module interactions, data flow
- debugger: crash/memory/thread debugging with ASan, TSan, valgrind, gdb
- security-auditor: TLS, input validation, buffer safety, crypto audit
- refactorer: DRY, separation of concerns, API simplification
- integrator: integration tests, CI/CD pipeline, end-to-end verification
- code-explainer: architecture walkthrough, code explanation

New skills:
- debug-workflow: structured debugging workflow
- refactor: code restructuring with test verification
- security-audit: full security review with checklist
- benchmark: performance benchmarking with multi-run medians
- release: version bump, tests, tagging

Improved existing:
- c-reviewer: added security checklist
- cmake-expert: added ASan/TSan/UBSan configs, ccache, cross-compilation
- perf-analyst: added perf/valgrind/gprof commands
- test-writer: added fuzzing harnesses, integration test patterns
- pr-build: added sanitizer build variants
- pr-review: added security review, performance impact assessment
2026-07-19 14:50:02 +02:00
TapTap 598e4e7514 fix: address PR review - rolling adler32, extract helpers, configurable max file size
CI / build-and-test (push) Successful in 29s
CI / build-and-test (pull_request) Successful in 28s
- Fix rolling adler32: add missing -1 in s2 update formula (was producing
  wrong checksums, causing zero block matches)
- Fix file_send_sendfile signature to match typedef (add unused
  compression_level param)
- Extract receive_delta_file() from receive_incremental_check() to reduce
  nesting depth
- Extract send_file_incremental() helper in client_send.c
- Add delta_max_file_size to Config, serialized over wire
- Add --delta-max CLI flag
- Add test_large_file_delta (200KB) and extra delta_should_attempt cases
- Remove unused pos_in_block variable from delta_compute
2026-07-19 02:02:28 +02:00
TapTap 4ed514ad1b benchmark: fix rsync network throttling via rsync daemon
CI / build-and-test (push) Successful in 48s
CI / build-and-test (pull_request) Successful in 47s
rsync local-to-local copies bypass the network stack entirely,
making tc/netem ineffective. Start an rsync daemon on TCP so
both tools see the same network conditions.
2026-07-18 20:08:54 +02:00
TapTap e16db56580 feat: add delta transfer for incremental sync
CI / build-and-test (push) Successful in 28s
CI / build-and-test (pull_request) Successful in 28s
Implement rsync-style delta transfer using rolling checksums (Adler-32 +
xxHash32). When a file exists on both sides but has changed, only the
changed blocks are transmitted instead of the entire file.

- New status codes: STATUS_DELTA_SIGNATURE, STATUS_DELTA_DATA
- Protocol version bumped to 1.2.0
- Server generates block signature, client computes delta
- Auto-fallback to whole-file when delta >= 70% of file size
- Works with zstd compression on delta stream
- Configurable block size (default 8KB, --delta-block flag)
- 13 unit tests covering hashing, signature roundtrip, delta compute/apply,
  file growth/shrink, and decision logic
2026-07-18 20:00:15 +02:00
TapTap f0c7bb791a benchmark: add rsync comparison, configurable data mix, custom network limits
CI / build-and-test (push) Successful in 48s
CI / build-and-test (pull_request) Successful in 48s
- Add rsync and rsync+zstd as baseline comparisons
- --random-ratio controls fraction of incompressible data (default 0.75)
- --delay, --jitter, --throughput, --loss for custom network simulation
- --no-rsync to skip rsync comparison
- Grouped output: FastSync vs rsync with speedup calculations
2026-07-18 19:55:43 +02:00
TapTap 34b46a92db tests: share server across tests, suppress probe noise
CI / build-and-test (push) Successful in 48s
CI / build-and-test (pull_request) Successful in 49s
- Add session-scoped shared_server fixture to avoid 27+ server start/stop cycles
- Refactor test_tcp.py and test_features.py to use shared server
- Suppress server health-check probe stderr noise in common.py
2026-07-18 19:48:19 +02:00
TapTap 51f20d1c91 benchmark: suppress server probe noise in output
CI / build-and-test (push) Successful in 3m9s
CI / build-and-test (pull_request) Successful in 3m9s
2026-07-18 19:32:48 +02:00
TapTap b28bac9f41 refactor: split test.py into modular pytest integration tests + benchmark tool
CI / build-and-test (push) Failing after 0s
CI / build-and-test (pull_request) Successful in 3m17s
- tests/integration/common.py: ServerManager (reuses server across tests),
  run_client, test data generation, verification utilities
- tests/integration/test_tcp.py: 14 TCP transport correctness tests
- tests/integration/test_ssh.py: 10 SSH transport tests (skip when unavailable)
- tests/integration/test_tls.py: 5 TLS encryption tests (new coverage!)
- tests/integration/test_features.py: 13 feature tests (incremental, delete,
  exclude, include, max/min size, bwlimit, dry run, archive, progress)
- tests/integration/test_preflight.py: 7 CLI validation/error tests
- benchmark/bench.py: standalone benchmark with JSON output, p50/p95, multi-run
- Updated Dockerfile with python3-pytest, openssl, openssh-client
- Updated CI to use pytest (gitea.tap-tap.win/taptap/fastsync-ci:v6)
- Removed old monolithic test.py
2026-07-18 19:19:33 +02:00
TapTap 43ba149ad5 Merge pull request 'docs: update README with TLS, incremental sync, server CLI, and corrected build requirements' (#20) from update-readme into main
CI / build-and-test (push) Successful in 27s
Reviewed-on: #20
2026-07-18 18:27:34 +02:00
TapTap 293ba5191e docs: update README with TLS, incremental sync, bandwidth limiting, server CLI, and corrected build requirements
CI / build-and-test (push) Successful in 26s
CI / build-and-test (pull_request) Successful in 26s
2026-07-18 18:20:54 +02:00
TapTap 0642a43c2c Merge pull request 'TLS transport: OpenSSL-based encrypted TCP' (#13) from tls-transport into main
CI / build-and-test (push) Successful in 26s
2026-07-18 17:54:25 +02:00
TapTap fed77f6ce0 ci: use v5 Docker image to force runner to pull updated image with libssl-dev
CI / build-and-test (push) Successful in 33s
CI / build-and-test (pull_request) Successful in 27s
2026-07-18 17:53:08 +02:00
TapTap 6de0998f69 ci: retrigger CI with updated Docker image
CI / build-and-test (push) Failing after 3s
CI / build-and-test (pull_request) Failing after 3s
2026-07-18 17:50:55 +02:00
TapTap 43cf0bd81e ci: add libssl-dev to Docker image for TLS transport
CI / build-and-test (push) Failing after 2s
CI / build-and-test (pull_request) Failing after 2s
2026-07-18 17:43:46 +02:00
TapTap 907baf3379 fix: initialize ssl/ssl_ctx in client_connect_ssh to prevent use-after-free
CI / build-and-test (push) Failing after 3s
CI / build-and-test (pull_request) Failing after 3s
2026-07-18 17:39:37 +02:00
TapTap 8b6550f8c6 fix: io_set_ssl NULL in client_disconnect, SSL* type safety in protocol.h 2026-07-18 17:39:37 +02:00
TapTap 20ede4391c Fix re-review: remove __thread from io_ssl (breaks -m), strtol port parsing, --ca warning 2026-07-18 17:39:37 +02:00
TapTap 864eb1316d Fix TLS code review issues: SSL cleanup, TLS 1.2 min, CA verify, deprecation guards, server --help, port validation, __thread io_ssl, shared accept loop 2026-07-18 17:39:37 +02:00
TapTap eff50346fd TLS transport: OpenSSL-based encrypted TCP
- New transport_tls.h/c: TLS server (server_create_tls, server_listen_tls)
  and client (client_connect_tls) using OpenSSL
- protocol.c: io_set_ssl() + SSL_read/SSL_write in send_n_data/receive_n_data
- transport_tcp.h: ssl/ssl_ctx fields added to Server/Client structs
- config.h/c: use_tls, tls_cert, tls_key fields
- client_cli.c: --tls, --cert, --key flags
- server.c: --tls, --cert, --key, -p flags with TLS support
- CMakeLists.txt: OpenSSL::SSL + OpenSSL::Crypto linkage
- shell.nix: openssl added to buildInputs
2026-07-18 17:38:55 +02:00
TapTap 25383f893b Merge pull request 'Incremental sync: --incremental to skip unchanged files' (#14) from incremental-sync into main
CI / build-and-test (push) Successful in 27s
Reviewed-on: #14
2026-07-18 17:36:25 +02:00
TapTap 46c650e9ae refactor: consolidate _no_path file send variants
CI / build-and-test (push) Successful in 26s
CI / build-and-test (pull_request) Successful in 26s
Add bool send_path parameter to file_send_single_calls and
file_send_sendfile, remove the _no_path variants. Callers in
client_send.c pass true (send path) or false (skip path) based
on whether an incremental check already transmitted the path.
2026-07-18 17:27:33 +02:00
TapTap 7876721906 refactor: extract receive_chunk_data and receive_manifest shared helpers
- receive_chunk_data(fd, config) -> Chunk*: shared receive/decompress/deserialize
  (eliminates ~25 lines of duplication between server.c and multiprocessing.c)
- receive_manifest(fd, config, next_status): moved from server.c to file.c,
  fixes missing 'Deleting files not in manifest...' log in multiprocessing.c
- Removes redundant manual free loop in multiprocessing.c manifest handling
  (array_list_create(free) destructor already handles this)
- server.c and multiprocessing.c: remove local chunk/manifest helpers,
  remove compression.h include (no longer needed)
2026-07-18 17:19:12 +02:00
TapTap 5ed12f2bf0 refactor: deduplicate server receive logic, extract shared helpers
- Extract file_save_to_disk() helper (replaces 4x duplicated disk-save boilerplate)
- Extract receive_incremental_check() shared helper (deduplicates STATUS_CHECK
  handling between server.c single-threaded and multiprocessing.c multi-threaded paths)
- Break receive_files() into receive_chunk() and receive_manifest() sub-handlers
- Add incremental sync test case to test.py
- Rebase onto main
2026-07-18 17:19:12 +02:00
TapTap 03d6ba0da5 fix: address review #69 - STATUS_ERROR sends, metadata_receive error handling, extract incremental_check helper 2026-07-18 17:19:12 +02:00
TapTap f1af88a25c Fix incremental-sync review: sendfile_no_path, reject -s+incremental, no data mutation, auto -M, STATUS_ERROR handling, PROTOCOL_VERSION bump 2026-07-18 17:19:12 +02:00
TapTap 1905369c9f Incremental sync: --incremental flag to skip unchanged files
- New STATUS_CHECK protocol status (value 6)
- Client sends path + size + mtime; server replies OK (skip) or NEXT (send)
- config.h/c: use_incremental field sent/received over wire
- file.c/h: file_send_single_calls_no_path helper for incremental path
- client_cli.c: --incremental flag
- client_send.c: per-file check before send in both single and chunk paths
- server.c: STATUS_CHECK handling in receive_files()
- multiprocessing.c: STATUS_CHECK handling in receive_thread()
- test.py: incremental sync test case
2026-07-18 17:19:12 +02:00
TapTap a3acf4b8b6 Merge pull request 'test: add --full flag for lightweight default mode' (#18) from ci-test-light into main
CI / build-and-test (push) Successful in 26s
Reviewed-on: #18
2026-07-18 16:33:02 +02:00
TapTap 478bdd6fe6 add docker as dependency
CI / build-and-test (push) Successful in 27s
CI / build-and-test (pull_request) Successful in 26s
2026-07-18 16:31:55 +02:00
TapTap e408b08443 fix: skip netem_reset when no sudo (light mode)
CI / build-and-test (push) Successful in 26s
CI / build-and-test (pull_request) Successful in 27s
2026-07-18 16:10:52 +02:00
TapTap 2c904bfac5 fix: handle missing ssh in preflight checks
CI / build-and-test (push) Failing after 4s
CI / build-and-test (pull_request) Failing after 4s
2026-07-18 16:08:26 +02:00
TapTap e9554c1e69 ci: add integration tests (light mode)
CI / build-and-test (push) Failing after 4s
CI / build-and-test (pull_request) Failing after 4s
2026-07-18 16:06:22 +02:00
TapTap 8f2205dd30 test: add --full flag, default mode runs 5 fast tests (~0.3s)
CI / build-and-test (push) Successful in 4s
CI / build-and-test (pull_request) Successful in 4s
Default mode skips bulk data, network shaping, SSH/rsync
comparisons, and feature tests. --full restores original
31-test suite with LAN profiling and all benchmarks.
2026-07-18 16:02:36 +02:00
TapTap 70ab76fe90 Merge pull request 'ci: add build and unit test pipeline' (#17) from actions into main
CI / build-and-test (push) Successful in 4s
Reviewed-on: #17
2026-07-18 15:52:06 +02:00
TapTap ed7f8ee56e ci: add g++ and libc6-dev, use v4 image (verified locally)
CI / build-and-test (push) Successful in 4s
CI / build-and-test (pull_request) Successful in 4s
2026-07-18 15:31:41 +02:00
TapTap 8c7ebbfe32 ci: add make to Docker image, use v3 tag
CI / build-and-test (push) Failing after 10s
2026-07-18 15:27:35 +02:00
TapTap cc09bedc07 ci: use v2 image tag to bypass runner cache
CI / build-and-test (push) Failing after 8s
2026-07-18 15:20:57 +02:00