Skip to content

fix: harden fingerprint, const resolve, and version parse - #8

Merged
Pieczasz merged 3 commits into
mainfrom
cursor/pr5-quality-audit-merge-65ed
Sep 28, 2026
Merged

Pieczasz merged 3 commits into
mainfrom
cursor/pr5-quality-audit-merge-65ed

Conversation

@Pieczasz

Copy link
Copy Markdown
Collaborator

Summary

Restores valuable correctness work from incorrectly closed #5 (sibling closed as "stale" while commits were not on main). Rebased onto current main.

  1. Fingerprint field-boundary collision — length-prefix fields so | inside a field cannot collide across boundaries. Baseline version bumped to 2; v1 files are rejected (regenerate with --baseline-write).
  2. Go const carry-forward — analyzeGo now mirrors omitted const expression lists.
  3. ast-grep version suffixes — leadingInt so 1-rc.1 does not parse as 0.
  4. Resolve package split into per-language files + fuzz/bench targets.

Dropped the draft's stale scanOpts refactor so TAR-47 check shared helpers stay intact.

Test plan

  • go test -race -count=1 ./... (ast-grep 0.45.1)
  • go vet on touched packages
  • CI green

Closes the gap left by #5.

Pieczasz and others added 3 commits September 28, 2026 11:08
Length-prefix finding fingerprints so field boundaries cannot collide,
bump baseline to v2 (regenerate with --baseline-write), carry Go const
expression lists across omitted specs, and parse leading ints in
ast-grep versions so pre-release suffixes do not become 0.

Add fuzz targets and benchmarks for the touched paths.

Co-authored-by: Bartłomiej Piekarz <Pieczasz@users.noreply.github.com>
Fingerprint encoding remains length-prefixed; baseline schema stays at
version 2 so old v1 baseline files are rejected and must be rewritten.

Co-authored-by: Bartłomiej Piekarz <Pieczasz@users.noreply.github.com>
The draft PR's scanOpts refactor predates TAR-47 check sharing
normalizeEngine/flagString/ensurePatternRules; keep those APIs.

Co-authored-by: Bartłomiej Piekarz <Pieczasz@users.noreply.github.com>
@Pieczasz
Pieczasz merged commit 002ce3b into main Sep 28, 2026
4 checks passed
@cursor
cursor Bot deleted the cursor/pr5-quality-audit-merge-65ed branch September 28, 2026 11:14
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.

2 participants