Skip to content

chore: align compliance status messages to NON-COMPLIANT#970

Merged
mbevc1 merged 1 commit into
mainfrom
20260624_fix_incompliance
Jun 25, 2026
Merged

chore: align compliance status messages to NON-COMPLIANT#970
mbevc1 merged 1 commit into
mainfrom
20260624_fix_incompliance

Conversation

@mbevc1

@mbevc1 mbevc1 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

For ENV and snapshot assertions the CLI printed INCOMPLIANT, which did not match the NON-COMPLIANT framing used in the UI and elsewhere in the CLI. Align the wording in assert snapshot and get environment.

Closes #969

For ENV and snapshot assertions the CLI printed INCOMPLIANT, which did
not match the NON-COMPLIANT framing used in the UI and elsewhere in the
CLI. Align the wording in `assert snapshot` and `get environment`.

Closes #969
@mbevc1 mbevc1 added bug Something isn't working customer-request For issues reported/inspired by customers - solution reported via community slack and to customer labels Jun 24, 2026
@claude

claude Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Claude finished @mbevc1's task in 1m 11s —— View job


Review: align compliance status to NON-COMPLIANT

  • Gather context (diff + surrounding code)
  • Static analysis (go build, go vet)
  • Check for other INCOMPLIANT occurrences left behind
  • Review code quality & consistency
  • Post review summary

LGTM. This is a clean, well-scoped wording fix that does exactly what it says.

Findings

  • Completeness — A repo-wide search for INCOMPLIANT returns zero remaining matches, so the rename is exhaustive. Both user-facing sites are covered:
    • cmd/kosli/assertSnapshot.go:90 — the error returned by assert snapshot.
    • cmd/kosli/getEnvironment.go:86 — the state shown by get environment.
  • ConsistencyNON-COMPLIANT now matches the framing already used elsewhere in the CLI: getSnapshot.go:208, assertArtifact.go:194 (Error: NON-COMPLIANT), and getTrail.go:198 which explicitly handles "NON_COMPLIANT", "NON-COMPLIANT". Good alignment with the UI.
  • Tests — The golden file in assertSnapshot_test.go:92 (Error: NON-COMPLIANT\n) and the test name were updated together, so the assertion actually covers the new wording rather than silently passing. 👍
  • Static checksgo build ./... and go vet ./cmd/kosli/ both pass.

Minor observations (non-blocking, out of scope for this PR)

  • assertArtifact.go:194 emits the failure via logger.Info("Error: NON-COMPLIANT") rather than return fmt.Errorf("NON-COMPLIANT") like assertSnapshot.go now does. The on-screen text matches, but the two commands signal failure through different mechanisms. Worth a glance to confirm the assert artifact exit code still behaves as intended — though that's pre-existing and unrelated to this change.
  • The get environment path relies on env["state"].(bool) type assertions; no change needed here since this PR only touches the string literal, just noting the surrounding code assumes well-formed input.

Nice, tightly-scoped customer-facing fix — test and production code changed in lockstep.

@mbevc1 mbevc1 added enhancement New feature or request breaking Issues or PRs that is deemed to introduce breaking changes and removed bug Something isn't working labels Jun 24, 2026
mbevc1 added a commit to kosli-dev/docs that referenced this pull request Jun 24, 2026
Adds a "Don't parse the raw CLI output" section to the Querying Kosli
tutorial, advising readers to use exit codes or `--output json` rather
than grepping human-readable output (e.g.
`COMPLIANT`/`NON-COMPLIANT`/`INCOMPLIANT`). This avoids scripts silently
breaking when wording is tweaked between CLI versions (context: internal
discussion around kosli-dev/cli#970).

<!-- mintlify-agent-attribution -->
---
Generated by Mintlify Agent.

Requested by: marko@kosli.com via Slack
Mintlify session: slack_1782312639.838479_C0AJTQ5633K

---------

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Marko Bevc <marko@kosli.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Marko Bevc <marko.bevc@gmail.com>
@mbevc1

mbevc1 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Related docs change: kosli-dev/docs#290

@mbevc1 mbevc1 enabled auto-merge (squash) June 24, 2026 16:03
@mbevc1 mbevc1 merged commit af5111c into main Jun 25, 2026
20 checks passed
@mbevc1 mbevc1 deleted the 20260624_fix_incompliance branch June 25, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Issues or PRs that is deemed to introduce breaking changes customer-request For issues reported/inspired by customers - solution reported via community slack and to customer enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: align compliance status messages

2 participants