verifika 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +81 -46
- package/dist/config.js +1 -1
- package/dist/main.js +8 -9
- package/dist/reporters/agent.js +1 -1
- package/dist/reporters/human.js +1 -1
- package/dist/reporters/plan.js +1 -1
- package/dist/reporters/reporter.js +1 -1
- package/dist/runs.js +1 -1
- package/package.json +1 -1
- package/skills/verifika/SKILL.md +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/). The CLI flags, exit codes, configuration format (`version: 1`) and JSON output (`schemaVersion: 1`) are the public API.
|
|
4
4
|
|
|
5
|
+
## [0.0.2] - 2026-10-12
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- `vfk` is now the advertised command: `--help`, run hints (`Run: vfk logs <check>`), error hints, the README, the docs and the agent skill use it. `verifika` keeps working and is identical.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- README: a copy-paste prompt that has a coding agent install Verifika, write and validate a config, and install the skill.
|
|
14
|
+
|
|
5
15
|
## [0.0.1] - 2026-10-12
|
|
6
16
|
|
|
7
17
|
First public release.
|
|
@@ -27,4 +37,5 @@ First public release.
|
|
|
27
37
|
- A process that deliberately detaches from the check (on Linux and macOS: leaves the process group, for example via `setsid`; on Windows: breaks away from the job with an exited intermediate parent) is not tracked unless it keeps the check's output open, in which case the check is reported as `error`.
|
|
28
38
|
- On Windows, confirming cleanup queries the process table with PowerShell after each check, which costs roughly 0.5–3 s per check.
|
|
29
39
|
|
|
40
|
+
[0.0.2]: https://github.com/alexportelli12/verifika/releases/tag/v0.0.2
|
|
30
41
|
[0.0.1]: https://github.com/alexportelli12/verifika/releases/tag/v0.0.1
|
package/README.md
CHANGED
|
@@ -4,56 +4,91 @@
|
|
|
4
4
|
[](https://github.com/alexportelli12/verifika/releases/latest)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
Run the checks your
|
|
7
|
+
**Run only the checks your change needs. Get one line back when they pass.**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Every repository has a verification gate: format, lint, typecheck, tests, build. Using it well is harder than it looks:
|
|
10
|
+
|
|
11
|
+
- **Running everything is slow.** A one-line fix waits minutes for checks it cannot affect, so people (and agents) skip the gate or batch changes until the end.
|
|
12
|
+
- **Picking checks by hand is unreliable.** It is easy to forget the one that breaks, and "it passed" stops meaning much.
|
|
13
|
+
- **Failures are buried in noise.** A test runner can print tens of thousands of lines to report one failed assertion. A coding agent pays for every line in tokens and context, and often never reaches the line that matters.
|
|
14
|
+
|
|
15
|
+
Verifika fixes this with one config file and one command. You list your checks in `verifika.config.json`, with the files each one covers. Then `vfk` runs only the checks your changes affect, CI runs all of them, and the output says exactly what failed:
|
|
10
16
|
|
|
11
17
|
```text
|
|
12
|
-
$
|
|
18
|
+
$ vfk
|
|
13
19
|
PASS 3/3 (4.1s) selective: 2 files changed since HEAD (a1b2c3d); 2 skipped
|
|
14
20
|
|
|
15
|
-
$
|
|
21
|
+
$ vfk --all
|
|
16
22
|
FAIL 4/5 (12s) full run (--all)
|
|
17
23
|
typecheck: exit 2
|
|
18
24
|
src/cart.ts(14,7): error TS2322: Type 'string' is not assignable to type 'number'.
|
|
19
|
-
Run:
|
|
25
|
+
Run: vfk logs typecheck
|
|
20
26
|
```
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
## Why Verifika
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
- **Small output, especially for agents.** On a real Angular project, one failing test produced 94,900 bytes of output with the project's previous verify script (~23,700 tokens). Verifika reported the same failure in 369 bytes (~90 tokens): the test name, the assertion and the totals. Full logs stay on disk until you ask for them.
|
|
31
|
+
- **Less waiting.** Locally, only affected checks run: in a 25-check monorepo, a typical edit ran 1–13 of them. Checks that share no build outputs can also run in parallel; on that Angular project, four at a time cut the full gate from 95.5 s to 61.7 s. [Measurements](docs/benchmarks.md).
|
|
32
|
+
- **Deterministic and conservative.** Selection comes from your config, file globs, dependencies and git; no heuristics, no LLM. When the scope of a change is unclear, Verifika runs everything or fails loudly. It never quietly skips a check, and in CI it runs the full suite unless you explicitly ask for a selective run.
|
|
33
|
+
- **Trustworthy results.** Timeouts, fail-fast, correct exit codes and signal handling. A check only passes once its whole process tree has exited. Tested on Linux, macOS and Windows.
|
|
34
|
+
- **Built for humans and coding agents alike.** Live progress on a terminal, one line in agent sessions, JSON for scripts. It ships an [agent skill](skills/verifika/SKILL.md) for Claude Code, Codex, OpenCode and others.
|
|
35
|
+
- **Small.** One JSON file, one runtime dependency, no daemon, no cache to invalidate.
|
|
25
36
|
|
|
26
|
-
|
|
27
|
-
- **Token-efficient.** Agents get one line on success and a bounded failure preview on failure. Full logs stay on disk until asked for.
|
|
28
|
-
- **Fast.** Selective runs skip unaffected checks, and independent checks can run in parallel once you opt in (`defaults.concurrency`). One small runtime dependency.
|
|
29
|
-
- **Reliable.** Timeouts, fail-fast, process cleanup, correct exit codes and signal handling, tested on Linux, macOS and Windows.
|
|
37
|
+
_Verifika_ is Maltese for "verification". The command is `vfk`, short for `verifika`; both are installed and identical.
|
|
30
38
|
|
|
31
|
-
##
|
|
39
|
+
## Get started
|
|
32
40
|
|
|
33
41
|
Requires Node.js 22.13 or newer.
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
npm install --save-dev verifika
|
|
37
|
-
```
|
|
43
|
+
### With a coding agent
|
|
38
44
|
|
|
39
|
-
|
|
45
|
+
Paste this prompt into Claude Code, Codex, OpenCode or another coding agent, from your repository root. It installs Verifika, writes and validates a config for your project, and reports what it found.
|
|
40
46
|
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
```text
|
|
48
|
+
Set up Verifika (https://github.com/alexportelli12/verifika) in this repository.
|
|
49
|
+
|
|
50
|
+
1. Check that Node.js is 22.13 or newer, and install the project's dependencies if
|
|
51
|
+
they are missing. Install Verifika as a dev dependency with this repository's
|
|
52
|
+
package manager (npm install --save-dev verifika, or the pnpm/yarn equivalent).
|
|
53
|
+
It provides the `vfk` command.
|
|
54
|
+
2. Run `npx vfk init` to create verifika.config.json, then refine it by reading
|
|
55
|
+
package.json, the CI workflows and the tool configs:
|
|
56
|
+
- One check per quality gate the project actually has (such as format, lint,
|
|
57
|
+
typecheck, unit tests, build). Do not invent checks for tools it does not use,
|
|
58
|
+
or add a check that another one already fully covers. Every command must be
|
|
59
|
+
non-interactive and exit on its own: no watch mode, no prompts, no dev servers.
|
|
60
|
+
- Give each check `paths` globs for the files that can affect it, so local runs
|
|
61
|
+
select only what a change needs. If unsure, leave `paths` out: the check then
|
|
62
|
+
runs on every change.
|
|
63
|
+
- Add `dependsOn` where one check needs another's output (for example e2e after build).
|
|
64
|
+
- Keep concurrency at 1 unless the checks clearly share no build outputs.
|
|
65
|
+
- If package.json has no "verify" script, add "verify": "vfk --all".
|
|
66
|
+
Reference: https://github.com/alexportelli12/verifika/blob/main/docs/configuration.md
|
|
67
|
+
3. Validate the config:
|
|
68
|
+
- Run `npx vfk --all`. If a check fails, decide whether the config is wrong (fix it)
|
|
69
|
+
or the project already fails that check (report it; do not fix it).
|
|
70
|
+
- Run `npx vfk plan`. Until this setup is committed, the changed package.json and
|
|
71
|
+
lockfile select every check; that is expected. Explain which checks a typical
|
|
72
|
+
source edit and a documentation-only edit would select once it is committed.
|
|
73
|
+
4. Install the agent skill: copy node_modules/verifika/skills/verifika into this
|
|
74
|
+
agent's skills directory (see
|
|
75
|
+
https://github.com/alexportelli12/verifika/blob/main/docs/agents.md).
|
|
76
|
+
|
|
77
|
+
Do not change source code or existing scripts to make checks pass, and do not commit.
|
|
78
|
+
Finish with: the checks you configured and why, the --all result, the expected
|
|
79
|
+
selection for those two edits, and any existing failures you found.
|
|
44
80
|
```
|
|
45
81
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## Quick start
|
|
82
|
+
Review the config it writes before committing it: the commands in it run on every verification.
|
|
49
83
|
|
|
50
|
-
|
|
84
|
+
### By hand
|
|
51
85
|
|
|
52
86
|
```sh
|
|
53
|
-
|
|
87
|
+
npm install --save-dev verifika
|
|
88
|
+
npx vfk init # creates verifika.config.json from your package.json scripts
|
|
54
89
|
```
|
|
55
90
|
|
|
56
|
-
|
|
91
|
+
`init` only maps conventional script names (`lint`, `test`, `build`, ...) and leaves every check unfiltered, so open the file and give each check `paths`:
|
|
57
92
|
|
|
58
93
|
```json
|
|
59
94
|
{
|
|
@@ -72,35 +107,35 @@ Or write `verifika.config.json` yourself:
|
|
|
72
107
|
}
|
|
73
108
|
```
|
|
74
109
|
|
|
75
|
-
If your repository checks the formatting of every file (for example `prettier --check .`), format the new `verifika.config.json` too.
|
|
76
|
-
|
|
77
|
-
Then:
|
|
110
|
+
If your repository checks the formatting of every file (for example `prettier --check .`), format the new `verifika.config.json` too. Then:
|
|
78
111
|
|
|
79
112
|
```sh
|
|
80
|
-
npx
|
|
81
|
-
npx
|
|
82
|
-
npx
|
|
113
|
+
npx vfk plan # which checks would run for your changes, and why
|
|
114
|
+
npx vfk # run them
|
|
115
|
+
npx vfk --all # run everything (do this before you push)
|
|
83
116
|
```
|
|
84
117
|
|
|
85
118
|
Add a script so everyone runs the same full gate:
|
|
86
119
|
|
|
87
120
|
```json
|
|
88
|
-
{ "scripts": { "verify": "
|
|
121
|
+
{ "scripts": { "verify": "vfk --all" } }
|
|
89
122
|
```
|
|
90
123
|
|
|
124
|
+
Run logs go to `.verifika/`, which ignores itself in git, so you do not need to edit `.gitignore`. To install globally instead, run `npm install --global verifika`.
|
|
125
|
+
|
|
91
126
|
## How checks are selected
|
|
92
127
|
|
|
93
|
-
| Situation
|
|
94
|
-
|
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| A changed file matches `invalidateAll`
|
|
101
|
-
| Git unavailable, no commits, unknown base
|
|
128
|
+
| Situation | What runs |
|
|
129
|
+
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
130
|
+
| `vfk` locally | Checks whose `paths` match files changed since `changes.base` (default `HEAD`: your uncommitted and untracked work) |
|
|
131
|
+
| `vfk` in CI (`CI` or a known CI variable) | Everything; only `--changed`/`--changed-since` on the command line can narrow it |
|
|
132
|
+
| `vfk --all` | Everything |
|
|
133
|
+
| `vfk --check lint` | `lint` and its dependencies |
|
|
134
|
+
| `vfk --changed-since origin/main` | Checks matching files changed since `merge-base(origin/main, HEAD)`, plus uncommitted and untracked files |
|
|
135
|
+
| A changed file matches `invalidateAll` | Everything |
|
|
136
|
+
| Git unavailable, no commits, unknown base | Everything, with the reason printed (or an error, when you asked for `--changed`/`--changed-since` explicitly) |
|
|
102
137
|
|
|
103
|
-
A check without `paths` runs whenever any file changed; `"always": true` runs it even when nothing changed. Selecting a check also selects its `dependsOn` checks. `
|
|
138
|
+
A check without `paths` runs whenever any file changed; `"always": true` runs it even when nothing changed. Selecting a check also selects its `dependsOn` checks. `vfk plan` shows every decision.
|
|
104
139
|
|
|
105
140
|
## Output modes
|
|
106
141
|
|
|
@@ -120,10 +155,10 @@ Exit codes: `0` passed (or nothing to verify), `1` verification failed, `2` usag
|
|
|
120
155
|
Every run stores each check's combined stdout/stderr under `.verifika/runs/<run-id>/`. The directory ignores itself in git, and only the last 10 runs are kept (`defaults.keepRuns`).
|
|
121
156
|
|
|
122
157
|
```sh
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
158
|
+
vfk logs # latest run: statuses and log paths
|
|
159
|
+
vfk logs typecheck # full log of one check
|
|
160
|
+
vfk logs --failed # logs of every failed check
|
|
161
|
+
vfk logs test --tail 50 # last 50 lines
|
|
127
162
|
```
|
|
128
163
|
|
|
129
164
|
Logs contain whatever your commands print, which can include secrets. They never leave your machine; keep `.verifika/` out of anything you publish.
|
package/dist/config.js
CHANGED
|
@@ -30,7 +30,7 @@ export function findConfigFile(cwd, explicit) {
|
|
|
30
30
|
return candidate;
|
|
31
31
|
const parent = path.dirname(directory);
|
|
32
32
|
if (parent === directory) {
|
|
33
|
-
throw new VerifikaError(`no ${CONFIG_FILE} found in ${cwd} or any parent directory`, "Create one with:
|
|
33
|
+
throw new VerifikaError(`no ${CONFIG_FILE} found in ${cwd} or any parent directory`, "Create one with: vfk init");
|
|
34
34
|
}
|
|
35
35
|
directory = parent;
|
|
36
36
|
}
|
package/dist/main.js
CHANGED
|
@@ -16,15 +16,14 @@ import { OUTPUT_MODES } from "./reporters/reporter.js";
|
|
|
16
16
|
import { runVerification } from "./runner.js";
|
|
17
17
|
const COMMANDS = ["run", "plan", "logs", "init", "help"];
|
|
18
18
|
const DEFAULT_PREVIEW_LINES = 10;
|
|
19
|
-
export const HELP = `
|
|
19
|
+
export const HELP = `vfk - run the checks your changes need, with minimal output
|
|
20
|
+
(vfk is short for verifika; the two commands are identical)
|
|
20
21
|
|
|
21
22
|
Usage:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
vfk is a shorthand for verifika: vfk plan, vfk --all, ...
|
|
23
|
+
vfk [run] [options] Verify (selective locally, full in CI)
|
|
24
|
+
vfk plan [options] Show which checks would run and why
|
|
25
|
+
vfk logs [check...] Show logs from the latest run
|
|
26
|
+
vfk init [--force] Create verifika.config.json from package.json scripts
|
|
28
27
|
|
|
29
28
|
Selection (run, plan):
|
|
30
29
|
--all Run every check
|
|
@@ -192,7 +191,7 @@ async function runInit(io, values) {
|
|
|
192
191
|
const root = values.config ? path.dirname(path.resolve(io.cwd, values.config)) : io.cwd;
|
|
193
192
|
const { file, checks } = await initConfig(root, Boolean(values.force));
|
|
194
193
|
io.out(`Created ${path.relative(io.cwd, file) || file} with checks: ${checks.join(", ")}\n`);
|
|
195
|
-
io.out('Review the commands, add "paths" to checks that only some files affect, format the file if your repository checks formatting, then run:
|
|
194
|
+
io.out('Review the commands, add "paths" to checks that only some files affect, format the file if your repository checks formatting, then run: vfk plan\n');
|
|
196
195
|
return ExitCode.Passed;
|
|
197
196
|
}
|
|
198
197
|
function parse(args, command) {
|
|
@@ -208,7 +207,7 @@ function parse(args, command) {
|
|
|
208
207
|
}
|
|
209
208
|
catch (error) {
|
|
210
209
|
const message = error.message.replace(/\. To specify a positional argument.*$/s, "");
|
|
211
|
-
throw new VerifikaError(message, `Run "
|
|
210
|
+
throw new VerifikaError(message, `Run "vfk --help" for usage.`);
|
|
212
211
|
}
|
|
213
212
|
}
|
|
214
213
|
function integerOption(value, flag, min) {
|
package/dist/reporters/agent.js
CHANGED
|
@@ -13,7 +13,7 @@ export function renderAgent(result) {
|
|
|
13
13
|
`${verdict(result)} ${summary.passed}/${summary.selected} (${duration(result.durationMs)}) ${selectionLabel(result.selection, summary.skipped)}`,
|
|
14
14
|
];
|
|
15
15
|
if (summary.selected === 0)
|
|
16
|
-
lines.push("Nothing to verify for these changes. Full run:
|
|
16
|
+
lines.push("Nothing to verify for these changes. Full run: vfk --all");
|
|
17
17
|
let previewed = 0;
|
|
18
18
|
for (const check of problems(result)) {
|
|
19
19
|
lines.push(`${check.name}: ${describeProblem(check)}`);
|
package/dist/reporters/human.js
CHANGED
|
@@ -30,7 +30,7 @@ export function humanReporter(output, style, options = {}) {
|
|
|
30
30
|
const skipped = selection.checks.length - selected.length;
|
|
31
31
|
output.out(`${style.bold("verifika")} ${selectionLabel(selection, skipped)}\n`);
|
|
32
32
|
if (selected.length === 0) {
|
|
33
|
-
output.out(style.dim("Nothing to verify for these changes. Full run:
|
|
33
|
+
output.out(style.dim("Nothing to verify for these changes. Full run: vfk --all\n"));
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
if (skipped > 0) {
|
package/dist/reporters/plan.js
CHANGED
|
@@ -16,7 +16,7 @@ export function renderPlan(selection, maxFiles) {
|
|
|
16
16
|
for (const file of files.slice(0, maxFiles))
|
|
17
17
|
lines.push(` ${STATUS_LETTER[file.status]} ${file.path}`);
|
|
18
18
|
if (files.length > maxFiles)
|
|
19
|
-
lines.push(` … ${files.length - maxFiles} more (
|
|
19
|
+
lines.push(` … ${files.length - maxFiles} more (vfk plan --mode json lists all)`);
|
|
20
20
|
}
|
|
21
21
|
lines.push("Checks:");
|
|
22
22
|
const width = Math.max(...selection.checks.map((check) => check.name.length));
|
|
@@ -28,7 +28,7 @@ export function logsHint(result) {
|
|
|
28
28
|
const withLogs = problems(result).filter((check) => isFailureStatus(check.status) && check.log);
|
|
29
29
|
if (withLogs.length === 0)
|
|
30
30
|
return null;
|
|
31
|
-
const command = withLogs.length === 1 ? `
|
|
31
|
+
const command = withLogs.length === 1 ? `vfk logs ${withLogs[0]?.name}` : "vfk logs --failed";
|
|
32
32
|
return result.latest ? command : `${command} --run ${result.runId}`;
|
|
33
33
|
}
|
|
34
34
|
export function verdict(result) {
|
package/dist/runs.js
CHANGED
|
@@ -158,7 +158,7 @@ function isProcessAlive(pid) {
|
|
|
158
158
|
export async function readRun(root, runId) {
|
|
159
159
|
const id = runId ?? (await readLatest(root));
|
|
160
160
|
if (id === null) {
|
|
161
|
-
throw new VerifikaError("no verification runs recorded yet", "Run `
|
|
161
|
+
throw new VerifikaError("no verification runs recorded yet", "Run `vfk` first.");
|
|
162
162
|
}
|
|
163
163
|
if (!RUN_ID_PATTERN.test(id))
|
|
164
164
|
throw new VerifikaError(`invalid run id "${id}"`);
|
package/package.json
CHANGED
package/skills/verifika/SKILL.md
CHANGED
|
@@ -10,37 +10,37 @@ Verifika runs a repository's configured checks (lint, typecheck, tests, build, .
|
|
|
10
10
|
|
|
11
11
|
## Is it set up here?
|
|
12
12
|
|
|
13
|
-
Look for `verifika.config.json` in the repository root (or the package directory in a monorepo). Its `checks` object lists every check name and command. Run the CLI the way the repository does: `npx
|
|
13
|
+
Look for `verifika.config.json` in the repository root (or the package directory in a monorepo). Its `checks` object lists every check name and command. Run the CLI the way the repository does: `npx vfk` when it is a devDependency, `vfk` when installed globally, or a documented wrapper script such as `npm run verify`. `vfk` is short for `verifika`; both commands are identical. The examples below write `vfk`.
|
|
14
14
|
|
|
15
15
|
## Workflow
|
|
16
16
|
|
|
17
17
|
1. **While implementing**, after a meaningful change:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
|
|
20
|
+
vfk
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Runs only the checks matching files changed since the configured `changes.base` (by default `HEAD`: your uncommitted and untracked changes). If the environment sets `CI` (some agent sandboxes do), plain `
|
|
23
|
+
Runs only the checks matching files changed since the configured `changes.base` (by default `HEAD`: your uncommitted and untracked changes). If the environment sets `CI` (some agent sandboxes do), plain `vfk` runs everything; use `vfk --changed` for a selective run there.
|
|
24
24
|
|
|
25
25
|
2. **To see what would run and why**, without running anything:
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
|
|
28
|
+
vfk plan
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
3. **To rerun one check** while fixing it (its dependencies run too):
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
|
-
|
|
34
|
+
vfk --check typecheck
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
4. **Before claiming the task is complete, committing, or opening a pull request**, always run the full suite:
|
|
38
38
|
|
|
39
39
|
```sh
|
|
40
|
-
|
|
40
|
+
vfk --all
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
5. **To verify a whole branch** rather than just uncommitted work: `
|
|
43
|
+
5. **To verify a whole branch** rather than just uncommitted work: `vfk --changed-since origin/main` (compares against the merge-base, plus uncommitted and untracked files). Useful for review; it does not replace `vfk --all` before delivery.
|
|
44
44
|
|
|
45
45
|
Wait for the command to finish. Long suites can take minutes; allow enough time and never report a result you have not seen.
|
|
46
46
|
|
|
@@ -75,18 +75,18 @@ Check statuses: `passed`, `failed`, `timed_out`, `error` (could not start, or le
|
|
|
75
75
|
## When verification fails
|
|
76
76
|
|
|
77
77
|
1. Read the failing check names and previews first; they usually identify the problem.
|
|
78
|
-
2. If you need more, read only the failing logs: `
|
|
79
|
-
3. Fix the root cause in the code. Then rerun the failed check (`
|
|
78
|
+
2. If you need more, read only the failing logs: `vfk logs typecheck`, or `vfk logs --failed` for all of them. For long logs use `vfk logs typecheck --tail 80`.
|
|
79
|
+
3. Fix the root cause in the code. Then rerun the failed check (`vfk --check typecheck`), and finish with `vfk --all`.
|
|
80
80
|
4. `blocked` checks never ran; fix the dependency they name and rerun.
|
|
81
81
|
5. If a failure is unrelated to your change (for example it also fails on the base branch), report it with evidence instead of working around it.
|
|
82
82
|
|
|
83
83
|
## Rules
|
|
84
84
|
|
|
85
85
|
- Do not claim success unless you saw `PASS` and exit code 0 from a finished run. Say what ran: "selective verification passed (2 checks)" is not "all checks pass".
|
|
86
|
-
- A selective `PASS` only covers the checks it selected. Skipped checks were not verified. Run `
|
|
86
|
+
- A selective `PASS` only covers the checks it selected. Skipped checks were not verified. Run `vfk --all` before delivery, every time.
|
|
87
87
|
- `PASS 0/0` means nothing matched your changes and nothing was verified.
|
|
88
|
-
- Do not read logs of passing checks or use `
|
|
88
|
+
- Do not read logs of passing checks or use `vfk logs` after a `PASS`; there is nothing to diagnose.
|
|
89
89
|
- Do not edit `verifika.config.json`, remove checks, narrow `paths`, raise timeouts, or pass `--check` to dodge a failing check, unless the user asked for that change.
|
|
90
90
|
- Exit code 2 is not a code failure: read the message (bad flag, unknown check, invalid config, missing git ref) and fix the invocation, or report it.
|
|
91
91
|
- Do not raise concurrency (`-j`) beyond what the config sets: the project chose it, and checks that share build outputs fail spuriously when run together.
|
|
92
|
-
- Prefer the default agent output. Use `
|
|
92
|
+
- Prefer the default agent output. Use `vfk --mode json` only when a script needs structured results; avoid `vfk --mode human` in agent sessions.
|