Skip to content

Latest commit

 

History

History
746 lines (586 loc) · 29.1 KB

ci.md

File metadata and controls

746 lines (586 loc) · 29.1 KB

Running Flecto in CI

flecto ci diffs config against a baseline and exits non-zero when something you care about changed — so a risky config edit fails the build instead of reaching production unnoticed.


The basic run

flecto ci "config/**/*.yaml" \
  --snapshot-ref HEAD~1 \
  --format github-annotations \
  --fail-on "changed,policy,error"

Exit codes: 0 when nothing matched a fail trigger, 1 when something did.


Choosing a baseline

--snapshot-ref takes a git revision; --snapshot-file takes a snapshot file. They are separate flags since 4.0, because accepting either in one flag let a pull request shadow the operator's baseline by committing a file named after their ref.

A value that is unambiguously a path — absolute, or starting ./ or ../ — is still read as a file by --snapshot-ref, since git's ref format cannot produce those shapes. Anything else must resolve as a revision, or the run fails and says to use --snapshot-file.

flecto ci config/prod.yaml --snapshot-ref HEAD~1
flecto ci config/prod.yaml --snapshot-ref origin/main
flecto ci config/prod.yaml --snapshot-file .flecto-snapshots/4b8cbbd70d1832a2.json

Omit --snapshot-ref entirely and Flecto compares against the snapshot store — by default the local one flecto watch --snapshot writes. That's convenient locally, but a fresh runner has no local snapshots, so in CI you want either an explicit git ref or a committed shared store:

# saved and committed from a laptop, read by every runner
flecto watch "config/**/*.yaml" --snapshot --snapshot-store shared
flecto ci "config/**/*.yaml" --snapshot-store shared

The shared store is keyed by repo-relative path and masks secret-like values by default; see Snapshot stores before committing one.

An unresolved ref is an error, not an empty baseline — otherwise a bad ref would silently report "no changes" and pass every build.

Don't glob into --snapshot-ref. Each --snapshot run writes both a stable <hash>.json and a timestamped history file, so .flecto-snapshots/*.json expands to several paths — the first becomes the ref and the rest are parsed as target files. Name one file, or omit the flag.


Fail triggers

--fail-on takes a comma-separated list. Default: changed,policy,error.

Trigger Fails when
changed Any value changed
added Any key was added
removed Any key was removed
policy Any policy finding was produced
error Any error-severity finding was produced
warn Any warn-severity finding was produced

Most teams start with policy,error — gate on risk, not on the existence of a diff — and tighten later.


Suppressing one finding in place

When a single finding is deliberate, accept it next to the thing being accepted with an inline comment, rather than in a baseline file elsewhere:

database:
  # flecto-ignore-next-line pool-size-jump — provisioned for the Black Friday load test, reverting in December
  pool_size: 200

The comment goes on the line above the flagged value and names the rule. A reason is mandatory — a suppression without one is refused, with a pointer to the file and line, so a repo never accumulates unexplained # noqa:

[error] Inline suppression is missing a required reason:
  config/prod.yaml:12: flecto-ignore-next-line pool-size-jump needs a reason …

