refactor: split validator-utils.ts (2646 lines) into topic-scoped modules

Open
#1,251 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
sql, typescript

Research direction

Start with packages/opencode/src/altimate/validators/validator-utils.ts and map the existing sections named in the issue: JSON envelope parsing, dbt YAML paths, deliverable tokens, run_results, Jinja scanning, SQL masking, and telemetry sanitization. Use the current test suite around this file as a safety net. Done means the behavior stays covered while the grab-bag is split into topic-scoped modules such as jinja.ts, sql-sanitize.ts, telemetry-sanitize.ts, and dbt-project.ts.

Written by the indexing model from the issue text.

Description

Found during v0.11.0-beta.1 release review (Tech Lead). packages/opencode/src/altimate/validators/validator-utils.ts is a 2646-line grab-bag: JSON envelope parsing, dbt YAML path resolution, deliverable-token extraction, run_results interpretation, Jinja {% if %} scanning, SQL comment/literal/Jinja masking, and telemetry sanitization all in one file with no internal seam. Well-tested but hard to extend. Deferred because: a real split (jinja.ts / sql-sanitize.ts / telemetry-sanitize.ts / dbt-project.ts), not a 30-min fix.

Dominant language
TypeScript
Stars
813
Forks
134
Avg merge
2d 5h
Merged PRs (30d)
62

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AltimateAI/altimate-code

All issues in AltimateAI/altimate-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.