Skip to content

feat(constructs): add structured check intent [ship] - #1428

Merged
thebiglabasky merged 6 commits into
mainfrom
herve/check-intent-constructs
Aug 14, 2026
Merged

feat(constructs): add structured check intent [ship]#1428
thebiglabasky merged 6 commits into
mainfrom
herve/check-intent-constructs

Conversation

@thebiglabasky

@thebiglabasky thebiglabasky commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • publicly expose future-extensible CheckIntent authoring as a goal plus typed constraints on the RCA/self-healing check types
  • preserve the three deployment states: omitted intent is not owned, an object sets intent, and null explicitly clears it
  • serialize the construct-shaped constraints array directly to project deploys
  • consume construct-shaped intent from imports, with a fallback for persisted pre-cutover import plans that still contain requiredOutcomes / mustPreserve

Construct shape

intent: {
  goal: 'Verify that authenticated users can open the dashboard.',
  constraints: [
    {
      type: 'REQUIRED_OUTCOME',
      statement: 'The dashboard displays the account overview.',
    },
    {
      type: 'MUST_PRESERVE',
      statement: 'Do not weaken the authentication assertion.',
    },
  ],
}

constraints is optional for concise goal-only authoring. The currently supported constraint types are REQUIRED_OUTCOME and MUST_PRESERVE; new kinds can extend the discriminant without changing the enclosing intent shape.

Supported constructs

ApiCheck, BrowserCheck, MultiStepCheck, PlaywrightCheck, UrlMonitor, DnsMonitor, IcmpMonitor, TcpMonitor, and GrpcMonitor accept intent.

AgenticCheck, HeartbeatMonitor, SslMonitor, and TracerouteMonitor intentionally do not expose it. Their code generators also ignore unexpected backend intent so imports keep producing valid construct code.

Deployment semantics

  • intent: undefined omits the field from the synthesized resource and preserves UI/API-authored intent
  • an intent object trims its strings and sends goal plus typed constraints
  • omitted constraints synthesizes constraints: []
  • intent: null synthesizes an explicit clear
  • intent stays in the atomic project deployment, preview, and diff lifecycle; there are no post-deploy self-healing API calls

Backend dependency and rollout

This CLI shape depends on checkly/monorepo#3661, which updates /v1/projects/deploy to accept typed constraints and returns the same shape from imports and /v3/checks while preserving /v1/checks and /v2/checks.

Merge and deploy the backend PR before releasing this CLI PR. Older CLI versions remain compatible because they omit intent entirely. The codegen fallback for the stored array shape covers import plans persisted before the backend cutover.

Validation

  • pnpm lint
  • pnpm --filter checkly run prepare:dist
  • pnpm --filter checkly run test:types
  • pnpm pack
  • focused Vitest suites: 43 tests passed, including synthesis, construct-shaped codegen, legacy import-plan fallback, and a packed fixture project

@thebiglabasky thebiglabasky added the enhancement New feature or request label Aug 4, 2026
@thebiglabasky
thebiglabasky marked this pull request as ready for review August 4, 2026 17:55
@thebiglabasky
thebiglabasky requested a review from sorccu August 7, 2026 08:17
@thebiglabasky thebiglabasky changed the title feat(constructs): add structured check intent feat(constructs): add structured check intent [ship] Aug 14, 2026
@thebiglabasky
thebiglabasky enabled auto-merge (squash) August 14, 2026 15:02

@github-actions github-actions 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.

Auto-approved: ship/show PR from a same-repo branch.

@thebiglabasky
thebiglabasky merged commit b501293 into main Aug 14, 2026
17 of 28 checks passed
@thebiglabasky
thebiglabasky deleted the herve/check-intent-constructs branch August 14, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant