Skip to content

feat(engine): extract buildIssueRagQuery to gittensory-engine #4254

Description

@JSONbored

Found during a 2026-07-08 miner-roadmap audit. src/review/issue-rag-wire.ts::buildIssueRagQuery is pure, isolated, string-only query-building logic — already tagged as forward groundwork for the miner (#2320) and explicitly preserved as intentional (not dead code) in commit 39cc9583c's message.

This is scoped narrowly: only the pure query-builder function, not the retrieval backend itself. retrieveContext (src/review/rag.ts) is Vectorize/D1-bound and not portable to a local CLI without a hosted round-trip — that's tracked as a separate open product-design question, not part of this issue. This extraction is independent of and doesn't need to wait for that decision.

Deliverables

  • Extract buildIssueRagQuery to packages/gittensory-engine/src/ (a new small module or an existing suitable one)
  • src/review/issue-rag-wire.ts becomes a thin re-export shim, OR keep the function there and just re-export from gittensory-engine for the miner side to import — whichever avoids awkward circular imports, since issue-rag-wire.ts also wires into rag.ts
  • Export from the package's public entrypoint
  • Existing coverage for buildIssueRagQuery passes unmodified

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    Status
    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions