Skip to content

ci(importer): guard @repo/crawlers dist entry points used by Rate-Services - #107

Merged
JOY (JOY) merged 2 commits into
devfrom
claude/nifty-carson-w2lyqn
Oct 16, 2026
Merged

JOY (JOY) merged 2 commits into
devfrom
claude/nifty-carson-w2lyqn

Conversation

@JOY

@JOY JOY (JOY) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This started as #103, but another Core agent landed that work in #105 (and the Rate-Services side in DOS/Rate-Services#15) while this PR was in progress. I rebuilt the branch on the current dev and dropped everything those PRs already cover. What remains is the follow-up they left out.

What changed

  • New test:dist smoke test (apps/importer/src/shopee/__tests__/dist-exports.smoke.mjs), run in CI right after the crawler tests. It:
    • imports @repo/crawlers (root, ./shopee/arena-spec-syncer, ./shopee/flagship-seed-data) and @repo/shared-data by package name from the built dist, the way Rate-Services does;
    • checks that the .d.ts files are emitted;
    • asserts that test-ai-enricher, test-review-analyzer and run-ingestion-test stay unexported. These scripts execute on import, which is why fix(importer): unbreak @repo/crawlers build and make it consumable from Rate-Services #105 avoided a ./shopee/* wildcard. The check uses import.meta.resolve, so the scripts never run.
  • AGENTS.md / CLAUDE.md:
    • state the rule: Rate-Services uses the engine through the vendor/rate submodule, never by copying files;
    • explain how to expose a new module (add an explicit exports subpath, then update test:dist);
    • replace the outdated npm run build commands for Rate-Services with the pnpm + submodule ones.
  • ROADMAP.md: record this as 5.19.

Why: Rate-Services now depends on this exports map. Without a check, a change on this side would only surface when someone bumps the submodule in Rate-Services. The docs rule addresses the root cause of the drift in #103 (agents copying engine files).