The reason follows the rule id after an em dash (—), --, :, or just a space. The directive works in every format Flecto parses that has comments — YAML, TOML, INI, dotenv (#, or ; in INI), and JSON, which is read as JSONC and so accepts both // and /* … */:

{
  "database": {
    // flecto-ignore-next-line pool-size-jump — Black Friday load test, reverting in December
    "pool_size": 200
  }
}

A suppression is scoped to the next line and the named rule — never a bare "ignore everything here"; --ignore and severityRemap already do that. It resolves to the exact key on that line (with its full nesting), so a suppression on one pool_size never hides an uncommented pool_size elsewhere in the file.

When a directive cannot be resolved

Some lines have no addressable key path: an array element in any format, and a document inside a multi-document YAML file. An array element's diff path is its index or its --array-id-key identity depending on how the run is configured, so resolving one would suppress the wrong finding under the other configuration — the dangerous direction for a tool whose job is making risk visible.

Flecto refuses those, and says so:

config/app.json:3: flecto-ignore-next-line pool-size-jump does not resolve to a
config key, so it suppresses nothing — array elements and multi-document files
are not addressable inline; use --baseline

That is a warning rather than an error, because it already fails closed: the finding the directive meant to accept still fires and still gates the build. What was missing was any signal that the directive had no effect. A directive in a file type with no comment syntax at all — an encrypted .age file — warns the same way. Use the baseline for those findings.

Suppressed findings are still surfaced so the gate stays legible: a count by default, the full list with --show-suppressed, both on stderr.

Suppression vs. baseline. They solve different problems. A baseline is "we are adopting Flecto and have 200 pre-existing findings." A suppression is "this one line is deliberate, and here is why." Suppressions apply first — a finding suppressed inline is gone before the baseline is consulted, so it is never counted twice.

Adopting on an existing repo: the baseline

Turn Flecto on in a repo that has been running for years and the first CI run is a wall of findings for config that was already there. The baseline is how you get to green without either fixing everything first or silencing rules you still want enforced on new config.

# record what exists today (explicit — a baseline is never written automatically)
flecto ci "config/**/*.yaml" --snapshot-ref origin/main \
  --baseline .flecto-baseline.json --update-baseline

# from now on, gate only on findings that are NOT in the baseline
flecto ci "config/**/*.yaml" --snapshot-ref origin/main \
  --baseline .flecto-baseline.json --fail-on policy,error

Commit .flecto-baseline.json. A recorded finding is suppressed from both the gate and the output; a genuinely new finding still fails the build.

What makes a finding "the same one." The baseline keys each finding on (rule id, file, path) — deliberately not the value. A pool-size-jump accepted at 5→20 stays accepted when it becomes 5→21, so the file does not churn on every edit and get deleted. The flip side: renaming a file or restructuring a path re-introduces its findings as new, which is the honest cost of a key precise enough to tell two findings apart.

The file is human-reviewable and diff-friendly — one entry per finding, sorted, each carrying the rule, file, path, severity, the message for context, and when it was accepted. Add a "reason" to any entry by hand; --update-baseline preserves it and the original acceptedAt:

{
  "version": 1,
  "findings": [
    {
      "rule": "pool-size-jump",
      "file": "config/prod.yaml",
      "path": "database.pool_size",
      "severity": "warn",
      "message": "Pool size increased from 5 to 200 (>=2x).",
      "acceptedAt": "2026-08-17T10:00:00.000Z",
      "reason": "provisioned for the Black Friday load test, reverting in December"
    }
  ]
}

Keeping it honest. A run reports stale entries — recorded findings that no longer occur — on stderr, so the file shrinks over time instead of accreting forever. --update-baseline prunes them. Updating is always explicit: a CI run that quietly re-recorded findings would launder new risk into the accepted set, so it never happens without the flag. A malformed baseline is an error, not a silent empty one, since treating it as empty would fail the build in a way that looks like a regression.

--fail-on changed and the other change triggers are about the diff, not the findings, so they still fire under a baseline — the baseline accepts policy findings, it does not accept the change itself.


Output formats

github-annotations

Findings appear inline on the changed lines in the PR's Files tab.

::warning file=config/prod.yaml,title=flecto policy pool-size-jump [default]::database.pool_size: Pool size increased from 5 to 20 (>=2x).
::error file=config/prod.yaml,title=flecto policy dangerous-toggle-enabled [default]::logging.debug: Potentially dangerous toggle enabled.

json

One array of per-file results, each carrying a full envelope. Good for archiving a build's config state or post-processing.

ndjson

One JSON object per line — for streaming into a log pipeline without buffering the whole run.

sarif

SARIF 2.1.0, for upload to GitHub code scanning. Policy findings render on the pull request diff and in the Security tab, and GitHub handles dedup, new-vs-existing, and fixed-finding tracking across runs.

flecto ci "config/**/*.yaml" --snapshot-ref origin/main --format sarif > flecto.sarif
permissions:
  contents: read
  security-events: write   # required to upload SARIF
steps:
  - run: flecto ci "config/**/*.yaml" --snapshot-ref origin/main --format sarif > flecto.sarif
  - uses: github/codeql-action/upload-sarif@v4
    with:
      sarif_file: flecto.sarif

Two things worth knowing:

  • SARIF carries policy findings, not raw changes. A SARIF result needs a rule id; a bare change (--fail-on changed) has none. The run still exits non-zero, and the diff is still in the json output — SARIF reports the gated policy findings.
  • Results are file-level for now. Flecto reports a semantic path (Deployment/prod/api.spec.replicas), not a source line, so each result anchors at the top of the file and preserves the full path as a SARIF logical location. GitHub still renders, dedupes, and tracks the alert; it just is not yet pinned to the exact line.
  • --mask-secrets applies. A SARIF file is uploaded and retained, so mask before you upload if findings could carry sensitive values.

--changed-only

json and ndjson emit one envelope per scanned file, so the output grows with the size of the repository rather than the size of the change. On 250 service configs with one file edited, roughly 88% of it describes files that did not change. For a human that is invisible — the terminal renderer already prints only what changed — but webhook sinks, NDJSON consumers, and any agent handed the JSON pay for it on every run.

--changed-only replaces those envelopes with a single manifest:

flecto ci "config/**/*.yaml" --format json --changed-only
[
  {
    "file": "/repo/config/prod.yaml",
    "envelope": { "event_type": "changes", "changes": [ ... ] }
  },
  {
    "scanned": ["/repo/config/dev.yaml", "/repo/config/stage.yaml"],
    "envelope": {
      "event_type": "lifecycle",
      "lifecycle": { "type": "scanned", "message": "2 files scanned with no changes and no policy findings" }
    }
  }
]
change (250 configs) default --changed-only reduction
nothing changed 112.8 KB 13.3 KB 88%
one file changed 113.4 KB 14.3 KB 87%
every 10th file changed 126.8 KB 37.3 KB 71%

The evidence that Flecto looked is kept. An envelope for a scanned but unchanged file tells a consumer diffing two runs that the file was checked and clean, rather than not checked at all — dropping it would quietly weaken a gate someone relies on. The manifest keeps that list; what it drops is the pair of UUIDs, timestamp, and repeated schema fields attached to each entry. In the one-file-changed row above, 11.1 KB of the remaining 14.3 KB is the path list, so nearly all of the per-file overhead is gone and nearly all of what is left is the evidence itself.

Notes:

  • Off by default. schema_version stays 2.0 and the default output is byte-for-byte unchanged, so no existing consumer is affected.
  • A file with policy findings but no changes is not collapsed — a finding is something to report.
  • Discriminate on envelope.event_type === "lifecycle"; the manifest entry has no file, since it is not about one file. The path list rides on the result wrapper because schema 2.0 closes the envelope to extra properties.
  • The flag applies to json and ndjson. sarif, github-annotations, and pr-comment already carry only what changed (or, for sarif, only findings), and Flecto warns rather than accepting the flag and doing nothing.
  • Settable as changedOnly: true in .flectorc defaults or a profile.

pr-comment

A markdown risk summary for a pull request: change counts, policy findings grouped by severity, and the per-file change list (collapsed into a <details> block once it passes ten changes). Annotations are easy to miss in the Checks tab; a comment on the PR is not.

<!-- flecto:pr-comment -->

## Flecto — config change report

❌ **Check failing** — 2 changes in 1 file — 2 changed, 0 added, 0 removed.

**Policy:** 1 error, 1 warning.

### Policy findings

#### Errors (1)

| File | Path | Rule | Message |
|---|---|---|---|
| `config/prod.yaml` | `logging.debug` | `dangerous-toggle-enabled` (`default`) | Potentially dangerous toggle enabled. |

The first line is a hidden marker, <!-- flecto:pr-comment -->. When posting is enabled, Flecto looks for that marker in the PR's existing comments and edits the one it finds, so a ten-push PR keeps one comment instead of ten. The body is deterministic, so a run that changes nothing skips the write entirely and leaves no "edited" noise.

By default this format only prints to stdout — it never posts. Posting happens only when both of these are true:

  1. You opted in explicitly with --pr-comment-post (or "prCommentPost": true in .flectorc), and
  2. the process has a complete merge request context for the detected provider (see Providers below). On GitHub that means GITHUB_TOKEN, GITHUB_REPOSITORY in owner/repo form, and a PR number from GITHUB_REF (refs/pull/<n>/merge or /head) or from the event payload at GITHUB_EVENT_PATH.

GH_TOKEN is deliberately ignored, because gh auth login exports it on developer machines. Between the required flag and the required PR-context variables, a local flecto ci --format pr-comment prints markdown and stops.

Anything missing or failing — no token, not a PR run, an API error, a token without pull-requests: write — prints a [warn] on stderr and leaves the exit code alone. The exit code always reports the diff and policy result, never the comment delivery. The token is never printed, and it is redacted from any API error text that is echoed back.

Before and after values are rendered as they are (truncated at 120 characters), so pair posting with --mask-secrets whenever the watched files can carry credentials — a PR comment is as visible as the pull request itself.

Because the markdown goes to stdout, you can also post it with your own tooling and skip Flecto's GitHub client entirely:

flecto ci "config/**/*.yaml" --snapshot-ref origin/main --format pr-comment > comment.md
gh pr comment "$PR" --body-file comment.md --edit-last

In a GitHub Actions workflow, reach for the flecto-pr-risk Action, which does this by default and resolves the baseline from the pull request for you. The general-purpose flecto-ci Action can do it too, with the pr-comment-post input and write access to pull requests:

permissions:
  contents: read
  pull-requests: write

steps:
  - uses: actions/checkout@v7
    with:
      fetch-depth: 2
  - uses: myselfsiddharth/Flecto/.github/actions/flecto-ci@v4.1.0
    with:
      targets: config/**/*.{yaml,yml,json,toml,ini}
      format: pr-comment
      pr-comment-post: "true"
      github-token: ${{ github.token }}

Forked-PR runs get a read-only token, so posting there fails with a warning rather than a failed job.

Envelope shape is documented in webhooks.md and formally in schemas/flecto-envelope-2.0.json.


Providers

The comment body is provider-agnostic markdown; only delivery differs. Flecto detects the host from CI environment variables, and --pr-provider forces one:

flecto ci "config/**/*.yaml" --format pr-comment --pr-comment-post --pr-provider gitlab
Provider Detected by Token Merge request identified by
github GITHUB_ACTIONS, GITHUB_REPOSITORY GITHUB_TOKEN GITHUB_REF or GITHUB_EVENT_PATH
gitlab GITLAB_CI, CI_MERGE_REQUEST_IID FLECTO_GITLAB_TOKEN or GITLAB_TOKEN CI_PROJECT_ID + CI_MERGE_REQUEST_IID
bitbucket BITBUCKET_PR_ID, BITBUCKET_REPO_SLUG FLECTO_BITBUCKET_TOKEN or BITBUCKET_TOKEN BITBUCKET_WORKSPACE + BITBUCKET_REPO_SLUG + BITBUCKET_PR_ID

All three upsert a single sticky comment: Flecto finds its own previous comment by marker and edits it, so a pipeline that runs twenty times leaves one comment, not twenty. An identical body skips the write entirely.

Behavior is identical across providers in the way that matters most: a missing token, a pipeline that is not a merge request, or an API failure prints a [warn] and never changes the exit code.

GitLab: CI_JOB_TOKEN will not work

Every GitLab job gets a CI_JOB_TOKEN, and it cannot post merge request notes. Flecto does not try it — it would fail with a 401 that reads like a broken setup rather than a missing permission. Set FLECTO_GITLAB_TOKEN to a project or group access token with the api scope:

flecto:
  image: node:22
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  variables:
    FLECTO_GITLAB_TOKEN: $FLECTO_REVIEW_TOKEN   # masked project variable
  script:
    - npx --yes flecto@4 ci "config/**/*.yaml"
        --snapshot-ref "$CI_MERGE_REQUEST_DIFF_BASE_SHA"
        --format pr-comment --pr-comment-post --mask-secrets

A self-managed instance is picked up automatically from CI_API_V4_URL.

GitLab's note API returns no web URL for the note it just created, so the link Flecto prints after posting is built from CI_MERGE_REQUEST_PROJECT_URL. That variable is exported by merge request pipelines; without it the run still posts normally and simply reports the action with no link.

Bitbucket

pipelines:
  pull-requests:
    '**':
      - step:
          image: node:22
          script:
            - export FLECTO_BITBUCKET_TOKEN=$FLECTO_REVIEW_TOKEN
            - npx --yes flecto@4 ci "config/**/*.yaml"
                --snapshot-ref "origin/$BITBUCKET_PR_DESTINATION_BRANCH"
                --format pr-comment --pr-comment-post --mask-secrets

The token needs pullrequest:write. BITBUCKET_WORKSPACE, BITBUCKET_REPO_SLUG, and BITBUCKET_PR_ID are provided by Bitbucket Pipelines on pull request builds.

GitHub Actions

Two composite Actions ship with the repository. Both wrap flecto ci; they differ in what they assume about the run.

Action Use it for Baseline
flecto-ci Any run — pull request, push, schedule HEAD~1, or whatever you pass
flecto-pr-risk Pull requests, with a sticky risk comment The pull request's base commit

flecto-ci — the general-purpose step

Wraps flecto ci with annotations enabled by default.

permissions:
  contents: read

steps:
  - uses: actions/checkout@v7
    with:
      fetch-depth: 2
  - uses: myselfsiddharth/Flecto/.github/actions/flecto-ci@v4.1.0
    with:
      targets: config/**/*.{yaml,yml,json,toml,ini}
      snapshot-ref: HEAD~1
Input Default Description
targets config/**/*.{yaml,yml,json,toml,ini} Whitespace-separated paths or globs
fail-on policy,error Comma-separated events that fail the job
policies (empty) Comma-separated pack ids; omit to use .flectorc
profile (empty) Optional .flectorc profile
format github-annotations Output format
pr-comment-post false With format: pr-comment, upsert the sticky PR comment
github-token (empty) Token used to post that comment; posting is skipped without it
snapshot-ref HEAD~1 Git ref or snapshot file used as the baseline
node-version 20 Node.js version used to run Flecto

contents: read is required by actions/checkout. With the default github-annotations format the Action only emits workflow commands, so it needs no write permissions; pr-comment-post: "true" additionally needs pull-requests: write and a github-token.

Keep fetch-depth: 2 (or 0) when using the default HEAD~1 baseline — the default shallow checkout of depth 1 has no parent commit to diff against.

A complete workflow is in examples/github-action/flecto-ci.yml, and the Action itself is at .github/actions/flecto-ci/action.yml.

flecto-pr-risk — the pull request gate

Everything the sticky comment needs, already switched on. One uses: is a complete adoption; every input below has a working default.

permissions:
  contents: read
  pull-requests: write

steps:
  - uses: actions/checkout@v7
    with:
      fetch-depth: 0
  - uses: myselfsiddharth/Flecto/.github/actions/flecto-pr-risk@v4.1.0
Input Default Description
targets config/**/*.{yaml,yml,json,toml,ini} Whitespace-separated paths or globs
fail-on policy,error Comma-separated events that fail the job
policies (empty) Comma-separated pack ids; omit to use .flectorc
profile (empty) Optional .flectorc profile
format pr-comment Output format; github-annotations keeps the PR baseline and reports inline
pr-comment-post true Upsert the sticky comment; "false" renders to the log only
mask-secrets true Redact secret-like values before rendering
github-token ${{ github.token }} Token used to post the comment
snapshot-ref (empty) Baseline override; empty means "the pull request's base commit"
flecto-version 2 npm version range for the CLI
node-version 20 Node.js version used to run Flecto

Outputs: snapshot-ref (the baseline actually used) and posting-enabled.

The baseline

HEAD~1 is the wrong baseline for a pull request: it is the previous commit on the branch, not the state the PR is proposing to change. flecto-pr-risk resolves it from the event instead, in this order:

  1. The snapshot-ref input, when you set one. It is used verbatim — a git ref or a snapshot file — and flecto ci fails closed if it does not resolve.
  2. github.event.pull_request.base.sha, refined to git merge-base <base> HEAD when the checkout has enough history for it. On a pull_request run the two are the same commit; the merge base is also right when the branch is checked out directly and the base has moved on since.

fetch-depth: 0 on actions/checkout is required. The default shallow checkout has one commit and no base to diff against. When the base commit is missing the Action tries to fetch just that commit, and if it still cannot get it the job fails with an explicit message naming fetch-depth: 0 — an unresolvable baseline would otherwise report "no changes" and wave a risky edit through. Two other cases fail the same loud way: no actions/checkout ran, and a non-pull-request event with no snapshot-ref set.

Permissions, and forks

permissions:
  contents: read        # actions/checkout
  pull-requests: write  # upsert the sticky comment

Posting is the only thing that needs write access, and it is never load-bearing: the exit code comes from the config diff and the policy result alone.

  • No pull-requests: write. GitHub refuses the API call, Flecto warns on stderr, the job still passes or fails on the diff.
  • A pull request from a fork. The GITHUB_TOKEN handed to a pull_request run from a fork is read-only unless the repository opted into write tokens for fork PRs, so posting is usually refused. The Action recognizes this before it runs and posts a workflow warning explaining why no comment will appear; the report is still printed in the job log in full. It does not fail, and it does not pre-emptively give up either, so a repository that has opted in still gets its comment.
  • An empty github-token. Posting is disabled up front with a warning rather than attempted and refused.

A complete workflow is in examples/github-action/flecto-pr-risk.yml, and the Action itself is at .github/actions/flecto-pr-risk/action.yml.

Pinning

Every example here pins the Action to the v4.0.0 tag. Do not use @main: it is whatever was pushed last, it is what Flecto's own github-actions pack flags in your workflows, and a tag is the least you should accept from a step that decides whether your build passes.

Both Actions then run npx --yes flecto@4 ci, so compatible CLI updates are picked up automatically. Two tighter levels are available:

# Exact CLI version — reproducible installs, tag still mutable in principle.
- uses: myselfsiddharth/Flecto/.github/actions/flecto-pr-risk@v4.1.0
  with:
    flecto-version: "4.0.0"
# Recommended if you are security-sensitive: pin the Action to a commit SHA.
# A tag can be moved; a SHA cannot. Add a comment, because a SHA is unreadable.
- uses: myselfsiddharth/Flecto/.github/actions/flecto-pr-risk@<commit-sha>  # v4.0.0
  with:
    flecto-version: "4.0.0"

Resolve the SHA for a tag with git ls-remote https://github.com/myselfsiddharth/Flecto refs/tags/v4.0.0. Both Actions take flecto-version, so pinning the CLI never needs a fork.

Warning

Do not reference the bundled Actions at @v4.0.0. That tag's copies of flecto-ci and flecto-pr-risk install flecto@3 — the pre-4.0 line, which is exposed to the baseline-shadowing bypass 4.0 closed. The fix shipped in 4.1.0, so pin @v4.1.0 or newer. Tags are immutable, so @v4.0.0 will always carry the old Actions; the CLI at flecto@4.0.0 is fine, it is only the bundled Action metadata at that tag that is not.

Do not set flecto-version below 4. --snapshot-file does not exist before 4.0, and pre-4.0 --snapshot-ref would resolve against a committed file of the same name — the baseline-shadowing bypass that 4.0 closed. A pull request could commit a file named HEAD~1, match it to its own tip, and every diff came back empty with exit 0.


Other CI systems

flecto ci is a plain CLI with meaningful exit codes, so any runner works:

# GitLab CI
config-check:
  image: node:22
  script:
    - npx --yes flecto@4 ci "config/**/*.yaml" --snapshot-ref "$CI_MERGE_REQUEST_DIFF_BASE_SHA" --fail-on "policy,error"
# Pre-commit hook (.git/hooks/pre-commit)
npx --yes flecto@4 ci "config/**/*.yaml" --snapshot-ref HEAD --fail-on "policy,error" || {
  echo "Flecto flagged a risky config change. Review above, or commit with --no-verify."
  exit 1
}

Gating environment skew

flecto ci asks "did this file change?". flecto compare asks "do these two files agree?" — the same differ, policy engine, fail triggers, and output formats, with another file as the baseline instead of an earlier version of the same one.

flecto compare config/prod.yaml config/staging.yaml \
  --format github-annotations \
  --fail-on "policy,error"

The first argument is the baseline; annotations and JSON results are attributed to the second file, with baseline recorded alongside. Exit codes work the same way, so it drops into a pipeline wherever flecto ci does. Flags: cli-reference.md.


Gating rendered Kubernetes manifests

The same compare shape gates a Helm or Kustomize change before helm upgrade runs: render the base and the head to plain multi-document YAML, then diff the two through the kubernetes policy pack.

helm template api ./charts/api -f values/prod.yaml > /tmp/head.yaml
flecto compare /tmp/base.yaml /tmp/head.yaml --policies kubernetes --fail-on error

Flecto never invokes helm or kustomize — neither binary is a dependency, and neither is needed on the runner beyond whatever already renders your manifests. The full workflow, the pack's rules, and its limits: kubernetes.md.


Empty runs

If every target is missing or unsupported, flecto ci and flecto watch --snapshot exit non-zero rather than reporting a clean pass. This catches the common failure where a renamed directory quietly turns a config gate into a no-op. Pass --allow-empty when an empty match is legitimately expected.