Skip to content

refactor(importer): make @repo/crawlers the single source of truth for Rate-Services #103

Closed

Description

@JOY

Problem

DOS/Rate-Services does not depend on DOS/Rate. It carries hand-copied versions of the open-core engine (src/shopee/{types,product-normalizer,entity-matcher,ai-spec-enricher,ai-review-analyzer,shopee-to-supabase,flagship-seed-data}.ts and src/schemas/*.schema.ts), synced manually by agents. The copies have drifted both ways:

File only in Rate only in Rate-Services
ai-review-analyzer.ts 78 lines 50 lines
shopee-to-supabase.ts 55 lines 31 lines (price/review insert race handling)
flagship-seed-data.ts 1961 lines 0
specs.schema.ts 6 lines 0

Plan (this repo)

  • Port the Rate-Services-only logic in ai-review-analyzer.ts / shopee-to-supabase.ts into apps/importer, so nothing is lost when the copies are deleted.
  • Make @repo/crawlers / @repo/shared-data consumable from a sibling repo checkout (built dist entry points that do not need the Rate pnpm workspace at runtime).
  • Keep all existing CI steps green.

Companion issue: DOS/Rate-Services (consume these packages through a DOS/Rate git submodule and delete the copies).

[Agent: Core]

Activity

  1. added a commit that references this issue on Oct 16, 2026
    8f9a8d4
  2. added
    status:in-reviewTask completed and waiting for review / PR merge
    and removed
    status:in-progressTask currently claimed and being worked on by an Agent
    on Oct 16, 2026
  3. JOY commented on Oct 16, 2026

    @JOY
    ContributorAuthor

    🤖 [Agent: Core] Bắt đầu thực hiện task này trên branch claude/nifty-carson-w2lyqn (Status: In Progress). Companion: DOS/Rate-Services#14.


    Generated by Claude Code

  4. added a commit that references this issue on Oct 16, 2026
    94a2a2b
  5. added
    status:doneTask completed and verified
    and removed
    status:in-reviewTask completed and waiting for review / PR merge
    on Oct 16, 2026
  6. JOY commented on Oct 16, 2026

    @JOY
    ContributorAuthor

    ✅ Done in #105, squash-merged into dev as 94a2a2b.

    Consumer side: DOS/Rate-Services#15.

    [Agent: Core]


    Generated by Claude Code

  7. added
    status:in-reviewTask completed and waiting for review / PR merge
    status:doneTask completed and verified
    and removed
    status:doneTask completed and verified
    status:in-reviewTask completed and waiting for review / PR merge
    on Oct 16, 2026
  8. JOY commented on Oct 16, 2026

    @JOY
    ContributorAuthor

    ✅ [Agent: Core] Follow-up merged in #107 (679e9ab): CI now runs pnpm --filter @repo/crawlers test:dist. It checks the @repo/crawlers / @repo/shared-data dist entry points that DOS/Rate-Services depends on, and that the scripts executing on import stay unexported. AGENTS.md / CLAUDE.md now carry the "do not copy engine files, use the vendor/rate submodule" rule and the pnpm commands for Rate-Services.

    Note: this session was working on the same task in parallel with the session that merged #105 / DOS/Rate-Services#15. The duplicated part was dropped, and only the follow-up above was kept.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions