Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
9e7abfa
feat(fuzzer): greenfield attribution fuzzer with exact oracle
svarlamov Jun 1, 2026
1f33414
add plan
svarlamov May 18, 2026
d3e6d1e
add hunk_shift module extracting core line-shifting algorithm
svarlamov May 19, 2026
653bb21
add rewrite module with RewriteEvent, handle_rewrite_event, shift_aut…
svarlamov May 19, 2026
3b87f59
add derive_mappings_from_range_diff with range-diff parsing, squash d…
svarlamov May 19, 2026
20d5371
add cherry-pick two-pass matching algorithm (patch-id + positional)
svarlamov May 19, 2026
0158fcc
add working log migration and backward-reset handler
svarlamov May 19, 2026
495164f
add stash handler with metadata persistence and working log cleanup
svarlamov May 19, 2026
5b9f4a9
wire non-FF rewrite detection and cherry-pick/stash handlers into daemon
svarlamov May 19, 2026
a08d4d1
extract surviving functions before deletion of rebase_authorship.rs a…
svarlamov May 19, 2026
5b8cff3
relocate subcommand logic into dedicated module files
svarlamov May 19, 2026
4ba4db1
migrate CI module to use unified handle_rewrite_event
svarlamov May 19, 2026
d0da2fa
style: fix lint and format issues across new rewrite modules
svarlamov May 19, 2026
48ae6b8
refactor: delete dead rewrite machinery (~3,800 lines)
svarlamov May 20, 2026
216a770
refactor: delete remaining dead rewrite machinery (~10,500 lines)
svarlamov May 20, 2026
112bdbd
fix: address post-deletion regressions in rewrite handling
svarlamov May 20, 2026
9a38606
refactor: remove dead code functions (~700 lines)
svarlamov May 20, 2026
4a68d2c
style: fix formatting issues
svarlamov May 20, 2026
c3cbbb9
fix: correct test assertions to match new content-based attribution a…
svarlamov May 20, 2026
a7521ba
refactor: delete hooks module and remove rewrite_stash feature flag
svarlamov May 20, 2026
d68a88c
fix: use ref_changes fallback for stash SHA resolution
svarlamov May 22, 2026
ddbe922
Revert "fix: use ref_changes fallback for stash SHA resolution"
svarlamov May 22, 2026
8019959
fix: add explicit SemanticEvent::Reset handler for reliable reset pro…
svarlamov May 22, 2026
76908bb
fix: add ref_changes fallback for stash SHA resolution under parallel…
svarlamov May 22, 2026
0dec8b3
fix: resolve stash SHA via git rev-parse and stash metadata directory…
svarlamov May 22, 2026
c32e624
fix: resolve stash push head via rev-parse fallback and handle diverg…
svarlamov May 22, 2026
53493c3
fix: resolve stash push head from stash commit parent like main branch
svarlamov May 22, 2026
342b7c7
fix: remove unreliable rev-parse fallbacks from stash push handler
svarlamov May 22, 2026
2e3889b
fix: resolve stash push SHA at terminal event time for reliable attri…
svarlamov May 23, 2026
f283e6f
fix: make stash push terminal resolution non-fatal when refs/stash mi…
svarlamov May 23, 2026
bb6526e
fix: add direct ref file read as third fallback for stash push resolu…
svarlamov May 23, 2026
0fcdd37
fix: add StashRestore prerequisite for commit-time attribution recovery
svarlamov May 23, 2026
02f5e2a
fix: resolve stash branch target_head from stash parent commit
svarlamov May 23, 2026
2b5c402
style: fix formatting in daemon.rs
svarlamov May 23, 2026
7c9a431
fix: add rev-parse fallback for stash push SHA resolution
svarlamov May 23, 2026
7ee7fdc
revert: remove rev-parse fallback for stash push resolution
svarlamov May 23, 2026
712d368
fix: add pending stash fallback for reflog delta race
svarlamov May 23, 2026
435a217
fix: clean working log after saving pending stash and pass pathspecs
svarlamov May 23, 2026
2b2b7eb
fix: restrict pending stash to explicit Push kind only
svarlamov May 23, 2026
37e7caa
fix: resolve HEAD from filesystem when semantic event head is None fo…
svarlamov May 23, 2026
a8df30c
fix: read refs/stash from filesystem as fallback for stash push resol…
svarlamov May 23, 2026
e425d45
fix: resolve new_head from filesystem in checkout/switch working log …
svarlamov May 23, 2026
7507fa4
fix: simplify stash handlers to trust SemanticEvent head directly
svarlamov May 23, 2026
2716696
fix: remove stash fallback paths, leave single correct resolution path
svarlamov May 23, 2026
ec54683
chore: remove dead stash code
svarlamov May 23, 2026
b541c80
fix: correct compact_line_ranges and CI squash detection
svarlamov May 24, 2026
139f2c6
fix: use git diff-tree plumbing for all rewrite attribution shifting
svarlamov May 24, 2026
ca77611
perf: batch diff-tree calls via --stdin to avoid per-mapping process …
svarlamov May 25, 2026
4d6d833
perf: batch note reads/writes via centralized notes_api
svarlamov May 25, 2026
2cdce16
fix: restore CI commands, CI tests, and address PR review findings
svarlamov May 25, 2026
4d39d4d
fix: prevent data loss in partial squash and stash restore
svarlamov May 26, 2026
9fb12b3
chore: remove dead squash-authorship test
svarlamov May 28, 2026
ae0c13e
docs: add attribution fuzzer design spec
svarlamov May 20, 2026
16d71f7
chore: add task test:fuzz commands for attribution fuzzer
svarlamov May 21, 2026
5918ded
docs: add attribution fuzzer implementation plan
svarlamov May 21, 2026
5694cfa
feat: add partial staging, session verification, and destructive ops …
svarlamov May 22, 2026
ebf7845
feat(fuzzer): add combined ops category with cherry-pick, branch merg…
svarlamov May 22, 2026
50d90ad
feat(fuzzer): add marathon test profile (150-200 ops, #[ignore] gated)
svarlamov May 22, 2026
e9ddc93
feat(fuzzer): add 8 pathological squash operations targeting attribut…
svarlamov May 23, 2026
50bb5b1
refactor(fuzzer): address review findings and harden fuzzer
svarlamov May 23, 2026
72328c6
fix(taskfile): fix subtask arg propagation for fuzz:heavy and fuzz:ma…
svarlamov May 24, 2026
7c40b6f
fix: resolve cherry-pick reflog ambiguity by picking most recent chain
svarlamov May 25, 2026
a1e69e2
test: add deterministic regression tests for rewrite-ops race condition
svarlamov May 29, 2026
421d1bf
fix: resolve race condition after reset, rename tracking, and blamed_…
svarlamov May 29, 2026
2f091e7
fix: cherry-pick --no-commit attribution + rebase conflict note prese…
svarlamov May 30, 2026
0182f67
fix: resolve update-ref HEAD + rename attribution tracking
svarlamov May 30, 2026
569e029
fix: enable parent attribution inheritance for survivor lines in modi…
svarlamov Jun 1, 2026
6aa5363
refactor(fuzzer): verify attribution from disk, not in-memory model
svarlamov Jun 1, 2026
9b176b5
fix: remove duplicate mod fuzzer declaration after merge
svarlamov Jun 1, 2026
0fd5492
chore: remove dead code from sync_authorship and rebase_authorship
svarlamov Jun 1, 2026
e472e52
chore: remove squash-authorship command stub
svarlamov Jun 1, 2026
349fc4b
chore: remove dead command wrapper files
svarlamov Jun 1, 2026
ecc1e54
chore: remove dead rebase_authorship.rs (4741 lines)
svarlamov Jun 1, 2026
c0970ed
chore: remove dead rewrite_log, diff_tree_to_tree, install, _print_diff
svarlamov Jun 2, 2026
8b57c7a
fix: isolate test_sync unit tests from local dev environment
svarlamov Jun 2, 2026
84289c7
Fix commit carryover attribution snapshots
svarlamov Jun 2, 2026
dd91a1f
Fix amend attribution after later ref moves
svarlamov Jun 2, 2026
9144ee5
Remove stale carryover snapshot paths
svarlamov Jun 3, 2026
5dfa35d
Replace trace2 ref handling with reflog cursor
svarlamov Jun 3, 2026
8c38d3a
Handle pruned reflog cursor generations
svarlamov Jun 3, 2026
2a2fa55
Fix Windows trace bootstrap lint
svarlamov Jun 3, 2026
02e8373
Reserve trace order from def_repo
svarlamov Jun 3, 2026
a37030d
Bound failed rebase cursor consumption
svarlamov Jun 3, 2026
e6d77f0
Bound pull cursor to pull reflog action
svarlamov Jun 3, 2026
31cdb45
Bound failed rebase continue cursor spans
svarlamov Jun 3, 2026
ddd2e91
Eliminate live rewrite fallback paths
svarlamov Jun 3, 2026
fd024c8
Fix delayed rebase skip cursor ownership
svarlamov Jun 3, 2026
263e7f4
Remove CI flaky test retry scripts
svarlamov Jun 3, 2026
ecf0d5c
Defer TestRepo checkpoint daemon sync
svarlamov Jun 3, 2026
7a38cda
Restore CI squash rebase e2e tests
svarlamov Jun 3, 2026
2868b77
Fix Unix trace listener accept starvation
svarlamov Jun 3, 2026
4606b9b
Revert "Fix Unix trace listener accept starvation"
svarlamov Jun 3, 2026
5dac31b
Normalize daemon worktree path keys
svarlamov Jun 4, 2026
60050b6
Fix trace listener stalled connection starvation
svarlamov Jun 4, 2026
478b671
Fix flaky notes push test setup
svarlamov Jun 4, 2026
d839513
Prove daemon listener progress under stalled clients
svarlamov Jun 4, 2026
11a08dc
Remove stale wrapper state helpers
svarlamov Jun 4, 2026
bebf077
Fix Windows test cache paths
svarlamov Jun 4, 2026
b83f4da
Avoid Windows test cache key contention
svarlamov Jun 4, 2026
53230b1
Remove wrapper-daemon test mode
svarlamov Jun 4, 2026
edc475c
Use fail-fast cargo tests in CI
svarlamov Jun 4, 2026
f474f12
test cold trace2 repo startup
svarlamov Jun 4, 2026
edd90cd
test rebase conflict preserves session metadata
svarlamov Jun 4, 2026
20d7f07
Refactor rewrite ops to batch git data access
svarlamov Jun 5, 2026
a7503be
Fix CI handler fork note options after rebase
svarlamov Jun 5, 2026
6c6ea61
Require control ping for daemon readiness
svarlamov Jun 5, 2026
b0449cb
fix trace2 cursor races and batch rewrite attribution
svarlamov Jun 6, 2026
13b5677
Fix rebase conflict attribution mapping
svarlamov Jun 6, 2026
e7b7f60
Stabilize Copilot env-sensitive tests
svarlamov Jun 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
- id: set-matrix
run: |
if [ "${{ github.event_name }}" = "merge_group" ]; then
echo 'matrix={"include":[{"os":"ubuntu-latest","test_mode":"daemon","test_threads":4,"daemon_pool":4},{"os":"ubuntu-latest","test_mode":"wrapper-daemon","test_threads":4,"daemon_pool":4},{"os":"macos-latest","test_mode":"daemon","test_threads":2,"daemon_pool":2},{"os":"macos-latest","test_mode":"wrapper-daemon","test_threads":2,"daemon_pool":2}]}' >> "$GITHUB_OUTPUT"
echo 'matrix={"include":[{"os":"ubuntu-latest","test_threads":4,"daemon_pool":4},{"os":"macos-latest","test_threads":2,"daemon_pool":2}]}' >> "$GITHUB_OUTPUT"
else
echo 'matrix={"include":[{"os":"ubuntu-latest","test_mode":"daemon","test_threads":4,"daemon_pool":4},{"os":"ubuntu-latest","test_mode":"wrapper-daemon","test_threads":4,"daemon_pool":4},{"os":"windows-latest","test_mode":"daemon","test_threads":4,"daemon_pool":4},{"os":"windows-latest","test_mode":"wrapper-daemon","test_threads":4,"daemon_pool":4},{"os":"macos-latest","test_mode":"daemon","test_threads":2,"daemon_pool":2},{"os":"macos-latest","test_mode":"wrapper-daemon","test_threads":2,"daemon_pool":2}]}' >> "$GITHUB_OUTPUT"
echo 'matrix={"include":[{"os":"ubuntu-latest","test_threads":4,"daemon_pool":4},{"os":"windows-latest","test_threads":4,"daemon_pool":4},{"os":"macos-latest","test_threads":2,"daemon_pool":2}]}' >> "$GITHUB_OUTPUT"
fi

test:
name: Test on ${{ matrix.os }} (${{ matrix.test_mode }})
name: Test on ${{ matrix.os }}
needs: compute-matrix
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -85,25 +85,32 @@ jobs:
- name: Install Graphite CLI
run: npm install -g @withgraphite/graphite-cli@stable

- name: Install Task
uses: go-task/setup-task@01a4adf9db2d14c1de7a560f09170b6e0df736aa # v2

- name: Install mold linker (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y mold

- name: Run tests (Unix)
if: runner.os != 'Windows'
run: bash scripts/ci-test-with-retry.sh ${{ matrix.test_threads }}
run: task test TEST_THREADS=${{ matrix.test_threads }}
env:
CARGO_INCREMENTAL: 0
GIT_AI_TEST_GIT_MODE: ${{ matrix.test_mode }}
GIT_AI_TEST_SHARED_DAEMON_POOL_SIZE: ${{ matrix.daemon_pool }}
RUSTFLAGS: ${{ runner.os == 'Linux' && '-C link-arg=-fuse-ld=mold' || '' }}

- name: Run tests (Windows)
if: runner.os == 'Windows'
run: pwsh scripts/ci-test-with-retry.ps1 -TestThreads ${{ matrix.test_threads }}
shell: pwsh
run: |
$gitUsrBin = "C:\Program Files\Git\usr\bin"
if ((Test-Path $gitUsrBin) -and -not (($env:Path -split ";") -contains $gitUsrBin)) {
$env:Path = "$gitUsrBin;$env:Path"
}
task test TEST_THREADS=${{ matrix.test_threads }}
env:
CARGO_INCREMENTAL: 0
GIT_AI_TEST_GIT_MODE: ${{ matrix.test_mode }}
GIT_AI_TEST_SHARED_DAEMON_POOL_SIZE: ${{ matrix.daemon_pool }}

test-ignored:
Expand Down
7 changes: 2 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ task dev
# Build (only use this for checking that your changes compile)
task build

# Test (use these commands to run the test suite -- these calls are optimized for your system; all flags/args/modes can be combined)
task test # Run the full test suite in daemon mode (this is the default, when the user asks to run tests, this is the command)
# Test (use these commands to run the test suite -- these calls are optimized for your system; all flags/args can be combined)
task test # Run the full test suite
task test TEST_FILTER=foo # run specific test
task test NO_CAPTURE=true # Run with Cargo's --no-capture flag
task test EXTRA_TEST_BINARY_ARGS="--ignored" # ignored / exact / other flags
task test CARGO_TEST_ARGS="--lib" # cargo-level flags (rare)

# If the user explicitly asks for tests to be run in another mode (do not run test using these commands unless this test mode is explicitly asked for by the user)
task test:wrapper-daemon

# Lint & Format
task lint
task fmt
Expand Down
72 changes: 62 additions & 10 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,79 @@ tasks:
test:base:
internal: true
cmds:
- cargo test {{.CARGO_TEST_ARGS}} {{.TEST_FILTER}} -- --test-threads {{.TEST_THREADS}} {{.TEST_BINARY_ARGS}}
- cargo test {{.CARGO_TEST_ARGS}} {{.TEST_FILTER}} -- --test-threads {{.TEST_THREADS}} {{.TEST_BINARY_ARGS}} {{.SUBTASK_BINARY_ARGS}}
env:
GIT_AI_TEST_GIT_MODE: "{{.GIT_AI_TEST_GIT_MODE}}"
GIT_AI_TEST_SHARED_DAEMON_POOL_SIZE: "{{.TEST_THREADS}}"

test:
desc: Run unit tests (daemon mode by default)
desc: Run tests
cmds:
- task: test:base

test:fuzz:
desc: Run the attribution fuzzer (fixed seeds only)
cmds:
- task: test:base
vars:
GIT_AI_TEST_GIT_MODE: daemon
TEST_FILTER: fuzz_standard_seed_

test:wrapper-daemon:
desc: |
Run unit tests in wrapper-daemon mode. Wrapper-daemon mode is where we simulate `git` pointing to the git-ai-wrapped git, but
all git-ai processing is still done in the shared daemon with some extra context from the wrapper that is passed over the control
socket. Do not use this test mode unless explicitly requested, use `task test` for normal testing purposes.
test:fuzz:all:
desc: Run all fuzzer tests including random seed and heavy variants
cmds:
- task: test:base
vars:
TEST_FILTER: fuzz_

test:fuzz:heavy:
desc: Run all fuzzer tests with verbose output
cmds:
- task: test:base
vars:
TEST_FILTER: fuzz_
SUBTASK_BINARY_ARGS: "--nocapture"

test:fuzz:partial:
desc: Run partial staging fuzzer tests
cmds:
- task: test:base
vars:
TEST_FILTER: fuzz_partial_stage_

test:fuzz:destructive:
desc: Run destructive ops fuzzer tests (resets, stash, checkouts)
cmds:
- task: test:base
vars:
TEST_FILTER: fuzz_destructive_

test:fuzz:squash:
desc: Run squash-heavy fuzzer tests (targets attribution holes post-squash)
cmds:
- task: test:base
vars:
TEST_FILTER: fuzz_squash_

test:fuzz:combined:
desc: Run combined ops fuzzer tests (cherry-pick, branch merge, squash combos)
cmds:
- task: test:base
vars:
TEST_FILTER: fuzz_combined_

test:fuzz:workflow:
desc: Run workflow fuzzer tests (plumbing, fixup, cherry-pick ranges, rebase --onto)
cmds:
- task: test:base
vars:
TEST_FILTER: fuzz_workflow_

test:fuzz:marathon:
desc: Run marathon fuzzer tests (150-200 ops, very long running)
cmds:
- task: test:base
vars:
GIT_AI_TEST_GIT_MODE: wrapper-daemon
TEST_FILTER: fuzz_marathon_
SUBTASK_BINARY_ARGS: "--ignored"

lint:
desc: Run cargo check and clippy with warnings as errors
Expand Down
Loading
Loading