Skip to content

commit verification with dolt_tests#10482

Merged
macneale4 merged 28 commits intomainfrom
macneale4-claude/commit-hooks2
Feb 12, 2026
Merged

commit verification with dolt_tests#10482
macneale4 merged 28 commits intomainfrom
macneale4-claude/commit-hooks2

Conversation

@macneale4
Copy link
Copy Markdown
Contributor

@macneale4 macneale4 commented Feb 11, 2026

This PR adds the ability to perform verification of commit content using the dolt_tests table.

Setting the dolt_commit_verification_group system variable with a comma delimited set of test groups will result in test being run before a commit is completed.

This validation is performed for commit, merge, cherry-pick, and rebase (through cherry-pick). All procedures/CLI operations provide the --skip-verification flag to bypass.

Currently one known bug with a skipped test. Rebase workflow is presenting broken when a commit fails verification, but should be handled like a conflict, which would allow the user to --continue the workflow.

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.55 0.55 0.0
groupby_scan 10.09 9.91 -1.78
index_join 1.82 1.82 0.0
index_join_scan 1.34 1.34 0.0
index_scan 21.89 21.89 0.0
oltp_point_select 0.27 0.27 0.0
oltp_read_only 5.28 5.37 1.7
select_random_points 0.54 0.54 0.0
select_random_ranges 0.55 0.55 0.0
table_scan 21.89 22.28 1.78
types_table_scan 65.65 66.84 1.81
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.32 6.32 0.0
oltp_insert 3.02 3.07 1.66
oltp_read_write 11.45 11.45 0.0
oltp_update_index 3.19 3.19 0.0
oltp_update_non_index 3.13 3.13 0.0
oltp_write_only 6.09 6.09 0.0
types_delete_insert 6.91 6.79 -1.74

@coffeegoddd

This comment was marked as outdated.

@coffeegoddd

This comment was marked as outdated.

@macneale4 macneale4 force-pushed the macneale4-claude/commit-hooks2 branch from 59413b6 to 8272ad1 Compare February 11, 2026 18:59
@macneale4 macneale4 changed the title Macneale4 claude/commit hooks2 commit verification with dolt_tests Feb 11, 2026
@macneale4 macneale4 marked this pull request as ready for review February 11, 2026 19:03
@macneale4 macneale4 requested a review from fulghum February 11, 2026 19:04
@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.55 0.55 0.0
groupby_scan 10.09 10.09 0.0
index_join 1.86 1.82 -2.15
index_join_scan 1.34 1.34 0.0
index_scan 22.28 21.89 -1.75
oltp_point_select 0.27 0.27 0.0
oltp_read_only 5.37 5.37 0.0
select_random_points 0.54 0.54 0.0
select_random_ranges 0.56 0.55 -1.79
table_scan 22.28 22.28 0.0
types_table_scan 65.65 66.84 1.81
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.32 6.32 0.0
oltp_insert 3.07 3.07 0.0
oltp_read_write 11.45 11.45 0.0
oltp_update_index 3.19 3.19 0.0
oltp_update_non_index 3.13 3.13 0.0
oltp_write_only 6.09 6.09 0.0
types_delete_insert 6.91 6.79 -1.74

@coffeegoddd

This comment was marked as outdated.

@coffeegoddd
Copy link
Copy Markdown
Contributor

@coffeegoddd DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.55 0.55 0.0
groupby_scan 9.91 10.27 3.63
index_join 1.82 1.86 2.2
index_join_scan 1.34 1.34 0.0
index_scan 22.28 21.89 -1.75
oltp_point_select 0.27 0.27 0.0
oltp_read_only 5.37 5.37 0.0
select_random_points 0.54 0.54 0.0
select_random_ranges 0.55 0.55 0.0
table_scan 22.28 21.89 -1.75
types_table_scan 65.65 66.84 1.81
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.32 6.32 0.0
oltp_insert 3.07 3.07 0.0
oltp_read_write 11.45 11.45 0.0
oltp_update_index 3.19 3.19 0.0
oltp_update_non_index 3.13 3.13 0.0
oltp_write_only 6.09 6.09 0.0
types_delete_insert 6.79 6.79 0.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
31a2f6a ok 5937471
version total_tests
31a2f6a 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 61.08 61.08 0.0
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 86ca603 37.49 dolt da09b6b 37.82 0.88

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 61.08 61.08 0.0
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 86ca603 38.26 dolt 31a2f6a 37.79 -1.23

@coffeegoddd
Copy link
Copy Markdown
Contributor

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
b655ee9 ok 5937471
version total_tests
b655ee9 5937471
correctness_percentage
100.0

@coffeegoddd

This comment was marked as off-topic.

@coffeegoddd

This comment was marked as off-topic.

@coffeegoddd

This comment was marked as off-topic.

@coffeegoddd

This comment was marked as off-topic.

@coffeegoddd

This comment was marked as outdated.

@coffeegoddd

This comment was marked as outdated.

@coffeegoddd

This comment was marked as outdated.

@coffeegoddd

This comment was marked as outdated.

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
ca6143c ok 5937471
version total_tests
ca6143c 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 62.19 61.08 -1.78
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 86ca603 37.63 dolt ca6143c 37.56 -0.19

Copy link
Copy Markdown
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment on lines +184 to +185
// runTestsUsingDtablefunctions runs tests using the dtablefunctions package against the staged root
func runTestsUsingDtablefunctions(ctx *sql.Context, engine *gms.Engine, testGroups []string) error {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor) This name confused me for a minute... something like "runTestsUsingDoltTestRun" might be more self describing, instead of including the Go package where the table function is stored.

Comment on lines +33 to +41
func (chv *commitHashValidator) Validate(val interface{}) (bool, error) {
h, ok := val.(string)
if !ok {
return false, nil
}

_, ok = hash.MaybeParse(h)
return ok, nil
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor) There's an existing doltCommitValidator in the enginetest package that you could reuse if you wanted to. Not a big deal, but would let you delete a few lines of code.

@macneale4 macneale4 merged commit e30cfc7 into main Feb 12, 2026
25 checks passed
@macneale4 macneale4 deleted the macneale4-claude/commit-hooks2 branch February 12, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants