Skip to content

Call the first stage static analysis, not an AST - #16

Merged
dgunter merged 1 commit into
mainfrom
phase2/static-analysis-labels
Sep 4, 2026
Merged

dgunter merged 1 commit into
mainfrom
phase2/static-analysis-labels

Conversation

@dgunter

@dgunter dgunter commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Why

pySigma builds an intermediate representation (IR) of the rule and the pipeline walks it. Calling that an "AST" overstated what happens; "static analysis" and "parsed structure" are the honest terms. Renamed consistently, code included.

What changed

  • Card: "Parsed AST" → "Parsed structure"; tooltip now says the IR is produced by static analysis of the rule.
  • API: response key ast → structure (run_pipeline, its tests, frontend types/consumers).
  • Provenance: deterministic:ast → deterministic:static in backend results, all seven golden fixtures, and frontend types; displayed as "Deterministic · static analysis". The single provenance sentence on How-this-works updated to match (nothing else on that page touched).
  • Frontend renames: AstCard.tsx → StructureCard.tsx, lib/ast.ts → lib/structure.ts (+ test), AstResult/AstNode/AstLine/flattenAst → Structure*.
  • CI: adds npm run lint (oxlint) as a "Frontend lint" step after typecheck + vitest.

Golden fixture parse sections are unchanged apart from provenance values (their keys are test-local, not API keys). README untouched.

Verification

  • backend pytest: 201 passed
  • tsc --noEmit -p tsconfig.app.json: clean
  • vitest run: 20 passed (6 files)
  • vite build: OK
  • oxlint: 0 errors (5 pre-existing warnings in files not otherwise part of this change; listed in the session report)

🤖 Generated with Claude Code

pySigma builds an intermediate representation of the rule and the
pipeline walks it; nothing here is an abstract syntax tree. Rename so the
product says what it does:

- Card title "Parsed AST" -> "Parsed structure"; tooltip copy now says
  the IR is produced by static analysis of the rule
- API response key `ast` -> `structure` (run_pipeline + tests + types)
- Provenance `deterministic:ast` -> `deterministic:static`, displayed as
  "Deterministic · static analysis" (backend results, golden fixtures,
  frontend labels, How-this-works provenance sentence)
- Frontend: AstCard -> StructureCard, lib/ast.ts -> lib/structure.ts
  (+ test), AstResult/AstNode/AstLine/flattenAst -> Structure*

Also wires oxlint into CI: `npm run lint` script and a "Frontend lint"
step after typecheck + vitest.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dgunter
dgunter merged commit 7eb88b2 into main Sep 4, 2026
1 check passed
@dgunter
dgunter deleted the phase2/static-analysis-labels branch September 4, 2026 14:59
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

SonarCloud analysis · PR #16

Quality gate: ❌ Failed · Open in SonarCloud

Condition Actual Required Status
Reliability rating (new code) A ≤ A ✅
Security rating (new code) A ≤ A ✅
Maintainability rating (new code) A ≤ A ✅
Coverage (new code) 7.9% ≥ 80.0% ❌
Duplication (new code) 0.0% ≤ 3.0% ✅
Security hotspots reviewed 100.0% ≥ 100.0% ✅

Open issues on new code: 0

No open issues on the changed code. 🎉

Commit 89ebe121d514 · analysis task · posted by the Build workflow; edited in place on every push.

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