Skip to content

ci(version-audit): fix blocked Linear calls, Slack results, skip up-to-date tickets - #5677

Merged
maheshkutty merged 6 commits into
developfrom
fix/version-audit-cursor-hooks
Oct 16, 2026
Merged

maheshkutty merged 6 commits into
developfrom
fix/version-audit-cursor-hooks

Conversation

@maheshkutty

@maheshkutty maheshkutty commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Two changes to the Integration Version Audit workflow:

  1. Fix: remove .claude/settings.json (and .claude/settings.local.json) before cursor-agent runs, so its Claude Code hook stops blocking the agent's shell commands.

  2. Slack notification: after every run, post the result to #integration-dev, with the parent (master) Linear ticket link when the run succeeds. The agent is now asked to print a MASTER_TICKET_URL: <url> line. Its output is tee'd to a file and the URL is read from there. If the agent step fails or no URL is printed, a failure message is posted instead. set -o pipefail keeps the cursor-agent exit code intact through tee.

  3. No tickets for up-to-date integrations: the audit plan treated any integration with a sunset date as action required. That gave tickets to integrations already on the latest version, such as the five Facebook Graph v25.0 ones and Criteo 2026-07. Now action is required only when a newer version exists, the version gap is greater than 2, or the code still defaults to a deprecated endpoint.

The Slack message also CCs @integrations-eng.

The Slack step reuses the existing SLACK_BOT_TOKEN and SLACK_INTEGRATION_DEV_CHANNEL_ID secrets and the same pinned slackapi/slack-github-action that slack-notify.yml uses.

What is the related Linear task?

N/A

Please explain the objectives of your changes below

Cursor loads Claude Code hooks from .claude/settings.json (its third-party hooks compatibility, on by default). It maps our PreToolUse / Bash lint-staged hook to every shell command, and it ignores the Claude Code–only "if": "Bash(git commit*)" filter. The hook prints plain text instead of JSON, so Cursor blocks every command. As a result, the audit has not been able to call the Linear API, and no tickets were created or updated. The job still reports success.

Failed runs:

Both logs report: Hook "npx lint-staged..." returned invalid JSON. The command was blocked for safety.

Reference: https://cursor.com/docs/reference/third-party-hooks

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

The settings file is removed only on the CI runner. Local Claude Code users keep the hook. The audit now posts a message to #integration-dev on every run.

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

The hook fix was verified with a dispatch run of this branch: https://github.com/rudderlabs/rudder-transformer/actions/runs/38691782956. That run created master INT-7380, 21 subtickets, and 1 update. The Slack notification commits have not run in CI yet.

🤖 Generated with Claude Code

Cursor loads Claude Code hooks from .claude/settings.json and runs the
lint-staged PreToolUse hook on every shell command, ignoring its
git-commit filter. The hook's non-JSON output blocks all commands, so
the audit never reached the Linear API.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
@maheshkutty
maheshkutty requested review from a team as code owners October 15, 2026 06:18
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 97edb9dc-60f8-4cd5-b880-72c8d9746974

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
  • 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.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (9124525) to head (410fe58).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5677   +/-   ##
========================================
  Coverage    92.12%   92.12%           
========================================
  Files          713      713           
  Lines        39591    39591           
  Branches      9276     9206   -70     
========================================
  Hits         36474    36474           
- Misses        2852     2932   +80     
+ Partials       265      185   -80     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Look up the audit master ticket touched during the run and post its
link to Slack, or a failure message when no ticket was created or
updated (cursor-agent exits 0 even when Linear calls are blocked).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
Have cursor-agent print a MASTER_TICKET_URL line and read it from the
tee'd output instead of querying Linear in a separate step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
@maheshkutty maheshkutty changed the title ci(version-audit): disable Claude Code hooks before running cursor-agent ci(version-audit): fix blocked Linear calls and post results to Slack Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
saikumarrs
saikumarrs previously approved these changes Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
The plan marked any integration with a sunset date as action required,
so integrations already on the latest version (e.g. Facebook Graph
v25.0, Criteo 2026-07) got tickets. Require a newer version to exist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
@maheshkutty maheshkutty changed the title ci(version-audit): fix blocked Linear calls and post results to Slack ci(version-audit): fix blocked Linear calls, Slack results, skip up-to-date tickets Oct 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@maheshkutty
maheshkutty merged commit cc26914 into develop Oct 16, 2026
38 of 39 checks passed
@maheshkutty
maheshkutty deleted the fix/version-audit-cursor-hooks branch October 16, 2026 05:33
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.

3 participants