Skip to content

fix(dsa): handle graph and integer boundaries - #4

Merged
notzenco merged 1 commit into
mainfrom
audit-boundary-fixes-2026-11-05
Nov 5, 2026
Merged

notzenco merged 1 commit into
mainfrom
audit-boundary-fixes-2026-11-05

Conversation

@notzenco

@notzenco notzenco commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bound C Floyd-Warshall path reconstruction and reject out-of-range graph distances and MST totals.
  • Fix integer overflow in C sum searches and graph edge comparisons, preserve minimum parallel edges, and count undirected self-loops once in Go, Java, and TypeScript.
  • Use an indexed min-heap for TypeScript Dijkstra and Prim, and parent links for BFS paths.
  • Document the revised contracts and add regression coverage.

Verification

  • C: 802 tests passed with ASan and UBSan; focused graph (41) and searching (74) sanitizer tests passed after the final code changes.
  • Go: gofmt, go vet ./..., go test -race ./... passed.
  • Java: ./gradlew test passed on JDK 17 and 21 (1,083 tests each).
  • TypeScript: bun run typecheck and bun test passed (1,704 tests).
  • git diff --check passed.

The GitHub Actions matrix also covers Python and Rust, which were not changed in this patch.

Bound C graph path reconstruction and reject unrepresentable graph
results. Correct self-loop counts and integer-safe searching.

Use an indexed heap for TypeScript graph paths and update regression
coverage and documentation for the revised contracts.
@notzenco
notzenco merged commit 9d1892d into main Nov 5, 2026
15 checks passed
@notzenco
notzenco deleted the audit-boundary-fixes-2026-11-05 branch November 5, 2026 06:30
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