You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3645a9d
Browse filesBrowse the repository at this point in the historyBrowse files
Addresses coderabbit findings on the release PR:
- **Major** — dispatcher.ts: without generation tracking, a stale
registration attempt's `.then` handler could clobber replacement state
installed mid-flight by a concurrent `reset()` or `setRegistrationHook()`.
Success path nulled `_ensureRegistered` (wiping a replacement hook);
failure path nulled `_registrationPromise` (breaking dedup for a newer
in-flight promise). Fix: bump a generation counter on every mutation
entry point; the settle handlers only mutate cached state if their
captured generation is still current. 2 new adversarial tests cover
both races.
- **Minor** — CHANGELOG.md and docs/docs/usage/check.md: the "every
finding carries a `rule` field" claim isn't quite true — `lint`
findings may omit `rule` if the engine didn't attach one (matches the
documented Finding Object where `rule` is optional). Qualified the
wording in both files to "when set" / "when the underlying engine
attaches one" so users know to check for presence before switching
on it.
Local verification: `bun test test/skill/release-v0.9.6-adversarial.test.ts
test/altimate/dispatcher.test.ts` → 14/14 pass (2 new race tests).
`bun turbo typecheck` clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
- **`check --checks *` now surfaces the findings it was missing — expect newly-failing CI runs.** `altimate-core` upgrade `0.5.1 → 0.7.0` plus a consumer-contract sync catches a class of latent shape-mismatch bugs where the CLI was reading fields the engine no longer emits and rendering false-clean output as a result. Concretely: (a) `check --checks validate` gated on the wrong field and passed every file, now maps `ValidationError.location` and fails closed on engine failure; (b) `check --checks semantic` treated `valid:true` as clean, but `valid` means "plannable" — cartesian products came back "OK" for months, now reads `findings` and never gates on `valid`; (c) `check --checks grade` read fields `evaluate()` doesn't return, so no grade or finding ever surfaced, now reads `overall_grade`/`scores.overall`/`lint.findings` (with nested findings from `validation.errors` + `safety.threats`); (d) `check --checks pii` mapped the column name to the numeric column-position field and printed `[object Object]` for `{ Custom: string }` classifications, now reports the exposing alias and stringifies properly; (e) `check --checks migration` rendered "SAFE" for every migration including `DROP COLUMN`, now reads `findings`/`safe`/`overall_risk`; (f) `check --checks compare` rendered "IDENTICAL" for different queries, now reads `differences`; (g) `check --checks policy` titled on `pass` (engine returns `allowed`), so clean SQL always rendered "VIOLATIONS FOUND", now inverted; (h) `check --checks safety` maps engine `high → error` and `medium → warning` (previously both degraded to `info`), so `--fail-on error|warning` no longer silently passes high-risk SQL injection threats; a new `unbalanced_quote` safety rule ships from the engine. Every finding's `rule` field is machine-readable in `--format json` output — that's where rule catalog lives. (#1090)
14
+
- **`check --checks *` now surfaces the findings it was missing — expect newly-failing CI runs.** `altimate-core` upgrade `0.5.1 → 0.7.0` plus a consumer-contract sync catches a class of latent shape-mismatch bugs where the CLI was reading fields the engine no longer emits and rendering false-clean output as a result. Concretely: (a) `check --checks validate` gated on the wrong field and passed every file, now maps `ValidationError.location` and fails closed on engine failure; (b) `check --checks semantic` treated `valid:true` as clean, but `valid` means "plannable" — cartesian products came back "OK" for months, now reads `findings` and never gates on `valid`; (c) `check --checks grade` read fields `evaluate()` doesn't return, so no grade or finding ever surfaced, now reads `overall_grade`/`scores.overall`/`lint.findings` (with nested findings from `validation.errors` + `safety.threats`); (d) `check --checks pii` mapped the column name to the numeric column-position field and printed `[object Object]` for `{ Custom: string }` classifications, now reports the exposing alias and stringifies properly; (e) `check --checks migration` rendered "SAFE" for every migration including `DROP COLUMN`, now reads `findings`/`safe`/`overall_risk`; (f) `check --checks compare` rendered "IDENTICAL" for different queries, now reads `differences`; (g) `check --checks policy` titled on `pass` (engine returns `allowed`), so clean SQL always rendered "VIOLATIONS FOUND", now inverted; (h) `check --checks safety` maps engine `high → error` and `medium → warning` (previously both degraded to `info`), so `--fail-on error|warning` no longer silently passes high-risk SQL injection threats; a new `unbalanced_quote` safety rule ships from the engine. Findings' `rule` field (when set — `lint` findings may omit it if the engine didn't attach one) names the rule in `--format json` output — that's how the safety and policy catalog is discovered in practice. (#1090)
15
15
-**`altimate-core-track-lineage` no longer returns "0 edges" for everything.** The tool read `edges` off the top-level result; the engine has always emitted them at `queries[].edges`, so lineage tracking silently produced nothing. Now collects correctly, renders `impact_map`, formats `{table, column}` refs, and renders ERROR instead of "0 edges" when the engine call itself fails. (#1090)
16
16
-**`schema.detect_pii` returned zero findings for every scan.** Same shape-mismatch class: the detector read `piiData.findings`, but the engine's `PiiReport` is `{ columns, pii_count, … }`. Both cache and live paths now filter `classification !== "None"` through the shared `piiColumnsFromReport` helper. Malformed `PiiReport` shapes now throw rather than silently yield zero findings. Failed per-column classifications flip `success` to `false` — the schema-detect-pii tool renders "PII Scan: ERROR" with any partial findings attached, instead of a clean "no findings" verdict. (#1090)
17
17
-**`altimate-core-{compare,column-lineage,extract-metadata,import-ddl}` no longer crash on the default invocation.** Empty-string dialects now coerce to `undefined` before hitting `Schema.fromDdl`, centralized as `dialectHint()` in `native/engine-coerce.ts` and applied across all 7 dialect-forwarding handlers. (#1090)
|`grade`| SQL quality grading with recommendations | Optional | No |
52
52
53
-
Every finding carries a machine-readable `rule` field (e.g. `unbalanced_quote`, `sql_injection`, `L003`) — visible in `--format json` output, and how the safety, lint, and policy rule inventory is discovered in practice.
53
+
Findings carry a machine-readable `rule` field (e.g. `unbalanced_quote`, `sql_injection`, `L003`) when the underlying engine attaches one — visible in `--format json` output, and how the rule inventory is discovered in practice. A minority of `lint` findings may arrive without `rule` (or `code`); switch on presence, not a hard assumption.
54
54
55
55
By default, `lint` and `safety` are enabled. Override with `--checks`:
0 commit comments