phase3/lang-json-config: JSON config adapter (top-level keys as symbols) - #89
Open
URaux wants to merge 3 commits into
Open
phase3/lang-json-config: JSON config adapter (top-level keys as symbols)#89URaux wants to merge 3 commits into
URaux wants to merge 3 commits into
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jsonConfigAdapterbacked bytree-sitter-json.wasmconstsymbols, all exporteddetectJsonFileType()helper:package.json→project-config,tsconfig*→ts-config,.eslintrc*/.prettierrc*→lint-config,jest.config*→test-config,*.schema.json→json-schemainferTechStackchecks export names:next→Next.js,react→React,fastify→Node/Fastify,express→Node/ExpressFactLanguage 'json'andEXT '.json'infacts.ts, registers inregister-defaults.tsTest plan
npx vitest run tests/lib/ingest/languages/json-config.test.ts— 13 pass, 6 skip (wasm)npx tsc --noEmit— no json-config errors