Repository navigation
Conversation
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>
Tool is still beta, so length-prefixed fingerprints stay on baselineVersion 1 (no forced regenerate). Break newScanCommand into opts/engine helpers and split multi-lang resolve into per-language files. Co-authored-by: Bartłomiej Piekarz <Pieczasz@users.noreply.github.com>
|
Leaving open as a non-trivial draft (dirty vs main; fingerprint v2 + resolve/version changes). Not merging as part of the tarsier-internal hygiene pass focused on internal #45/#29. |
|
Closing as stale/superseded hygiene cleanup. Work is on main or abandoned; do not land from this tip. |
|
Hygiene pass: rebased onto current Local: |
|
Incorrectly closed: the quality-audit commits were not on main. Restored as a new PR from the rebased tip ( |
Summary
Correctness hardening from a Go quality audit (no new features):
finding.Fingerprintused|-joined fields, sofile="a|b", symbol="c"collided withfile="a", symbol="b|c". Now length-prefixes fields. Baseline version bumped to 2; regenerate with--baseline-write(v1 files are rejected).engine/resolve.analyzeGomissed string consts whose expression list was omitted (Go reuses the previous list). Label names in those specs now resolve.parseVersionusedAtoion tokens like1-rc.1, which became0. Now takes the leading integer so pre-release builds still compare correctly.Also adds fuzz targets (
Fingerprint,versionAtLeast,Analyze) and benchmarks for the touched paths.Test plan
go test -race -shuffle=on ./...go vet ./...golangci-lint run ./finding/... ./engine/resolve/... ./engine/pattern/...go test -fuzz=FuzzFingerprintFieldBoundaries -fuzztime=5s ./findinggo test -fuzz=FuzzVersionAtLeast -fuzztime=3s ./engine/patterngo test -fuzz=FuzzAnalyzeGo -fuzztime=5s ./engine/resolvego test -bench=. -benchtime=50ms ./finding ./engine/resolveNote for adopters: existing
tarsier-baseline.jsonfiles (version 1) must be rewritten withtarsier scan --baseline-write ....