Skip to content

Keep a note with each baseline mark and list the marks by reason - #57

Merged
tauanbinato merged 2 commits into
mainfrom
feat/53-mark-notes
Oct 4, 2026
Merged

tauanbinato merged 2 commits into
mainfrom
feat/53-mark-notes

Conversation

@tauanbinato

@tauanbinato tauanbinato commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Closes #53
Closes #54

  • jevgate baseline mark REASON --note TEXT TARGET... keeps a one-line note (at most 200 characters, no line breaks) with the reason, such as the issue a later finding will be fixed in. Notes survive baseline rewrites, --merge and marking again without --note; --note "" removes one. The hook names the note in the person's list of dismissals at the end of a turn.
  • Baseline entries now also record unit, the unit a finding names, so the listing can print it. Both fields are optional: baselines without them load and are written back unchanged.
  • jevgate baseline list [--reason intended|later|wrong]... [--rule RULE]... [--format text|md|json] lists accepted findings by path, then line, with reason, rule, unit, fingerprint prefix (8 characters, a valid mark target) and note. md prints a checklist to paste into a cleanup issue; json carries the full fingerprint and message.
$ jevgate baseline mark later --note "#192" src/a.ts:3
Marked 1 finding as later
$ jevgate baseline list --reason later
src/a.ts:3   later  maintainability/shared-logic  cccccccc  `total` (src/a.ts:3) and `sum` (src/b.ts:40)  note: #192
src/b.ts:40  later  maintainability/shared-logic  bbbbbbbb
$ jevgate baseline list --reason later --format md
- [ ] `src/a.ts:3` maintainability/shared-logic `total` (src/a.ts:3) and `sum` (src/b.ts:40) (later, `cccccccc`): #192
- [ ] `src/b.ts:40` maintainability/shared-logic (later, `bbbbbbbb`)
$ jevgate baseline list --reason intended
No accepted findings match.

Added scope (user, 2026-10-03): the instructions jevgate init --agent writes (src/setup/instructions.md) and the plugin's findings skill tell agents to give a later mark the issue that will fix it with --note "#123", and name jevgate baseline list --reason later --format md for exporting those marks.

jevgate.schema.json describes jevgate.toml only; no schema covers the baseline, so it is unchanged.

How it was checked

  • tests/cli/baseline.rs: text, md and json output, ordering by path then line, filters by reason and rule, a filter that matches nothing, an unknown rule, an empty baseline, and an old baseline (no unit, no note) that lists and whose unmarked entries are written back with the same fields; a note round-trips through the file and a two-line note is refused without touching the baseline.

  • src/tests/gating.rs: a note survives a rewrite, --merge after checks that did and did not cover the file, re-marking without a note, and is cleared by an empty one; the note's length and line rules.

  • src/hook/tests/mod.rs: a dismissal's note reaches the person's message at the end of the turn.

  • cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings and cargo test --locked pass (886 unit, 82 CLI, 3 lint-policy tests)

  • cargo +1.90.0 check --locked (1.90 is not installed on this machine; no new syntax; CI checks it)

  • CHANGELOG.md has lines under Unreleased

JevGate gate (jevgate check --base origin/main --rule all --include-tests, 0.33.0): passed. Fixed: the hook's three "first N, then K more" lists now share first_named, and the baseline's two sort-and-dedup copies share in_file_order; the text listing builds its columns once. Dismissed one at a time with baseline mark --note:

  • src/baseline.rs:18 file-organization, wrong: every function reads or writes jevgate-baseline.json (marked wrong on main before).
  • src/command.rs:14 file-organization, wrong: one function per command (marked wrong on main before; the old entry got the same note).
  • src/tests/gating.rs:5 file-organization, intended: the gate and the baseline it reads are tested together, as the module doc says.
  • src/hook/text.rs:98 shared-logic, wrong: each formats a different line (an undecided unit, a dismissal, a finding).
  • src/hook/text.rs:181 shared-logic, wrong: a singular or plural word chosen by a count; the words differ at each site.
  • src/baseline.rs:275 shared-logic, wrong: a filter over different collections with different tests.

`baseline mark REASON --note TEXT TARGET...` stores a one-line note of at
most 200 characters with the reason, such as the issue a `later` finding
will be fixed in. Notes survive rewrites, `--merge` and marking again
without one; an empty note removes it. The hook names them in the
person's list of dismissals. Baseline entries also record the unit a
finding names. Baselines without notes or units load unchanged.

`baseline list [--reason ...] [--rule ...] [--format text|md|json]`
prints accepted findings by path, then line, with their reason, rule,
unit, fingerprint prefix and note; `md` prints a checklist for a cleanup
issue.

The hook's lists of findings, guards and unreviewed files share one
helper, and the baseline keeps one sort for its entries.
@tauanbinato

Copy link
Copy Markdown
Contributor Author

Decisions (2026-10-03)

The user accepts the design as built:

  • a note is one line of at most 200 characters, is kept on re-marking, and --note "" clears it;
  • the new unit field is accepted, even though the next full rewrite of the baseline will show one large diff;
  • notes appear in baseline list and in the hook's dismissal message, not in stats.

Added scope: update JevGate's agent instructions (the init --agent text and the plugin skill) so that later marks use --note "#issue".

The instructions `jevgate init --agent` writes and the plugin's findings skill give a `later` mark the issue that will fix it with `--note`, and name `baseline list --reason later --format md` for exporting those marks.
@tauanbinato
tauanbinato marked this pull request as ready for review October 4, 2026 02:19
@tauanbinato
tauanbinato merged commit 71c5e88 into main Oct 4, 2026
12 checks passed
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.

List baseline marks by reason, as text or a Markdown checklist Let a baseline mark carry a short note or issue link

1 participant