Skip to content

jev-grep 0.3.0

Choose a tag to compare

@keltokhy keltokhy released this 22 Sep 06:24
· 18 commits to main since this release
  • Move transport, configuration, the answer cache and metering to the shared jevkit-runtime 0.2.
    Answers are keyed by provider, endpoint and model and stored with who answered them; the cache
    written by earlier versions is reset on first use and re-asked. A 200 response without answers is
    an error rather than a retry, and a stored answer that fails validation is an error rather than a hit.
  • Label context without a commit id as the function in the working tree, including in the judge's
    question. Only the hunk's new-side lines at their given position are checked; surrounding code
    may have changed. Plain diff and fallback requests retain their existing questions and cache keys.
  • Report macro-headed C bodies that parse as a call followed by a bare block, and count changes
    inside them as syntax_error under -W. Skipped C diagnostics give the whole covered line range
    instead of a function name that may belong to a preceding prototype.
  • Preserve text hunks in commit streams ending in a rename, mode-only change or empty-file change;
    trim trailing separators and mail signatures without shifting input locations. Skip annotated-tag
    preambles, and decode quoted paths containing raw UTF-8 as well as octal byte escapes.
  • Add C to --functions through Tree-sitter in the [code] extra: --lang c, inferred from .c
    and .h. Functions the parser read without error are emitted with adjacent comments and exact
    spans. Functions and regions it cannot read, usually around a macro or #if, are skipped and
    reported by line range in one error per file rather than failing the file or guessing at boundaries.
  • Read git log -p, git show and git format-patch streams with --diff, one commit at a time.
    These were previously rejected as content outside a hunk. Hunks carry the commit id as
    unit.commit (null for a plain patch), export IDs include it, and a commit whose patch cannot be
    read no longer hides later commits.
  • Add -W/--function-context and --repo for --diff: judge each hunk with the Python, Go or C
    function that encloses it, read at the hunk's commit or from the working tree, while printing the
    hunk alone. Hunks that cannot be given a function are judged alone and counted by reason in
    stderr, unit.context, and --estimate --json. Oversized functions are shortened around the
    change and reported; oversized hunks still fail. --estimate prices the context and
    --emit-records shows it.
  • Count patch lines at line feeds only. A form feed or lone carriage return inside a source line
    previously made a valid patch fail.
  • Do not print Python SyntaxWarnings raised by the source files being read.
  • Confine -W to the repository. The allowed root is found without trusting repository config, so
    a repository that points core.worktree or GIT_WORK_TREE outside itself stops the run instead
    of reading outside files; working-tree paths are resolved with their symlinks and refused when
    they leave the repository; and Git runs with a fixed argument list and an environment that blocks
    promisor fetches, object replacement, and prompts. Treat --repo as a repository you trust.
  • Bound the source -W reads: a new-side file larger than 10 MiB is a counted source_too_large
    fallback, read neither from a commit nor the working tree, and a named pipe no longer blocks.
  • Trim git format-patch mails: read the patch after the last --- separator and stop at the --
    signature, so a message containing diff --git or a dash-led signature no longer voids the patch.
  • Recognize abbreviated commit ids down to four hex digits (git log --abbrev-commit).
  • Keep reading a stream after a commit with a malformed quoted path, and report skipped C before a
    file's functions so a match limit or quiet mode cannot end the run with it unreported.
  • Read a Python source file that begins with a byte-order mark instead of reporting a syntax error.
  • Leave two pre-existing diff-reader issues outside this change: CRLF-converted patches can retain
    \r in new_file and add spurious metadata-only errors; quoted paths with spaces can also add
    a spurious metadata-only error.