Skip to content

phase3/lang-json-config: JSON config adapter (top-level keys as symbols) - #89

Open
URaux wants to merge 3 commits into
phase2/w2from
phase3/lang-json-config
Open

phase3/lang-json-config: JSON config adapter (top-level keys as symbols)#89
URaux wants to merge 3 commits into
phase2/w2from
phase3/lang-json-config

Conversation

@URaux

@URaux URaux commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • New jsonConfigAdapter backed by tree-sitter-json.wasm
  • Top-level JSON object keys mapped to const symbols, all exported
  • detectJsonFileType() helper: package.jsonproject-config, tsconfig*ts-config, .eslintrc*/.prettierrc*lint-config, jest.config*test-config, *.schema.jsonjson-schema
  • inferTechStack checks export names: next→Next.js, react→React, fastify→Node/Fastify, express→Node/Express
  • Wires FactLanguage 'json' and EXT '.json' in facts.ts, registers in register-defaults.ts

Test plan

  • npx vitest run tests/lib/ingest/languages/json-config.test.ts — 13 pass, 6 skip (wasm)
  • npx tsc --noEmit — no json-config errors

URaux and others added 3 commits April 27, 2026 00:30
Adds noise-suppression lists to policy.drift. Block/container/edge IDs in
the ignore lists get filtered out of every bucket before drift is reported.
Pure function; never mutates input. clean flag is recomputed after filtering.

Use case: auto-generated blocks (cache layers, codegen output, archived
containers) that legitimately drift but shouldn't trigger PR comments.

5 tests covering: pass-through when no lists set, multi-bucket filtering,
container+edge filters, clean recomputation, no-mutation invariant.
Adds scripts/drift-stats.mjs that reads a folder of drift snapshot JSON
files and prints per-week avg/median/max drift counts and top-N most-drifted
blocks. Supports --last N, --top N, --format md|json. 10 tests covering
empty dir, populated multi-week, --last capping, and top-N block ranking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Top-level JSON object keys → 'const' symbols, all exported.
File-type heuristics: package.json→project-config, tsconfig*→ts-config,
.eslintrc*/.prettierrc*→lint-config, jest.config*→test-config, *.schema.json→json-schema.
inferTechStack: next→Next.js, react→React, fastify→Node/Fastify, express→Node/Express.
Wires FactLanguage 'json' + EXT '.json'. 19 tests (13 pass, 6 skip wasm).
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