Skip to content

phase3/lang-toml: TOML language adapter (config-only) - #95

Open
URaux wants to merge 4 commits into
phase2/w2from
phase3/lang-toml
Open

phase3/lang-toml: TOML language adapter (config-only)#95
URaux wants to merge 4 commits into
phase2/w2from
phase3/lang-toml

Conversation

@URaux

@URaux URaux commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Top-level TOML table headers ([section]) and key=value pairs become exported const symbols
  • Deduplicates dotted tables: [tool.poetry] and [tool.poetry.dependencies] both collapse to a single tool symbol
  • File-type heuristics: Cargo.toml, pyproject.toml, netlify.toml, rust-toolchain.toml, generic-config
  • inferTechStack detects Rust/Cargo, Python/pyproject, Netlify
  • Wires FactLanguage 'toml' + EXT_TO_LANGUAGE '.toml' in facts.ts
  • Registers tomlAdapter in register-defaults.ts
  • Uses tree-sitter-toml.wasm (confirmed present)

Test plan

  • 15 tests covering: extensions/id, Cargo.toml sections, exports, no-imports, flat key-values, dotted table dedup, empty TOML, inferTechStack (Rust/Python/generic), detectTomlFileType
  • All 15 tests pass locally
  • WASM skip guard covers full parse path for CI environments without WASM support

🤖 Generated with Claude Code

URaux and others added 4 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 table headers and key=value pairs treated as exported const
symbols. Section deduplication ensures [tool.poetry] and [tool.poetry.*]
both collapse to a single 'tool' symbol. File-type heuristics for
Cargo.toml, pyproject.toml, netlify.toml, rust-toolchain.toml.
inferTechStack detects Rust/Cargo, Python/pyproject, Netlify.
Wires FactLanguage 'toml' + EXT_TO_LANGUAGE .toml in facts.ts.
Registers tomlAdapter in register-defaults.ts. 15 tests all passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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