Checklist

  • Build passes: shared-data, crawlers, extension, web (Next.js 16), all run locally on this head
  • Type-check passes: pnpm --filter @repo/web typecheck
  • Lint passes: not run. The pre-commit lint-staged prettier step can't resolve prettier-plugin-packagejson from the repo root (pre-existing), so I formatted the new file with the repo prettier config and ran commitlint on the message by hand.
  • Tests pass: @repo/crawlers test, @repo/crawlers test:dist, @repo/extension test, @repo/web test. I also checked that test:dist fails if a ./shopee/* wildcard is added.
  • Docs updated (AGENTS.md, CLAUDE.md, Docs/Resources/ROADMAP.md)
  • No breaking API changes (adds a script and a CI step only)

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6d1b0acf-945b-40c0-b421-eaacc732c4bc
📥 Commits

Reviewing files that changed from the base of the PR and between e9abf38 and f4396fc.

📒 Files selected for processing: 6
  • .github/workflows/ci.yml
  • AGENTS.md
  • CLAUDE.md
  • Docs/Resources/ROADMAP.md
  • apps/importer/package.json
  • apps/importer/src/shopee/__tests__/dist-exports.smoke.mjs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ccb30995-656e-4b1b-8e18-085d527eb706
📥 Commits

Reviewing files that changed from the base of the PR and between 044c49f and e9abf38.

📒 Files selected for processing: 9
  • .github/workflows/ci.yml
  • AGENTS.md
  • CLAUDE.md
  • Docs/Resources/ROADMAP.md
  • apps/importer/package.json
  • apps/importer/src/shopee/__tests__/dist-exports.smoke.mjs
  • apps/importer/src/shopee/flagship-seed-data.ts
  • apps/importer/tsconfig.json
  • packages/shared-data/package.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The importer and shared-data package exports are updated, and importer declaration files are enabled. A distribution smoke test checks package exports and declarations, and CI runs it. The change also updates seed-field optionality and documents Rate-Services submodule usage.

Changes: Crawler package distribution

Layer / File(s) Summary
Package exports and shared-engine contract
apps/importer/package.json, apps/importer/tsconfig.json, packages/shared-data/package.json, apps/importer/src/shopee/flagship-seed-data.ts, AGENTS.md, CLAUDE.md, Docs/Resources/ROADMAP.md
The importer adds root and Shopee subpath exports and enables declaration output. The shared-data export map removes its require condition. Two FlagshipDeviceSeed fields become optional. Repository guidance describes Rate-Services consumption through the vendor/rate submodule.
Distribution smoke test and CI
apps/importer/package.json, apps/importer/src/shopee/__tests__/dist-exports.smoke.mjs, .github/workflows/ci.yml, AGENTS.md
The smoke test checks crawler exports, the Shopee subpath, flagship seed data, a shared-data schema, and crawler declaration files. A test:dist script and CI step run the test. Contributor instructions include the command.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Suggested reviewers: team-lead, claude-code, cursor-agent

Merge Risk: ⚪ Minimal · up to e9abf

This change makes the crawler and shared-data packages consumable as built packages and adds a CI smoke test. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Linked Issues check Passed Directly linked issue #103 is closed and completed. It provides historical context only. No active linked issue supplies coding requirements for this pull request.
Out of Scope Changes check Passed The reviewed changes stay within the stated scope: package build output and exports, the distribution smoke test and CI step, optional seed fields, and documentation for sibling-repository consumption…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Description check Passed The description explains what changed and why, lists affected areas, documents validation results, and addresses the checklist. It clearly notes that lint was not run and gives the reported pre-existi…
Title check Passed The title clearly and concisely describes the main change: adding CI coverage for the built @repo/crawlers distribution entry points used by Rate-Services.
Full details: Out of Scope Changes check

Explanation

The reviewed changes stay within the stated scope: package build output and exports, the distribution smoke test and CI step, optional seed fields, and documentation for sibling-repository consumption. The supporting test and documentation changes connect directly to that packaging and single-source-of-truth objective. No unrelated change is demonstrated.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (7 skipped: 7 unsupported.)

Full details: Description check

Explanation

The description explains what changed and why, lists affected areas, documents validation results, and addresses the checklist. It clearly notes that lint was not run and gives the reported pre-existing cause. The optional screenshots section and reviewer names are not provided, but these omissions are non-critical.

✨ Finishing Touches: 💡 1
⚔️ Resolve merge conflicts: 💡
  • Resolve merge conflict in branch claude/nifty-carson-w2lyqn
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…vices

Follow-up to #105 / DOS/Rate-Services#15, which made Rate-Services
consume the engine through the vendor/rate submodule.

- Add `test:dist`, a smoke test that imports @repo/crawlers (root,
  ./shopee/arena-spec-syncer, ./shopee/flagship-seed-data) and
  @repo/shared-data by package name from the built dist, checks the
  .d.ts files, and asserts that the test scripts that execute on
  import stay unexported. Run it in CI after the crawler tests.
- AGENTS.md / CLAUDE.md: document that Rate-Services consumes the
  engine via the submodule and must not copy engine files, and replace
  the stale `npm run build` Rate-Services commands with the pnpm ones.
- ROADMAP: record the change as 5.19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
@JOY
JOY (JOY) force-pushed the claude/nifty-carson-w2lyqn branch from e9abf38 to 624004f Compare October 16, 2026 10:02
@JOY JOY (JOY) changed the title refactor(importer): make @repo/crawlers consumable as a built package (#103) ci(importer): guard @repo/crawlers dist entry points used by Rate-Services Oct 16, 2026
Cover the .d.ts behind the ./shopee/flagship-seed-data export, and
credit #105 / #107 separately in ROADMAP 5.19 (review follow-up).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
@JOY
JOY (JOY) merged commit 679e9ab into dev Oct 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants