Skip to content

Validate user refs and reset forced branch targets - #2000

Merged
timsehn merged 1 commit into
masterfrom
fix/ref-name-validation
Aug 6, 2026
Merged

Validate user refs and reset forced branch targets#2000
timsehn merged 1 commit into
masterfrom
fix/ref-name-validation

Conversation

@timsehn

@timsehn timsehn commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • validate branch and tag names with shared Git-style rules, including DoltLite pseudo-ref and 40-hex commit-hash collisions
  • reset an overwritten destination to a clean working set for forced branch create and copy
  • honor -f for branch rename, replacing the destination ref and carrying the source working set across the rename

Failure before

DoltLite accepted ambiguous refs such as HEAD, WORKING, bad..name, and empty tag names. A forced create or copy updated only the destination tip, leaving its previous dirty working set attached. Forced rename ignored -f and failed whenever the destination existed.

The force bug was visible even when both branches pointed at the same commit: after dirtying victim, dolt_branch('-f', 'victim', 'HEAD') returned success, but reopening victim still exposed the dirty row and a nonempty dolt_status.

Validation

  • fail-before reproductions for stale forced-update working sets, ignored forced rename, and accepted malformed refs
  • test/vc_oracle_branch_test.sh: 45 passed, 0 failed
  • test/vc_oracle_tags_test.sh: 19 passed, 0 failed
  • test/run_doltlite_tests.sh build/doltlite: 99/99 suites; 310,162 regression assertions
  • make lint
  • git diff --check

Co-Authored-By: OpenAI Codex noreply@openai.com

Reject branch and tag names that collide with ref syntax, commit hashes, or DoltLite's pseudo-refs through a shared validator. Make forced branch create and copy reset the destination working set, and honor forced rename by replacing the destination with the source branch and its working state.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

DoltLite source coverage

Metric Covered Total Coverage
Lines 43057 51025 84.38%
Branches 18888 28216 66.94%
Functions 2100 2298 91.38%

Merged 163 pooled raw profiles from the distributed Linux correctness jobs.

Per-file coverage (91 files)
File Lines Branches Functions
src/btree_orig_api.c 85.87% 76.19% 87.18%
src/chunk_file.c 100.00% 100.00% 100.00%
src/chunk_index.c 88.76% 76.47% 100.00%
src/chunk_refs.c 99.35% 85.48% 100.00%
src/chunk_staging.c 87.50% 77.05% 94.12%
src/chunk_store.c 91.01% 75.00% 100.00%
src/chunk_store_commit.c 86.32% 66.96% 100.00%
src/chunk_store_lock.c 94.25% 77.47% 100.00%
src/chunk_store_refs_api.c 91.52% 77.40% 100.00%
src/chunk_wal.c 94.24% 75.00% 92.86%
src/doltlite.c 100.00% 100.00% 100.00%
src/doltlite_add.c 85.19% 67.71% 100.00%
src/doltlite_ancestor.c 88.68% 66.11% 100.00%
src/doltlite_at.c 77.98% 59.93% 94.12%
src/doltlite_blame.c 80.70% 58.94% 96.43%
src/doltlite_branch.c 86.78% 80.20% 100.00%
src/doltlite_branches.c 93.51% 77.27% 92.86%
src/doltlite_checkout.c 76.38% 59.81% 100.00%
src/doltlite_cherry_pick.c 70.53% 55.08% 71.43%
src/doltlite_chunk_walk.c 88.60% 64.19% 100.00%
src/doltlite_cmd.c 69.23% 60.83% 93.33%
src/doltlite_commit.c 93.22% 73.08% 100.00%
src/doltlite_commit_ancestors.c 90.65% 68.89% 92.31%
src/doltlite_commit_cmd.c 75.72% 69.42% 100.00%
src/doltlite_config.c 77.54% 71.43% 100.00%
src/doltlite_conflicts.c 81.83% 58.92% 93.44%
src/doltlite_constraint_violations.c 81.56% 55.91% 92.86%
src/doltlite_core.c 91.69% 72.22% 100.00%
src/doltlite_creds.c 84.01% 54.75% 89.74%
src/doltlite_dbpage.c 92.68% 73.21% 91.67%
src/doltlite_diff.c 81.99% 63.68% 92.86%
src/doltlite_diff_stat.c 94.04% 75.52% 95.45%
src/doltlite_diff_table.c 93.78% 68.45% 97.14%
src/doltlite_gc.c 77.11% 56.01% 96.30%
src/doltlite_hashof.c 75.64% 62.86% 94.44%
src/doltlite_history.c 85.61% 70.55% 100.00%
src/doltlite_http_remote.c 82.22% 57.17% 92.31%
src/doltlite_ignore.c 90.06% 66.67% 100.00%
src/doltlite_log.c 94.38% 70.16% 92.31%
src/doltlite_merge.c 96.94% 74.49% 100.00%
src/doltlite_merge_cmd.c 88.89% 73.50% 100.00%
src/doltlite_merge_constraints.c 88.25% 67.65% 100.00%
src/doltlite_merge_constraints_check.c 92.68% 65.76% 100.00%
src/doltlite_merge_constraints_fk.c 77.09% 55.86% 85.71%
src/doltlite_merge_constraints_unique.c 86.50% 64.37% 100.00%
src/doltlite_merge_pass1.c 91.02% 74.87% 100.00%
src/doltlite_merge_pass2.c 62.90% 57.69% 100.00%
src/doltlite_merge_rows.c 88.25% 69.37% 100.00%
src/doltlite_merge_schema.c 84.75% 63.03% 96.55%
src/doltlite_merge_status.c 91.98% 73.53% 92.31%
src/doltlite_patch.c 94.92% 74.25% 97.83%
src/doltlite_rebase.c 85.57% 59.77% 100.00%
src/doltlite_record.c 75.90% 57.54% 92.86%
src/doltlite_ref.c 96.97% 77.27% 100.00%
src/doltlite_remote.c 81.98% 63.65% 95.92%
src/doltlite_remote_sql.c 63.89% 55.98% 92.86%
src/doltlite_remotesrv.c 75.94% 64.12% 90.62%
src/doltlite_reset.c 86.10% 71.53% 100.00%
src/doltlite_revert.c 79.29% 68.18% 100.00%
src/doltlite_schema_diff.c 92.38% 69.46% 96.88%
src/doltlite_schemas.c 68.97% 44.87% 90.91%
src/doltlite_status.c 92.46% 71.84% 97.22%
src/doltlite_tag.c 80.07% 56.62% 93.33%
src/doltlite_tls.c 85.04% 60.91% 92.31%
src/doltlite_verify_constraints.c 74.11% 58.46% 100.00%
src/doltlite_workspace.c 89.46% 65.50% 100.00%
src/pager_shim.c 58.00% 64.73% 32.37%
src/prolly_btree.c 83.75% 65.32% 88.00%
src/prolly_btree_catalog.c 80.81% 66.17% 96.67%
src/prolly_btree_cursor.c 86.32% 62.69% 97.92%
src/prolly_btree_cursor_count.c 78.78% 55.70% 100.00%
src/prolly_btree_cursor_payload.c 78.81% 60.38% 94.12%
src/prolly_btree_cursor_seek.c 73.88% 61.69% 82.35%
src/prolly_btree_mutation.c 85.54% 65.05% 97.92%
src/prolly_btree_orig.c 83.44% 35.71% 87.67%
src/prolly_btree_state.c 93.89% 67.48% 100.00%
src/prolly_btree_txn.c 82.63% 69.75% 98.00%
src/prolly_cache.c 93.24% 69.70% 100.00%
src/prolly_check.c 60.36% 62.96% 100.00%
src/prolly_chunker.c 94.04% 78.38% 100.00%
src/prolly_cursor.c 89.62% 80.95% 100.00%
src/prolly_diff.c 52.48% 38.62% 60.87%
src/prolly_hash.c 93.65% 80.00% 100.00%
src/prolly_hashset.c 90.48% 80.56% 100.00%
src/prolly_mutate.c 87.07% 78.08% 100.00%
src/prolly_mutmap.c 92.95% 80.40% 100.00%
src/prolly_node.c 89.25% 73.64% 100.00%
src/prolly_three_way_diff.c 95.58% 85.90% 100.00%
src/prolly_three_way_merge.c 80.78% 66.67% 91.67%
src/prolly_xxhash.c 100.00% 100.00% 100.00%
src/sortkey.c 93.06% 80.14% 100.00%

Download HTML and LCOV artifacts from this workflow run.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

DoltLite performance vs PR base

  • Baseline: 998cba0006ed50bda635fcbe7633c363cf934def
  • Candidate: 18fd5384134a3b99a6f6011efd5a3eeb3655a07f
  • Overall ratio: 1.001x
  • Gate result: PASS
  • Gates: individual > 1.25x with more than 5.00ms regression; section, suite, or overall > 1.15x with the same minimum delta
  • vc individual gate: > 1.50x with more than 25.00ms regression
  • Confirmed failed gates: none
  • Automatic retries: none
Suite Workloads Baseline total Candidate total Ratio Result
blobpk 69 11.98s 11.96s 0.998x PASS
compositepk 69 12.00s 11.97s 0.997x PASS
int 69 10.94s 10.97s 1.003x PASS
textpk 69 11.99s 12.04s 1.004x PASS
vc 13 918.78ms 918.16ms 0.999x PASS
blobpk details
Section Test Baseline Candidate Delta Ratio Result
mem_reads oltp_point_select 37.10ms 37.00ms -97us 0.997x PASS
mem_reads oltp_range_select 14.00ms 13.94ms -54us 0.996x PASS
mem_reads oltp_sum_range 13.87ms 14.00ms +127us 1.009x PASS
mem_reads oltp_order_range 3.20ms 3.17ms -34us 0.989x PASS
mem_reads oltp_distinct_range 4.23ms 4.24ms +8us 1.002x PASS
mem_reads oltp_index_scan 6.44ms 6.34ms -96us 0.985x PASS
mem_reads select_random_points 20.72ms 20.65ms -68us 0.997x PASS
mem_reads select_random_ranges 5.19ms 5.20ms +8us 1.002x PASS
mem_reads covering_index_scan 4.64ms 4.80ms +167us 1.036x PASS
mem_reads groupby_scan 34.80ms 33.97ms -833us 0.976x PASS
mem_reads index_join 9.63ms 9.49ms -137us 0.986x PASS
mem_reads index_join_scan 5.46ms 5.71ms +244us 1.045x PASS
mem_reads types_table_scan 1.25s 1.26s +13.28ms 1.011x PASS
mem_reads table_scan 1.40s 1.39s -12.66ms 0.991x PASS
mem_reads oltp_read_only 138.15ms 138.60ms +448us 1.003x PASS
mem_writes oltp_bulk_insert 352.99ms 354.08ms +1.09ms 1.003x PASS
mem_writes oltp_insert 40.00ms 39.92ms -79us 0.998x PASS
mem_writes oltp_update_index 131.66ms 131.39ms -268us 0.998x PASS
mem_writes oltp_update_non_index 84.64ms 85.25ms +610us 1.007x PASS
mem_writes oltp_delete_insert 104.23ms 103.91ms -329us 0.997x PASS
mem_writes oltp_write_only 62.55ms 62.75ms +206us 1.003x PASS
mem_writes types_delete_insert 55.35ms 56.11ms +751us 1.014x PASS
mem_writes oltp_read_write 140.28ms 141.69ms +1.41ms 1.010x PASS
file_reads oltp_point_select 61.63ms 61.69ms +61us 1.001x PASS
file_reads oltp_range_select 16.68ms 16.78ms +103us 1.006x PASS
file_reads oltp_sum_range 16.85ms 16.63ms -219us 0.987x PASS
file_reads oltp_order_range 3.62ms 3.61ms -7us 0.998x PASS
file_reads oltp_distinct_range 4.68ms 4.70ms +11us 1.002x PASS
file_reads oltp_index_scan 8.98ms 8.95ms -25us 0.997x PASS
file_reads select_random_points 23.66ms 24.34ms +676us 1.029x PASS
file_reads select_random_ranges 7.69ms 7.74ms +48us 1.006x PASS
file_reads covering_index_scan 7.22ms 7.15ms -78us 0.989x PASS
file_reads groupby_scan 35.16ms 34.48ms -680us 0.981x PASS
file_reads index_join 11.53ms 11.20ms -325us 0.972x PASS
file_reads index_join_scan 5.90ms 6.13ms +226us 1.038x PASS
file_reads types_table_scan 1.26s 1.24s -18.17ms 0.986x PASS
file_reads table_scan 1.41s 1.39s -17.65ms 0.987x PASS
file_reads oltp_read_only 176.89ms 176.79ms -97us 0.999x PASS
file_writes oltp_bulk_insert 378.23ms 381.06ms +2.83ms 1.007x PASS
file_writes oltp_insert 52.65ms 52.41ms -242us 0.995x PASS
file_writes oltp_update_index 167.81ms 169.80ms +1.99ms 1.012x PASS
file_writes oltp_update_non_index 110.93ms 110.03ms -901us 0.992x PASS
file_writes oltp_delete_insert 131.18ms 129.98ms -1.20ms 0.991x PASS
file_writes oltp_write_only 84.14ms 83.74ms -400us 0.995x PASS
file_writes types_delete_insert 72.44ms 73.06ms +614us 1.008x PASS
file_writes oltp_read_write 165.90ms 166.43ms +534us 1.003x PASS
ac_reads oltp_point_select 63.36ms 63.02ms -342us 0.995x PASS
ac_reads oltp_range_select 16.72ms 16.63ms -91us 0.995x PASS
ac_reads oltp_sum_range 16.86ms 16.66ms -196us 0.988x PASS
ac_reads oltp_order_range 3.63ms 3.55ms -83us 0.977x PASS
ac_reads oltp_distinct_range 4.70ms 4.68ms -25us 0.995x PASS
ac_reads oltp_index_scan 9.25ms 9.12ms -129us 0.986x PASS
ac_reads select_random_points 25.36ms 24.87ms -485us 0.981x PASS
ac_reads select_random_ranges 7.84ms 7.70ms -145us 0.982x PASS
ac_reads covering_index_scan 7.40ms 7.24ms -160us 0.978x PASS
ac_reads groupby_scan 35.56ms 34.61ms -954us 0.973x PASS
ac_reads index_join 11.37ms 11.55ms +176us 1.015x PASS
ac_reads index_join_scan 5.83ms 5.96ms +133us 1.023x PASS
ac_reads types_table_scan 1.25s 1.26s +8.78ms 1.007x PASS
ac_reads table_scan 1.41s 1.41s -1.87ms 0.999x PASS
ac_reads oltp_read_only 178.78ms 176.08ms -2.70ms 0.985x PASS
ac_writes oltp_bulk_insert_ac 79.19ms 79.80ms +617us 1.008x PASS
ac_writes oltp_insert_ac 103.13ms 102.83ms -301us 0.997x PASS
ac_writes oltp_update_index_ac 114.29ms 114.53ms +245us 1.002x PASS
ac_writes oltp_update_non_index_ac 92.20ms 96.26ms +4.06ms 1.044x PASS
ac_writes oltp_delete_insert_ac 105.05ms 107.09ms +2.05ms 1.019x PASS
ac_writes oltp_write_only_ac 103.18ms 103.81ms +629us 1.006x PASS
ac_writes types_delete_insert_ac 94.17ms 97.21ms +3.03ms 1.032x PASS
ac_writes oltp_read_write_ac 113.56ms 111.97ms -1.59ms 0.986x PASS
compositepk details
Section Test Baseline Candidate Delta Ratio Result
mem_reads oltp_point_select 40.18ms 40.40ms +216us 1.005x PASS
mem_reads oltp_range_select 21.81ms 21.06ms -753us 0.965x PASS
mem_reads oltp_sum_range 21.02ms 20.85ms -175us 0.992x PASS
mem_reads oltp_order_range 3.98ms 3.84ms -142us 0.964x PASS
mem_reads oltp_distinct_range 5.03ms 4.90ms -130us 0.974x PASS
mem_reads oltp_index_scan 6.16ms 6.17ms +8us 1.001x PASS
mem_reads select_random_points 32.05ms 31.42ms -630us 0.980x PASS
mem_reads select_random_ranges 8.98ms 8.81ms -176us 0.980x PASS
mem_reads covering_index_scan 4.42ms 4.19ms -228us 0.948x PASS
mem_reads groupby_scan 40.27ms 38.67ms -1.60ms 0.960x PASS
mem_reads index_join 10.26ms 10.22ms -37us 0.996x PASS
mem_reads index_join_scan 5.38ms 5.35ms -32us 0.994x PASS
mem_reads types_table_scan 1.23s 1.24s +8.64ms 1.007x PASS
mem_reads table_scan 1.39s 1.39s -1.56ms 0.999x PASS
mem_reads oltp_read_only 173.36ms 169.36ms -4.00ms 0.977x PASS
mem_writes oltp_bulk_insert 355.16ms 358.29ms +3.13ms 1.009x PASS
mem_writes oltp_insert 36.89ms 36.38ms -511us 0.986x PASS
mem_writes oltp_update_index 116.28ms 116.33ms +51us 1.000x PASS
mem_writes oltp_update_non_index 83.74ms 83.39ms -355us 0.996x PASS
mem_writes oltp_delete_insert 94.79ms 95.55ms +759us 1.008x PASS
mem_writes oltp_write_only 57.99ms 57.52ms -474us 0.992x PASS
mem_writes types_delete_insert 54.37ms 54.38ms +14us 1.000x PASS
mem_writes oltp_read_write 155.21ms 153.12ms -2.08ms 0.987x PASS
file_reads oltp_point_select 65.09ms 64.39ms -693us 0.989x PASS
file_reads oltp_range_select 24.39ms 24.00ms -385us 0.984x PASS
file_reads oltp_sum_range 23.98ms 23.83ms -152us 0.994x PASS
file_reads oltp_order_range 4.35ms 4.29ms -60us 0.986x PASS
file_reads oltp_distinct_range 5.43ms 5.36ms -71us 0.987x PASS
file_reads oltp_index_scan 8.70ms 8.62ms -80us 0.991x PASS
file_reads select_random_points 36.06ms 35.91ms -158us 0.996x PASS
file_reads select_random_ranges 11.74ms 11.65ms -94us 0.992x PASS
file_reads covering_index_scan 6.72ms 6.79ms +69us 1.010x PASS
file_reads groupby_scan 41.15ms 39.59ms -1.56ms 0.962x PASS
file_reads index_join 12.40ms 12.32ms -80us 0.994x PASS
file_reads index_join_scan 5.87ms 6.01ms +143us 1.024x PASS
file_reads types_table_scan 1.22s 1.22s -6.22ms 0.995x PASS
file_reads table_scan 1.39s 1.40s +10.03ms 1.007x PASS
file_reads oltp_read_only 210.12ms 205.13ms -4.99ms 0.976x PASS
file_writes oltp_bulk_insert 375.90ms 376.75ms +848us 1.002x PASS
file_writes oltp_insert 46.57ms 45.82ms -753us 0.984x PASS
file_writes oltp_update_index 141.98ms 140.50ms -1.49ms 0.990x PASS
file_writes oltp_update_non_index 106.37ms 103.04ms -3.33ms 0.969x PASS
file_writes oltp_delete_insert 118.33ms 119.19ms +851us 1.007x PASS
file_writes oltp_write_only 78.02ms 77.28ms -740us 0.991x PASS
file_writes types_delete_insert 67.25ms 67.64ms +390us 1.006x PASS
file_writes oltp_read_write 173.71ms 173.25ms -455us 0.997x PASS
ac_reads oltp_point_select 64.58ms 64.70ms +129us 1.002x PASS
ac_reads oltp_range_select 24.66ms 24.02ms -636us 0.974x PASS
ac_reads oltp_sum_range 23.91ms 23.73ms -176us 0.993x PASS
ac_reads oltp_order_range 4.35ms 4.24ms -113us 0.974x PASS
ac_reads oltp_distinct_range 5.44ms 5.34ms -100us 0.982x PASS
ac_reads oltp_index_scan 8.96ms 8.54ms -424us 0.953x PASS
ac_reads select_random_points 36.11ms 35.36ms -746us 0.979x PASS
ac_reads select_random_ranges 11.71ms 11.61ms -94us 0.992x PASS
ac_reads covering_index_scan 6.74ms 6.60ms -137us 0.980x PASS
ac_reads groupby_scan 41.04ms 39.52ms -1.52ms 0.963x PASS
ac_reads index_join 12.58ms 12.49ms -81us 0.994x PASS
ac_reads index_join_scan 5.92ms 5.90ms -23us 0.996x PASS
ac_reads types_table_scan 1.23s 1.22s -7.29ms 0.994x PASS
ac_reads table_scan 1.38s 1.38s -4.29ms 0.997x PASS
ac_reads oltp_read_only 211.80ms 206.25ms -5.55ms 0.974x PASS
ac_writes oltp_bulk_insert_ac 82.60ms 77.04ms -5.56ms 0.933x PASS
ac_writes oltp_insert_ac 99.50ms 100.39ms +892us 1.009x PASS
ac_writes oltp_update_index_ac 111.48ms 110.92ms -557us 0.995x PASS
ac_writes oltp_update_non_index_ac 96.28ms 100.01ms +3.73ms 1.039x PASS
ac_writes oltp_delete_insert_ac 107.43ms 105.76ms -1.67ms 0.984x PASS
ac_writes oltp_write_only_ac 102.58ms 105.65ms +3.06ms 1.030x PASS
ac_writes types_delete_insert_ac 91.83ms 92.66ms +826us 1.009x PASS
ac_writes oltp_read_write_ac 113.03ms 112.31ms -721us 0.994x PASS
int details
Section Test Baseline Candidate Delta Ratio Result
mem_reads oltp_point_select 27.41ms 27.29ms -119us 0.996x PASS
mem_reads oltp_range_select 11.81ms 11.78ms -24us 0.998x PASS
mem_reads oltp_sum_range 11.34ms 11.37ms +30us 1.003x PASS
mem_reads oltp_order_range 2.89ms 2.86ms -33us 0.989x PASS
mem_reads oltp_distinct_range 3.87ms 3.86ms -14us 0.996x PASS
mem_reads oltp_index_scan 4.79ms 4.72ms -75us 0.984x PASS
mem_reads select_random_points 11.06ms 10.68ms -377us 0.966x PASS
mem_reads select_random_ranges 3.92ms 3.90ms -11us 0.997x PASS
mem_reads covering_index_scan 4.02ms 4.00ms -20us 0.995x PASS
mem_reads groupby_scan 34.05ms 34.23ms +182us 1.005x PASS
mem_reads index_join 7.61ms 7.61ms -3us 1.000x PASS
mem_reads index_join_scan 4.62ms 4.62ms +2us 1.000x PASS
mem_reads types_table_scan 1.25s 1.26s +6.04ms 1.005x PASS
mem_reads table_scan 1.37s 1.37s -363us 1.000x PASS
mem_reads oltp_read_only 115.19ms 114.76ms -432us 0.996x PASS
mem_writes oltp_bulk_insert 237.04ms 237.97ms +935us 1.004x PASS
mem_writes oltp_insert 28.14ms 27.89ms -245us 0.991x PASS
mem_writes oltp_update_index 103.78ms 103.70ms -78us 0.999x PASS
mem_writes oltp_update_non_index 57.90ms 57.42ms -484us 0.992x PASS
mem_writes oltp_delete_insert 77.47ms 77.08ms -390us 0.995x PASS
mem_writes oltp_write_only 44.83ms 44.16ms -674us 0.985x PASS
mem_writes types_delete_insert 39.34ms 39.34ms -1us 1.000x PASS
mem_writes oltp_read_write 104.18ms 103.35ms -829us 0.992x PASS
file_reads oltp_point_select 55.35ms 55.87ms +515us 1.009x PASS
file_reads oltp_range_select 14.80ms 14.81ms +11us 1.001x PASS
file_reads oltp_sum_range 14.09ms 14.29ms +195us 1.014x PASS
file_reads oltp_order_range 3.21ms 3.20ms -2us 0.999x PASS
file_reads oltp_distinct_range 4.19ms 4.16ms -33us 0.992x PASS
file_reads oltp_index_scan 7.94ms 7.96ms +26us 1.003x PASS
file_reads select_random_points 14.11ms 13.86ms -249us 0.982x PASS
file_reads select_random_ranges 6.80ms 6.82ms +16us 1.002x PASS
file_reads covering_index_scan 7.07ms 7.16ms +89us 1.013x PASS
file_reads groupby_scan 34.82ms 34.57ms -250us 0.993x PASS
file_reads index_join 9.53ms 9.50ms -31us 0.997x PASS
file_reads index_join_scan 4.98ms 4.98ms -1us 1.000x PASS
file_reads types_table_scan 1.25s 1.26s +12.31ms 1.010x PASS
file_reads table_scan 1.36s 1.38s +14.11ms 1.010x PASS
file_reads oltp_read_only 155.49ms 155.25ms -242us 0.998x PASS
file_writes oltp_bulk_insert 256.86ms 258.32ms +1.46ms 1.006x PASS
file_writes oltp_insert 35.30ms 35.23ms -75us 0.998x PASS
file_writes oltp_update_index 126.93ms 125.30ms -1.63ms 0.987x PASS
file_writes oltp_update_non_index 79.79ms 79.62ms -162us 0.998x PASS
file_writes oltp_delete_insert 96.10ms 95.47ms -631us 0.993x PASS
file_writes oltp_write_only 63.99ms 62.78ms -1.21ms 0.981x PASS
file_writes types_delete_insert 52.43ms 52.49ms +65us 1.001x PASS
file_writes oltp_read_write 123.29ms 123.15ms -132us 0.999x PASS
ac_reads oltp_point_select 56.15ms 56.50ms +351us 1.006x PASS
ac_reads oltp_range_select 14.73ms 14.79ms +54us 1.004x PASS
ac_reads oltp_sum_range 14.26ms 14.40ms +140us 1.010x PASS
ac_reads oltp_order_range 3.23ms 3.19ms -38us 0.988x PASS
ac_reads oltp_distinct_range 4.19ms 4.20ms +9us 1.002x PASS
ac_reads oltp_index_scan 8.03ms 7.94ms -93us 0.988x PASS
ac_reads select_random_points 14.10ms 14.09ms -12us 0.999x PASS
ac_reads select_random_ranges 6.79ms 6.79ms -1us 1.000x PASS
ac_reads covering_index_scan 7.14ms 7.23ms +92us 1.013x PASS
ac_reads groupby_scan 34.68ms 34.67ms -14us 1.000x PASS
ac_reads index_join 9.78ms 9.82ms +37us 1.004x PASS
ac_reads index_join_scan 5.00ms 5.01ms +8us 1.002x PASS
ac_reads types_table_scan 1.25s 1.27s +11.94ms 1.010x PASS
ac_reads table_scan 1.36s 1.37s +6.31ms 1.005x PASS
ac_reads oltp_read_only 155.45ms 156.13ms +684us 1.004x PASS
ac_writes oltp_bulk_insert_ac 61.70ms 61.06ms -643us 0.990x PASS
ac_writes oltp_insert_ac 77.80ms 77.83ms +26us 1.000x PASS
ac_writes oltp_update_index_ac 95.45ms 95.01ms -442us 0.995x PASS
ac_writes oltp_update_non_index_ac 73.42ms 71.22ms -2.20ms 0.970x PASS
ac_writes oltp_delete_insert_ac 83.59ms 84.43ms +846us 1.010x PASS
ac_writes oltp_write_only_ac 82.60ms 82.43ms -172us 0.998x PASS
ac_writes types_delete_insert_ac 73.81ms 71.03ms -2.79ms 0.962x PASS
ac_writes oltp_read_write_ac 93.20ms 89.41ms -3.79ms 0.959x PASS
textpk details
Section Test Baseline Candidate Delta Ratio Result
mem_reads oltp_point_select 34.99ms 36.01ms +1.02ms 1.029x PASS
mem_reads oltp_range_select 13.97ms 14.01ms +41us 1.003x PASS
mem_reads oltp_sum_range 13.65ms 13.56ms -96us 0.993x PASS
mem_reads oltp_order_range 3.24ms 3.22ms -20us 0.994x PASS
mem_reads oltp_distinct_range 4.23ms 4.17ms -60us 0.986x PASS
mem_reads oltp_index_scan 6.13ms 6.13ms +2us 1.000x PASS
mem_reads select_random_points 21.10ms 21.25ms +149us 1.007x PASS
mem_reads select_random_ranges 5.32ms 5.28ms -32us 0.994x PASS
mem_reads covering_index_scan 4.89ms 4.85ms -34us 0.993x PASS
mem_reads groupby_scan 36.18ms 36.00ms -182us 0.995x PASS
mem_reads index_join 10.05ms 10.61ms +560us 1.056x PASS
mem_reads index_join_scan 5.83ms 5.95ms +120us 1.021x PASS
mem_reads types_table_scan 1.30s 1.33s +21.62ms 1.017x PASS
mem_reads table_scan 1.47s 1.46s -12.77ms 0.991x PASS
mem_reads oltp_read_only 137.55ms 134.37ms -3.18ms 0.977x PASS
mem_writes oltp_bulk_insert 340.31ms 344.97ms +4.66ms 1.014x PASS
mem_writes oltp_insert 40.23ms 40.28ms +57us 1.001x PASS
mem_writes oltp_update_index 143.24ms 141.51ms -1.73ms 0.988x PASS
mem_writes oltp_update_non_index 91.62ms 89.77ms -1.84ms 0.980x PASS
mem_writes oltp_delete_insert 111.12ms 111.01ms -113us 0.999x PASS
mem_writes oltp_write_only 66.91ms 66.87ms -43us 0.999x PASS
mem_writes types_delete_insert 56.76ms 57.48ms +723us 1.013x PASS
mem_writes oltp_read_write 141.89ms 140.38ms -1.51ms 0.989x PASS
file_reads oltp_point_select 64.51ms 64.21ms -302us 0.995x PASS
file_reads oltp_range_select 17.03ms 16.90ms -125us 0.993x PASS
file_reads oltp_sum_range 16.55ms 16.61ms +58us 1.004x PASS
file_reads oltp_order_range 3.57ms 3.54ms -37us 0.990x PASS
file_reads oltp_distinct_range 4.55ms 4.53ms -25us 0.995x PASS
file_reads oltp_index_scan 9.29ms 9.21ms -76us 0.992x PASS
file_reads select_random_points 23.70ms 23.80ms +99us 1.004x PASS
file_reads select_random_ranges 8.24ms 8.23ms -17us 0.998x PASS
file_reads covering_index_scan 7.78ms 7.72ms -51us 0.993x PASS
file_reads groupby_scan 36.02ms 36.11ms +83us 1.002x PASS
file_reads index_join 11.25ms 11.05ms -197us 0.982x PASS
file_reads index_join_scan 6.17ms 6.11ms -65us 0.989x PASS
file_reads types_table_scan 1.25s 1.25s +1.64ms 1.001x PASS
file_reads table_scan 1.36s 1.37s +13.09ms 1.010x PASS
file_reads oltp_read_only 170.35ms 171.45ms +1.10ms 1.006x PASS
file_writes oltp_bulk_insert 368.11ms 368.38ms +275us 1.001x PASS
file_writes oltp_insert 52.00ms 52.89ms +889us 1.017x PASS
file_writes oltp_update_index 171.69ms 171.56ms -138us 0.999x PASS
file_writes oltp_update_non_index 116.21ms 114.65ms -1.56ms 0.987x PASS
file_writes oltp_delete_insert 138.05ms 139.07ms +1.02ms 1.007x PASS
file_writes oltp_write_only 90.14ms 89.01ms -1.14ms 0.987x PASS
file_writes types_delete_insert 75.56ms 74.52ms -1.03ms 0.986x PASS
file_writes oltp_read_write 158.92ms 162.50ms +3.58ms 1.023x PASS
ac_reads oltp_point_select 65.54ms 65.49ms -53us 0.999x PASS
ac_reads oltp_range_select 16.89ms 16.80ms -86us 0.995x PASS
ac_reads oltp_sum_range 16.55ms 16.42ms -130us 0.992x PASS
ac_reads oltp_order_range 3.53ms 3.54ms +2us 1.001x PASS
ac_reads oltp_distinct_range 4.52ms 4.50ms -19us 0.996x PASS
ac_reads oltp_index_scan 9.10ms 9.06ms -42us 0.995x PASS
ac_reads select_random_points 23.25ms 23.37ms +124us 1.005x PASS
ac_reads select_random_ranges 8.24ms 8.22ms -23us 0.997x PASS
ac_reads covering_index_scan 7.72ms 7.74ms +13us 1.002x PASS
ac_reads groupby_scan 36.08ms 36.04ms -42us 0.999x PASS
ac_reads index_join 11.38ms 11.61ms +234us 1.021x PASS
ac_reads index_join_scan 6.18ms 6.20ms +24us 1.004x PASS
ac_reads types_table_scan 1.27s 1.29s +15.11ms 1.012x PASS
ac_reads table_scan 1.44s 1.44s -208us 1.000x PASS
ac_reads oltp_read_only 176.10ms 175.13ms -974us 0.994x PASS
ac_writes oltp_bulk_insert_ac 63.48ms 66.84ms +3.36ms 1.053x PASS
ac_writes oltp_insert_ac 84.64ms 79.13ms -5.50ms 0.935x PASS
ac_writes oltp_update_index_ac 98.97ms 98.39ms -571us 0.994x PASS
ac_writes oltp_update_non_index_ac 75.56ms 83.60ms +8.04ms 1.106x PASS
ac_writes oltp_delete_insert_ac 89.51ms 89.58ms +68us 1.001x PASS
ac_writes oltp_write_only_ac 86.13ms 90.31ms +4.18ms 1.048x PASS
ac_writes types_delete_insert_ac 75.13ms 72.45ms -2.68ms 0.964x PASS
ac_writes oltp_read_write_ac 92.57ms 98.81ms +6.24ms 1.067x PASS
vc details
Section Test Baseline Candidate Delta Ratio Result
vc status_clean_many_tables 81.12ms 81.06ms -54us 0.999x PASS
vc status_dirty_many_tables 84.90ms 84.91ms +7us 1.000x PASS
vc diff_regular_working_one_table 77.90ms 77.36ms -544us 0.993x PASS
vc diff_regular_working_many_tables 89.91ms 89.84ms -74us 0.999x PASS
vc diff_stat_working_many_tables 89.93ms 90.68ms +752us 1.008x PASS
vc diff_schema_working_many_tables 91.13ms 90.79ms -345us 0.996x PASS
vc branch_list_many_branches 21.75ms 21.68ms -70us 0.997x PASS
vc branch_create_delete 24.70ms 24.47ms -226us 0.991x PASS
vc checkout_branch_clean 54.77ms 55.13ms +361us 1.007x PASS
vc merge_data_no_conflicts 29.25ms 28.68ms -563us 0.981x PASS
vc merge_schema_no_conflicts 21.78ms 21.68ms -106us 0.995x PASS
vc merge_data_conflicts 125.75ms 126.02ms +266us 1.002x PASS
vc merge_data_conflicts_with_resolve 125.89ms 125.86ms -29us 1.000x PASS

All relative performance gates passed.

@itoqa

itoqa Bot commented Aug 6, 2026

Copy link
Copy Markdown

Ito QA test results
Commit: ad05d83: 18 test cases ran, 17 passed ✅, 1 additional finding ⚠️.

Summary

Coverage spans branch and tag creation, copying, moving, renaming, resetting, deletion, and transaction handling, including persistence across reopening and visibility across connections. It also exercises edge cases and invalid or adversarial names, malformed operations, dirty working data, schema replacement, rollback behavior, and safe reference resolution, with the tested application behavior broadly healthy.

Safe to merge — the only finding is a minor, non-regression validation-message defect unrelated to this PR; it does not create refs or alter existing data. The PR has no attributable failures, so the finding is a flag for later rather than a merge blocker.

Tests run by Ito

View full run

Result Severity Type Description
Rename The current branch was renamed onto an existing destination. The destination replaced its old content, kept the source's unsaved row, and the old source branch was removed.
Rename The source branch replaced the existing destination while the unrelated current branch stayed unchanged. The destination showed the source data with no old destination-only or uncommitted rows, and the source branch was removed.
Rename Force-renaming the current default branch to an existing destination succeeds inside a transaction. After reopening, the destination is still current and default, the dirty row is preserved, and the old branch is gone.
Reset Recreating the existing feature branch from main removed its old dirty row. The reopened branch contained only 1|base and its status was clean.
Reset The forced copy replaced the destination with the source rows. The destination-only dirty row was gone and the status was clean after reopening it.
Reset A missing destination was created successfully. Existing clean and dirty destinations were replaced only with force, and each one reopened with the target rows and a clean status.
Reset The destination reopened with the source schema and rows. Its old schema, dirty row, status entries, and conflicts were gone.
Transaction The malformed branch name was rejected. The active branch stayed on main, no new branch was created, and the savepoint was rolled back as documented.
Transaction Creating, copying, and moving branches inside one transaction succeeded. After reopening the database, feature, main, and moved_copy were still present and main was still active.
Transaction Deleting a missing tag returned the expected not-found error, and an invalid tag name was rejected without changing the valid v1 tag.
Transaction The malformed checkout was rejected, the start branch and its commit stayed intact, and a later valid checkout to start succeeded.
Transaction Invalid branch, tag, and checkout commands created no hidden refs. After both release and rollback paths, the database still showed only main as the active branch.
Transaction Moving a dirty branch inside an explicit transaction kept the destination active and preserved the changed content. After the transaction was committed, a refreshed second connection saw the same destination and dirty status, while the old source branch stayed gone.
Validation Malformed branch and tag names were rejected, while a 40-character non-hex name and feature/ready were saved and still resolved after reopening.
Validation HEAD, the full commit hash, the feature branch, the tracking reference, and the v1 tag all resolve to the expected commit. Missing and malformed references return a clear invalid-reference error, and the active branch stays on main.
Validation Reserved names, 40-character hexadecimal names, and .lock names were rejected for branches and tags. A same-length name made of non-hex characters was accepted, persisted after reopening, and resolved to the original commit.
Validation Deleting reserved, malformed, or differently cased names returned not-found errors. Exact branch and tag names were deleted successfully, and reopening left the main branch intact.
⚠️ Minor severity Validation Creating a branch named '-' should return the same invalid branch name error used for other reserved names. Instead, the command returns unknown option '-' before it reaches name validation, although the database remains unchanged.
Additional Findings Details

These findings are unrelated to the current changes but were observed during testing.

⚪ Branch dash name shows the wrong error
  • Severity: Minor Minor severity
  • Description: Creating a branch named '-' should return the same invalid branch name error used for other reserved names. Instead, the command returns unknown option '-' before it reaches name validation, although the database remains unchanged.
  • Impact: Users who try to create a branch named '-' receive a misleading option error instead of a clear invalid-name message. The branch is not created and existing data remains unchanged.
  • Steps to Reproduce:
    1. Create a local database with one committed table row and the default main branch.
    2. Run SELECT dolt_branch('-');.
    3. Check the returned error and list the branches.
    4. Observe an unknown-option error for '-' and no new branch; tag creation for the same reserved name returns the invalid-name error.
  • Stub / mock content: The test used an isolated local DoltLite database and executable. No stubs, mocks, or bypasses were applied for this test in the recorded run.
  • Code Analysis: The new shared validator in src/doltlite_ref.c:15-61 explicitly rejects null and empty names, reserved pseudo-references, including '-' at lines 21-26, and other invalid ref syntax. Branch creation eventually calls doltliteUserRefNameIsValid through mutateBranchRef at src/doltlite_branch.c:65-79, but doltBranchFunc parses every argument first at lines 164-206. Its existing branch at lines 191-199 treats any argument whose first character is '-' as an option and immediately returns unknown option, so the value '-' never reaches mutateBranchRef or the new validator. This explains the reproducible mismatch between branch '-' and tag '-'. The smallest practical fix is to exempt the exact reserved name '-' from the generic option error and pass it through the positional-name validation path, while preserving unknown-option handling for actual unsupported flags.
Evidence Package

Tip

Reply with @itoqa to send us feedback on this test run.

@timsehn
timsehn merged commit d3be101 into master Aug 6, 2026
59 checks passed
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