Skip to content

Lock monitor incident conditions after creation - #3947

Merged
geclos merged 6 commits into
developmentfrom
cursor/monitor-edit-restrictions-5388
Jul 13, 2026
Merged

Lock monitor incident conditions after creation#3947
geclos merged 6 commits into
developmentfrom
cursor/monitor-edit-restrictions-5388

Conversation

@geclos

@geclos geclos commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Per product feedback: nothing that changes when or how a monitor opens incidents should be editable after creation. This PR locks trigger type, metric, target, threshold, window, and sensitivity edits while keeping severity (and name/description/mute) editable.

Changes

Domain & API

  • updateMonitorUseCase rejects target, trigger, and condition/config changes for all monitors
  • System monitors can still update severity; metadata and conditions remain locked
  • Public PATCH /monitors/:slug body is now name, description, and severity only

Web UI

  • Monitor edit modal is severity-only — type, metric, and threshold fields are read-only
  • Removed the escalating sensitivity edit modal (sensitivity is an incident condition)
  • All monitors (including system) get "Edit monitor" for severity
  • Tabs component supports a disabled prop with opacity and cursor-not-allowed, fixing the metric measure selector looking clickable when locked

Testing

  • Updated update-monitor.test.ts for the new validation rules
  • pnpm --filter @domain/monitors test
  • Typecheck on @domain/monitors, @repo/operations, @repo/ui, @app/web
  • Regenerated openapi.json, mcp.json, TS/Python SDKs, and CLI manifests

Slack Thread

Open in Web Open in Cursor 

Monitors should not allow changing incident-launching conditions after
creation. Lock trigger, metric, target, threshold, and sensitivity edits
in the domain layer, public API, and web UI. The edit modal now only
updates severity; disabled tab selectors show clear visual affordances.

Co-authored-by: Gerard <gerard@latitude.so>
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Jul 10, 2026 8:31am

Request Review

Co-authored-by: Gerard <gerard@latitude.so>
@geclos
geclos marked this pull request as ready for review July 9, 2026 10:19
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@claude

claude Bot commented Jul 9, 2026

Copy link
Copy Markdown

PR Diff Explanation

I've generated a rich interactive HTML explanation of this PR.

Artifact: https://artifact-pr-3947-diff-review.climbing-tellurium.workers.dev

Claim URL (within 60 minutes): https://dash.cloudflare.com/claim-preview?claimToken=uMyvNPLFEniqTRVVr-28rKtbh0aYZAQxWJHPeDAIqT4

The artifact covers:

  • Background — how monitors and incidents work, what was editable before, and why mutable firing conditions are problematic
  • Intuition — the fire-alarm analogy, before/after API comparison, the new validation flow diagram, and a UI mockup of the severity-only edit modal
  • Code Walkthrough — all 5 layers: domain guards, operations schema narrowing, Tabs disabled prop, edit modal wiring, detail page changes, generated artifacts, and new tests
  • Quiz — 5 interactive multiple-choice questions to check comprehension

@neoxelox
neoxelox self-requested a review July 9, 2026 10:32
@neoxelox

neoxelox commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@cursoragent you need to bump the version of the CLI and SDKs!

@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

❌ Unable to add follow-up after multiple attempts. The agent may be experiencing issues.

Please try again later or Open in Web to view the status.

Open in Web Open in Cursor 

Learn more about Cursor Agents

@geclos

geclos commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

@cursoragent babysit this pr

@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

babysit could not start: Full Self Driving is not enabled for this user.

cursoragent and others added 2 commits July 9, 2026 14:03
…it lock

Co-authored-by: Gerard <gerard@latitude.so>
@geclos

geclos commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

@neoxelox please review 🙏🏼

@neoxelox

Copy link
Copy Markdown
Contributor

@cursoragent you need to bump the version of the CLI and SDKs!

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

❌ Unable to add follow-up after multiple attempts. The agent may be experiencing issues.

Please try again later or Open in Web to view the status.

Open in Web Open in Cursor 

Learn more about Cursor Agents

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Addressed — bumped versions for the breaking updateMonitor contract change:

  • TypeScript SDK9.0.0 (packages/sdk/typescript/package.json + CHANGELOG)
  • Python SDK9.0.0 (packages/sdk/python/pyproject.toml + CHANGELOG)
  • CLI7.0.0 (packages/cli/CHANGELOG.md)

Regenerated the Python SDK client wrapper User-Agent with the new version.

updateMonitor no longer accepts target, trigger, metric, or condition.
Bump TS and Python SDKs to 9.0.0 and CLI to 7.0.0 per semver.

Co-authored-by: Gerard <gerard@latitude.so>
@geclos

geclos commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

cc @neoxelox

@geclos
geclos merged commit 0323299 into development Jul 13, 2026
20 checks passed
@geclos
geclos deleted the cursor/monitor-edit-restrictions-5388 branch July 13, 2026 08:18
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Latitude LLM Roadmap Jul 13, 2026
geclos added a commit that referenced this pull request Jul 13, 2026
…-json-parse-failure-1d6f

* origin/development: (71 commits)
  Fix signup attribution across latitude.so and console boundary (#3941)
  chore(deps): bump astral-sh/setup-uv from 7 to 8.3.0 (#3994)
  chore: update bundled models.dev data (#3987)
  chore(deps): bump @tanstack/react-virtual (#4002)
  Lock monitor incident conditions after creation (#3947)
  chore(deps): bump @typescript/native-preview (#3989)
  chore(deps): bump taiki-e/install-action from 2.82.7 to 2.82.9 (#3991)
  chore(deps): bump typing-extensions in /packages/platform/op-gepa/python (#3992)
  chore(deps): bump opentelemetry-instrumentation-together (#3993)
  chore(deps): bump opentelemetry-instrumentation-langchain (#3995)
  chore(deps): bump @slack/web-api from 7.10.0 to 7.18.0 (#3996)
  chore(deps): bump docker/build-push-action from 7.2.0 to 7.3.0 (#3997)
  chore(deps): bump openinference-instrumentation-openai-agents (#3998)
  chore(deps): bump openinference-instrumentation-crewai (#3999)
  chore(deps): bump aws-actions/configure-aws-credentials (#4000)
  chore(deps): bump typing-extensions in /packages/telemetry/python (#4001)
  Fix OAuth token validation to enforce live organization membership (#3917)
  feat(wrapped): add skills breakdown to Claude Code Wrapped (report V3) (#3978)
  chore(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#3902)
  chore(deps): bump anthropics/claude-code-action from 1.0.160 to 1.0.166 (#3990)
  ...

# Conflicts:
#	packages/domain/flaggers/src/use-cases/run-flagger.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants