Repository navigation
Conversation
) (#837) Co-authored-by: JOY <anh@metados.com>
#859 sliced each cluster to its first 200 offers before computing the market min, median, max and spread. Offers arrive sorted by price, so a product with more than 200 offers lost its priciest listings and its spread (the catalog E2E "reads page past the 1000-row cap" saw 0 and has failed on dev since). Drop the per-cluster slice; keep the cluster cap and option normalisation from #859. Guard: a 250-offer cluster with the priciest offer last still reports it. Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
) (#870) * feat(ops): commit agent release helpers and report the live commit (#865) Agents merged, promoted, updated Project #9 and verified releases with copy-paste commands or helpers kept only in a session scratchpad. On 2026-10-24 a production redeploy took a deployment older than main and briefly rolled back a release (#814). - scripts/ops/merge-when-green.mjs: merge once the head's checks pass, pinned to the head SHA; PRs into main always use a merge commit. - scripts/ops/board.mjs: set Project #9 status and agent plus the status:*/agent:* labels in one command. - scripts/ops/promote.mjs: open or reuse the dev to main PR with the released PRs listed, then merge it with a merge commit when green. - scripts/ops/verify-live.mjs: check the live commit equals main, the database is readable and the main routes answer 200; on a mismatch, print the production deployment built from main as the only redeploy source. - /api/health reports `commit` (VERCEL_GIT_COMMIT_SHA, null off Vercel). - Unit tests run in CI; AGENTS.md and RELEASE.md point to the scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ops): address review of the release helpers (#865) - verify-live re-reads main every poll and suggests a fix only when the live commit is behind main (compare live...main); it never suggests rolling a newer or diverged deployment back. The fix it prints is `vercel promote` of main's production deployment, not a redeploy. - merge-when-green also gates on commit statuses (Vercel), reads the required checks from the branch rules, paginates check runs, encodes the branch ref, validates the merge method before waiting, tolerates transient API errors and takes --ignore for a known-broken check. - promote never reuses a fork's dev PR, refreshes a reused PR's body and counts unnumbered commits correctly. - board writes labels first, adds the assignee and replaces another agent's claim label on a hand-over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ops): never take another agent's issue silently; harden waits (#865) Round-2 review of #870: - board refuses an issue claimed by another agent unless --take-over is passed (AGENTS.md section 1), and prints the claim it replaces. - merge-when-green rejects an --ignore of a required check, re-derives the merge method each poll and retries a brief merge refusal after a fresh read. - promote edits a reused PR's body only when it changed (an edit re-runs the PR-base check). - verify-live survives a transient error re-reading main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: JOY <anh@metados.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Promote dev to main.
Merge with a merge commit, never squash (Docs/Resources/RELEASE.md).
📌 TL;DR
This PR implements comprehensive input validation, sanitization, and resource bounding across the browser extension and importer services to prevent security vulnerabilities (e.g., XSS, credential leakage, prototype pollution) and performance degradation (e.g., ReDoS, memory exhaustion). It also introduces operational scripts for automated release management and updates CI/CD workflows to test these new safeguards.
🎯 Type of Change
🔍 Changes Walkthrough
.github/workflows/ci.ymlmerge-when-green,board,promote,verify-live).AGENTS.mdscripts/ops/utilities for merging, promoting, verifying live status, and managing project boards.Docs/Resources/RELEASE.mdpromote.mjsandverify-live.mjs.apps/extension/src/extractors/ecommerce-detector.tsapps/extension/src/security-guards.tsescapeSafeExternalHrefto reject credential-embedded URLs.apps/extension/src/test-extension-pipeline.tsapps/importer/src/shopee/__tests__/backfill-review-risk.test.tsapps/importer/src/shopee/__tests__/paging.test.tsapps/importer/src/shopee/ai-review-analyzer.tsapps/importer/src/shopee/arena-spec-syncer.tsapps/importer/src/shopee/cluster-peer-floor.tsapps/importer/src/shopee/entity-matcher.tsapps/importer/src/shopee/jobs/backfill-specs.ts__proto__,constructor, etc.), bounding string lengths and object keys.apps/importer/src/shopee/logger.tsredactSensitiveStringto cover more secret patterns (API keys, tokens) and bound output length. RewrotesanitizeLogMetato handle circular references, bound depth/keys, and redact sensitive data more effectively.apps/importer/src/shopee/merchant-review-risk.ts📊 Architectural Flow
flowchart TD subgraph "Browser Extension" A[Raw Product Signal] --> B[security-guards.ts] B -->|Sanitize URL/ID/Text| C[Cleaned Signal] C --> D[ecommerce-detector.ts] D -->|Validate & Extract| E[Final Product Data] end subgraph "Importer Service" F[Raw HTML/JSON Data] --> G[arena-spec-syncer.ts] G -->|Bound HTML/Items| H[Specs] I[Merchant/Review Data] --> J[merchant-review-risk.ts] J -->|Validate & Score| K[Risk Scores] L[Log Data] --> M[logger.ts] M -->|Redact & Sanitize| N[Safe Logs] end subgraph "Ops Scripts" O[CI Green] --> P[merge-when-green.mjs] P --> Q[Promote PR] R[Main Branch] --> S[verify-live.mjs] S -->|Check Health/Commit| T[Live Status] end