Skip to content

fix: describe what each Kosli Actions trigger fires on and correct the webhook event_type - #412

Merged
dangrondahl merged 3 commits into
mainfrom
docs/411-kosli-actions-trigger-descriptions
Sep 14, 2026
Merged

dangrondahl merged 3 commits into
mainfrom
docs/411-kosli-actions-trigger-descriptions

Conversation

@dangrondahl

@dangrondahl dangrondahl commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Kosli Actions page described the "Artifact changed" trigger as firing "when instances of an artifact are scaled up or down". Scaling events are no longer recorded, and that trigger fires when an artifact that is already running becomes compliant or non-compliant, or gains new provenance. Readers who set it up expecting a notification on a new deployment got nothing.

Changes to integrations/kosli_actions.md:

  • Replace the six-bullet trigger list with a table mapping UI label to API value and stating the exact condition for each trigger. The "Artifact changed" row says explicitly that it does not fire for new deployments.
  • Add a note that ON_SCALED_ARTIFACT keeps its historical name for API compatibility and never fires on replica count changes.
  • Link the table to the API reference and the Terraform kosli_action page so readers can connect the three surfaces.
  • Correct the webhook example from ARTIFACT_STARTED to STARTED_ARTIFACT and list all six possible event_type values below it.

Adjacent stale scaling prose, flagged in review:

The upstream fix for the Terraform kosli_action example and schema descriptions is kosli-dev/terraform-provider-kosli#262.

Closes #411

Verification

  • The API link target was checked against the live OpenAPI spec: PUT /actions/{org}/environments has the summary "Create or update environment action", which slugifies to the linked path.
  • mint broken-links reports one broken link, in tutorials/working_with_controls.mdx. It pre-exists on main and is unrelated to this change.

…e webhook event_type

The Artifact changed trigger (ON_SCALED_ARTIFACT) was described as firing
when instances are scaled up or down. Scaling events are no longer recorded;
the trigger fires when a running artifact becomes compliant or non-compliant
or gains new provenance. Replace the trigger list with a table that maps UI
label to API value and states the exact condition for each.

The webhook example showed event_type ARTIFACT_STARTED; the actual value is
STARTED_ARTIFACT. List all possible event_type values below the example.

Closes #411
@dangrondahl
dangrondahl requested a review from a team as a code owner September 14, 2026 09:02
@mintlify

mintlify Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
kosli 🟢 Ready View Preview Sep 14, 2026, 9:33 AM

@claude

claude Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @dangrondahl's task in 1m 52s —— View job


Doc review — PR #412

Reviewed at ce3e974. Two findings; both were raised in the previous round and neither is resolved at HEAD.

Improvement

terraform-reference/resources/action.mdx — the link this PR adds points at a page saying the opposite (inline)

integrations/kosli_actions.md:14 now sends readers to /terraform-reference/resources/action for the trigger values. At HEAD that page still carries # Action that fires on scaling events / triggers = ["ON_SCALED_ARTIFACT"] (lines 34-40), documents triggers with only the two *_ENV values (line 58), and frames kosli_action as environment-compliance-only in its description, intro and line 13 — while your table establishes that four of the six triggers are artifact-level.

terraform-reference/ is agent-synced, not deterministically regenerated, so a hand-edit survives here and would only drift if upstream disagreed — and kosli-dev/terraform-provider-kosli#262 won't. Correct action.mdx in this PR, or hold the Terraform link until the sync lands.

Suggestion

PR description no longer matches the branch. ce3e974 reverted the tutorials/querying_kosli.md change, but the description still lists it under "Adjacent stale scaling prose". tutorials/querying_kosli.md:47 still shows Scaled up from 1 to 3 in aws-prod#203 environment in the sample kosli search output — an event that can no longer be produced, on a page a reader is likely to hit while learning what Kosli records. Deferring it to a full refresh is reasonable; drop it from the description and track the refresh so the line is not left in place by omission.

Not findings

  • Trigger-column casing: author confirmed the UI is inconsistent, verbatim wins.
  • /api-reference/actions/create-or-update-environment-action: author verified the slug against the live spec.
  • I could not run gh pr checks in this sandbox, so I have not confirmed the link-rot result. /terraform-reference/resources/action resolves to an existing file listed at config/navigation.json:494.

Swept the rest of the site for scaling prose the PR's premise invalidates: the only remaining hits outside generated pages are tutorials/querying_kosli.md:47 (above), the deliberate deprecation notes in helm/k8s_reporter/, and historical changelog/index.mdx entries, which correctly stay as written.

1 Improvement, 1 Suggestion. Advisory only — not blocking.
· docs/411-kosli-actions-trigger-descriptions

Comment thread integrations/kosli_actions.md
Comment thread integrations/kosli_actions.md
Kosli no longer records instance scaling events. Drop the "instance
scaling" example from the commit-to-production tutorial description and
the "Scaled up from 1 to 3" line from the sample search output in the
querying tutorial, since that event can no longer be produced.
The stale "Scaled up" line is removed as part of the full tutorial
refresh in #413, so this PR no longer needs to touch the file.
Comment thread integrations/kosli_actions.md
@dangrondahl

Copy link
Copy Markdown
Contributor Author

Status of the review findings at ce3e974:

No open threads remain.

@dangrondahl
dangrondahl enabled auto-merge (squash) September 14, 2026 10:11
@dangrondahl
dangrondahl merged commit 1740534 into main Sep 14, 2026
8 checks passed
@dangrondahl
dangrondahl deleted the docs/411-kosli-actions-trigger-descriptions branch September 14, 2026 10:16
dangrondahl added a commit that referenced this pull request Sep 14, 2026
…data (#413)

## Summary

Running `tutorials/querying_kosli.md` as written no longer works.
cyber-dojo renamed its flows to `*-ci`, so `kosli list artifacts --flow
creator` and `kosli get artifact creator:344430d` fail with "Flow named
'creator' does not exist". The search example resolves to an archived
flow with 2022 timestamps, and the `aws-beta aws-beta~1` diff example
prints nothing today because the two latest snapshots run the same
artifacts.

This refresh:

- Follows one current commit (`creator` 99d7b74) through every step:
search, list artifacts, get artifact, the snapshot where it started
running, and the diff that shows its deployment.
- Replaces every sample output with what the CLI prints today, including
the newer TAGS, POLICIES, COMPLIANT, and COMPLIANCE columns.
- Uses a snapshot pair that actually differs (`aws-beta#8339` vs
`#8338`) for the diff example, explains that an empty diff means nothing
changed, and mentions `--show-unchanged`.
- Notes that one commit can produce several artifacts, since search now
also lists Terraform state artifacts for the same commit.
- Explains the `VISIBILITY` column: a legacy per-flow field that does
not control access. Access comes from the organization's visibility.
This spawned kosli-dev/cli#1169 to drop the column.

Setup sweep across the three cyber-dojo tutorials, from review:

- All three (`querying_kosli`,
`following_a_git_commit_to_runtime_environments`,
`tracing_a_production_incident_back_to_git_commits`) now use the same
copy-pasteable Setup block with `KOSLI_API_TOKEN=ignored`, since
cyber-dojo is public and the CLI only needs a non-empty value. A
placeholder is used deliberately instead of a real-looking token, to
avoid secret scanners and to avoid implying a real token is required.
- The API token prerequisite is optional on all three.
- The commit-to-production tutorial's `kosli list flows` table is
refreshed; it listed two flows that no longer exist. The rest of that
page is still stale and deserves its own refresh.

No page files move, no navigation or redirect changes.

## Verification

Every command on the querying page was run against cyber-dojo on
2026-09-14 and the outputs pasted from those runs, trimmed with `[...]`
where long. The placeholder token was verified to read every flow.

Related: #412 also touched
`following_a_git_commit_to_runtime_environments.md` (frontmatter
description only). The hunks do not overlap.

This branch was successfully deployed

1 active deployment
staging — ce3e9747 Deployed Sep 14, 2026 by mintlify[bot]
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.

Kosli Actions page describes the "Artifact changed" trigger as scaling and shows the wrong webhook event_type

2 participants