Skip to content

test check one - #71

Merged
IM-Agents merged 2 commits into
cursor_new_oma_reqfrom
cursor_new_oma_req_review
May 5, 2026
Merged

test check one#71
IM-Agents merged 2 commits into
cursor_new_oma_reqfrom
cursor_new_oma_req_review

Conversation

@IM-Agents

@IM-Agents IM-Agents commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Removed debug logging output from backend services to improve performance and reduce system noise.
    • Internal cleanup of webhook and timeline service handlers to streamline backend operations.

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • .github/workflows/coderabbit-auto-fix.yml is excluded by !**/*.yml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 59e34709-df95-4d7c-bf44-3ea177814946

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR removes debug logging statements from webhook and timeline service helpers while adding a new field to webhook delivery info extraction. Changes affect internal helper functions with no modifications to exported function signatures.

Changes

Webhook Delivery Info Processing

Layer / File(s) Summary
Date Parsing
backend/src/controllers/webhookController.js
parseDeliveryDate removes console.log debug output; date conversion logic (MM/DD/YYYYYYYY-MM-DD) unchanged.
Delivery Info Extraction
backend/src/controllers/webhookController.js
extractDeliveryInfo removes debug logging, introduces unused deliveryNote variable, and adds One: 123 property to returned object alongside existing delivery fields.

Timeline Service Debug Cleanup

Layer / File(s) Summary
Logging Helpers
backend/src/services/timelineService.js
logPrinterValidationFailed and logManualPrintTriggered have console.log debug statements removed; logEvent calls and all logic preserved.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Logs are trimmed, the code runs clean,
But One: 123?what does it mean?
Debug lines fade like morning dew,
While whispered mysteries linger too.
A rabbit wonders: bug or intent true?

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'test check one' is vague and generic, using non-descriptive terms that do not convey meaningful information about the changeset. Replace with a descriptive title that summarizes the main changes, such as 'Remove debug logging statements from webhook and timeline services' or 'Clean up console.log debug output'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor_new_oma_req_review

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/src/controllers/webhookController.js`:
- Line 28: Remove the hardcoded placeholder and unused variable in the webhook
parsing logic: eliminate the "One: 123" string from the deliveryInfo object and
delete the unused let deliveryNote = null; if a delivery note is actually
required, parse it from the incoming payload (e.g., extract payload.deliveryNote
or payload.note) and assign it to a properly named property on deliveryInfo
(e.g., deliveryInfo.deliveryNote) before returning; otherwise remove both
deliveryNote and any added deliveryInfo.deliveryNote references so the response
only contains real parsed fields.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 999efbf7-cd91-428a-9732-225e60057569

📥 Commits

Reviewing files that changed from the base of the PR and between e04a7f7 and 4b05786.

📒 Files selected for processing (2)
  • backend/src/controllers/webhookController.js
  • backend/src/services/timelineService.js
💤 Files with no reviewable changes (1)
  • backend/src/services/timelineService.js
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
backend/src/**/*.{js,ts}

📄 CodeRabbit inference engine (Custom checks)

backend/src/**/*.{js,ts}: Backend source code must not contain hardcoded credentials, Shopify webhook secrets, or database passwords (must use env variables and config/env.js patterns)
Backend webhook routes must not skip or weaken HMAC or Shopify authentication validation
Backend code must not build SQL queries by concatenating untrusted strings; must use parameterized queries or ORM usage
Backend async routes and services must implement proper error handling with next(err) or structured error responses instead of swallowing errors

Files:

  • backend/src/controllers/webhookController.js
**/*.{js,mjs,cjs,ts,tsx,jsx,vue}

📄 CodeRabbit inference engine (.cursor/rules/README.md)

**/*.{js,mjs,cjs,ts,tsx,jsx,vue}: Follow JS/TS language rules: modules, async patterns, TypeScript usage, error handling, and platform considerations
Follow JavaScript/TypeScript architectural patterns: structure, async flow, React habits, and anti-pattern avoidance

Files:

  • backend/src/controllers/webhookController.js
backend/src/**/*.js

⚙️ CodeRabbit configuration file

backend/src/**/*.js: This path is the Node.js + Express API, MySQL access, Shopify webhooks, PDF/print services, and Socket.IO server for OMA. Blocking rules for changed lines:

  • Configuration must come from backend/src/config/env.js and environment variables—do not hardcode DB passwords, Shopify secrets, or deployment-specific hosts in source.
  • Webhook and HMAC-sensitive routes must remain protected by the existing Shopify auth middleware (shopifyAuth / HMAC validation); do not bypass verification for convenience.
  • Async route handlers and services must propagate errors to Express (next(err) or throw into async wrappers) or handle them explicitly—no empty catch blocks that hide failures.
  • Database access must use parameterized queries / the existing models layer—no string-concatenated SQL with user-controlled input.
  • New Socket.IO handlers must handle errors and avoid leaking internal stack traces to clients in production.
  • No new dependencies on eval, child_process with untrusted input, or disabling security middleware without strong justification.
  • Prefer backend/src/services/ for business logic and keep controllers thin; avoid duplicating rule/PDF/print orchestration across files.

If any of the above appears in the diff for this path, you MUST request changes and explain the fix.

Files:

  • backend/src/controllers/webhookController.js

let deliveryDay = null;
let deliveryLink = null;
console.log('extractDeliveryInfo', noteAttributes, lineItems);
let deliveryNote = null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove the hardcoded placeholder from deliveryInfo.

One: 123 injects fabricated data into the webhook parsing result, and the new deliveryNote variable is never populated or returned. If this was meant to add a delivery-note field, parse it from the payload and return a correctly named property; otherwise delete both additions.

Suggested fix
-  let deliveryNote = null;
@@
   return {
     delivery_date: parseDeliveryDate(deliveryDate),
     delivery_time: deliveryTime,
     specific_delivery_time: specificDeliveryTime,
     delivery_day: deliveryDay,
-    One: 123,
     delivery_link: deliveryLink
   };

As per coding guidelines, "Follow JavaScript/TypeScript architectural patterns: structure, async flow, React habits, and anti-pattern avoidance".

Also applies to: 51-57

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/src/controllers/webhookController.js` at line 28, Remove the
hardcoded placeholder and unused variable in the webhook parsing logic:
eliminate the "One: 123" string from the deliveryInfo object and delete the
unused let deliveryNote = null; if a delivery note is actually required, parse
it from the incoming payload (e.g., extract payload.deliveryNote or
payload.note) and assign it to a properly named property on deliveryInfo (e.g.,
deliveryInfo.deliveryNote) before returning; otherwise remove both deliveryNote
and any added deliveryInfo.deliveryNote references so the response only contains
real parsed fields.

@IM-Agents
IM-Agents merged commit c54ad2b into cursor_new_oma_req May 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants