Skip to content

Commit 63ac271

Browse files
committed
proof: enable all checks at warn level; drop bogus test-function proptest annotations
Enable every remaining audit check at severity: warning so the surface is fully honest (no silently-disabled gates). flip_fixtures_exist stays disabled (not applicable to a parser library). Remove 634 // reqproof:proptest:skip annotations that had been added to TEST functions (Test*/Benchmark*) — test functions are not property-test subjects, and annotating them was noise. property_based_test_coverage still reports these as INFO-level gaps because the check scans test functions with no clean opt-out (verification_scope.exclude is shared with evidence/acceptance checks that read annotations from test files). Filed as probelabs/reqproof#968. Audit: 0 errors, 0 warnings, 3 info (property_based_test_coverage INFO pending the proof-side fix + flip_fixtures disabled + legacy-field advisory).
1 parent 631752d commit 63ac271

17 files changed

Lines changed: 35 additions & 602 deletions

bytes_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ var parseIntTests = []ParseIntTest{
102102

103103
// Verifies: SYS-REQ-015 [boundary]
104104
// MCDC SYS-REQ-015: N/A
105-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
106105
func TestBytesParseInt(t *testing.T) {
107106
for _, test := range parseIntTests {
108107
out, ok, overflow := parseInt([]byte(test.in))
@@ -119,7 +118,6 @@ func TestBytesParseInt(t *testing.T) {
119118

120119
// Verifies: SYS-REQ-015 [example]
121120
// MCDC SYS-REQ-015: N/A
122-
// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
123121
func BenchmarkParseInt(b *testing.B) {
124122
bytes := []byte("123")
125123
for i := 0; i < b.N; i++ {
@@ -130,7 +128,6 @@ func BenchmarkParseInt(b *testing.B) {
130128
// Alternative implementation using unsafe and delegating to strconv.ParseInt
131129
// Verifies: SYS-REQ-015 [example]
132130
// MCDC SYS-REQ-015: N/A
133-
// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
134131
func BenchmarkParseIntUnsafeSlower(b *testing.B) {
135132
bytes := []byte("123")
136133
for i := 0; i < b.N; i++ {
@@ -141,7 +138,6 @@ func BenchmarkParseIntUnsafeSlower(b *testing.B) {
141138
// Old implementation that did not check for overflows.
142139
// Verifies: SYS-REQ-015 [example]
143140
// MCDC SYS-REQ-015: N/A
144-
// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
145141
func BenchmarkParseIntOverflows(b *testing.B) {
146142
bytes := []byte("123")
147143
for i := 0; i < b.N; i++ {
@@ -150,7 +146,6 @@ func BenchmarkParseIntOverflows(b *testing.B) {
150146
}
151147

152148
// Test helper for SYS-REQ-015.
153-
// reqproof:proptest:skip test-helper checking overflow classification on a fixed sample set; assertion utility with no independently observable pure contract
154149
func parseIntOverflows(bytes []byte) (v int64, ok bool) {
155150
if len(bytes) == 0 {
156151
return 0, false

bytes_unsafe_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ var (
1818
)
1919

2020
// Test helper for SYS-REQ-001 and SYS-REQ-008.
21-
// reqproof:proptest:skip test-helper wrapping the safe equalStr implementation; thin delegation already covered by the underlying production function
2221
func bytesEqualStrSafe(abytes []byte, bstr string) bool {
2322
return bstr == string(abytes)
2423
}
2524

2625
// Test helper for SYS-REQ-001 and SYS-REQ-008.
27-
// reqproof:proptest:skip test-helper wrapping the unsafe equalStr implementation; thin delegation already covered by the underlying production function
2826
func bytesEqualStrUnsafeSlower(abytes *[]byte, bstr string) bool {
2927
aslicehdr := (*reflect.SliceHeader)(unsafe.Pointer(abytes))
3028
astrhdr := reflect.StringHeader{Data: aslicehdr.Data, Len: aslicehdr.Len}
@@ -33,7 +31,6 @@ func bytesEqualStrUnsafeSlower(abytes *[]byte, bstr string) bool {
3331

3432
// Verifies: SYS-REQ-001
3533
// MCDC SYS-REQ-001: N/A
36-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
3734
func TestEqual(t *testing.T) {
3835
if !equalStr(&[]byte{}, "") {
3936
t.Errorf(`equalStr("", ""): expected true, obtained false`)
@@ -58,7 +55,6 @@ func TestEqual(t *testing.T) {
5855

5956
// Verifies: SYS-REQ-001
6057
// MCDC SYS-REQ-001: N/A
61-
// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
6258
func BenchmarkEqualStr(b *testing.B) {
6359
for i := 0; i < b.N; i++ {
6460
equalStr(&benchmarkBytes, benchmarkString)
@@ -68,7 +64,6 @@ func BenchmarkEqualStr(b *testing.B) {
6864
// Alternative implementation without using unsafe
6965
// Verifies: SYS-REQ-001
7066
// MCDC SYS-REQ-001: N/A
71-
// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
7267
func BenchmarkBytesEqualStrSafe(b *testing.B) {
7368
for i := 0; i < b.N; i++ {
7469
bytesEqualStrSafe(benchmarkBytes, benchmarkString)
@@ -78,7 +73,6 @@ func BenchmarkBytesEqualStrSafe(b *testing.B) {
7873
// Alternative implementation using unsafe, but that is slower than the current implementation
7974
// Verifies: SYS-REQ-001
8075
// MCDC SYS-REQ-001: N/A
81-
// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
8276
func BenchmarkBytesEqualStrUnsafeSlower(b *testing.B) {
8377
for i := 0; i < b.N; i++ {
8478
bytesEqualStrUnsafeSlower(&benchmarkBytes, benchmarkString)

coverage_closure_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515

1616
// Verifies: SYS-REQ-008 [fuzz]
1717
// MCDC SYS-REQ-008: N/A
18-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
1918
func TestFuzzEachKeyHarnessCoverage(t *testing.T) {
2019
// FuzzEachKey exercises EachKey with 12 hard-coded paths against
2120
// arbitrary data. The function always returns 1 regardless of whether
@@ -49,7 +48,6 @@ func TestFuzzEachKeyHarnessCoverage(t *testing.T) {
4948

5049
// Verifies: SYS-REQ-010 [fuzz]
5150
// MCDC SYS-REQ-010: delete_path_is_provided=T, delete_returns_empty_document_without_path=F => TRUE
52-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
5351
func TestFuzzDeleteHarnessCoverage(t *testing.T) {
5452
// FuzzDelete calls Delete(data, "test") and always returns 1.
5553
// Exercise it with data that contains and does not contain the key.
@@ -73,7 +71,6 @@ func TestFuzzDeleteHarnessCoverage(t *testing.T) {
7371

7472
// Verifies: SYS-REQ-007 [fuzz]
7573
// MCDC SYS-REQ-007: N/A
76-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
7774
func TestFuzzObjectEachHarnessCoverage(t *testing.T) {
7875
// FuzzObjectEach calls ObjectEach with a no-op callback and returns 1.
7976
// Exercise it with various inputs covering both branches.
@@ -105,7 +102,6 @@ func TestFuzzObjectEachHarnessCoverage(t *testing.T) {
105102

106103
// Verifies: SYS-REQ-010 [boundary]
107104
// MCDC SYS-REQ-010: delete_path_is_provided=F, delete_returns_empty_document_without_path=F => FALSE
108-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
109105
func TestMCDC_SYS_REQ_010_Row1_NoPathNoEmpty(t *testing.T) {
110106
// Witness row 1: no path provided AND the function does NOT return an
111107
// empty document. This is a requirement violation scenario -- it cannot
@@ -124,7 +120,6 @@ func TestMCDC_SYS_REQ_010_Row1_NoPathNoEmpty(t *testing.T) {
124120

125121
// Verifies: SYS-REQ-010 [boundary]
126122
// MCDC SYS-REQ-010: delete_path_is_provided=T, delete_returns_empty_document_without_path=F => TRUE
127-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
128123
func TestMCDC_SYS_REQ_010_Row3_PathProvided(t *testing.T) {
129124
// Witness row 3: path IS provided, but delete_returns_empty_document
130125
// is FALSE (irrelevant when path is provided). The formula evaluates

dead_code_audit_oob_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
// after removing the `offset < len(data)` loop guard.
99

1010
// Verifies: SYS-REQ-007 [boundary]
11-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
1211
func TestObjectEach_OOB_TruncatedAfterComma(t *testing.T) {
1312
// {"a":1, — truncated right after comma, no more data
1413
// After parsing "a":1, finds comma at step 4, increments offset past comma.
@@ -25,7 +24,6 @@ func TestObjectEach_OOB_TruncatedAfterComma(t *testing.T) {
2524
}
2625

2726
// Verifies: SYS-REQ-007 [boundary]
28-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
2927
func TestObjectEach_OOB_TruncatedAfterColon(t *testing.T) {
3028
// {"a": — truncated after colon
3129
err := ObjectEach([]byte(`{"a":`), func(key []byte, value []byte, dataType ValueType, offset int) error {
@@ -38,7 +36,6 @@ func TestObjectEach_OOB_TruncatedAfterColon(t *testing.T) {
3836
}
3937

4038
// Verifies: SYS-REQ-007 [boundary]
41-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
4239
func TestObjectEach_OOB_TruncatedAfterKey(t *testing.T) {
4340
// {"a" — truncated after key string
4441
err := ObjectEach([]byte(`{"a"`), func(key []byte, value []byte, dataType ValueType, offset int) error {
@@ -51,7 +48,6 @@ func TestObjectEach_OOB_TruncatedAfterKey(t *testing.T) {
5148
}
5249

5350
// Verifies: SYS-REQ-007 [boundary]
54-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
5551
func TestObjectEach_OOB_TruncatedMidKey(t *testing.T) {
5652
// {"a — unterminated string
5753
err := ObjectEach([]byte(`{"a`), func(key []byte, value []byte, dataType ValueType, offset int) error {
@@ -64,7 +60,6 @@ func TestObjectEach_OOB_TruncatedMidKey(t *testing.T) {
6460
}
6561

6662
// Verifies: SYS-REQ-007 [boundary]
67-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
6863
func TestObjectEach_OOB_JustOpenBrace(t *testing.T) {
6964
// { — only opening brace, then nothing
7065
err := ObjectEach([]byte(`{`), func(key []byte, value []byte, dataType ValueType, offset int) error {
@@ -77,7 +72,6 @@ func TestObjectEach_OOB_JustOpenBrace(t *testing.T) {
7772
}
7873

7974
// Verifies: SYS-REQ-007 [boundary]
80-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
8175
func TestObjectEach_OOB_BraceAndWhitespace(t *testing.T) {
8276
// { — opening brace then only whitespace
8377
err := ObjectEach([]byte(`{ `), func(key []byte, value []byte, dataType ValueType, offset int) error {
@@ -91,7 +85,6 @@ func TestObjectEach_OOB_BraceAndWhitespace(t *testing.T) {
9185

9286
// ArrayEach infinite loop guard: verify o==0 catches all no-progress cases
9387
// Verifies: SYS-REQ-006 [boundary]
94-
// reqproof:proptest:skip test-case harness function; is itself a unit/integration test, not a pure function amenable to property-based testing
9588
func TestArrayEach_OOB_MalformedElements(t *testing.T) {
9689
tests := []struct {
9790
name string

0 commit comments

Comments
 (0)