Skip to content

fix(cli): credit inline useLogger().set() and grade an empty scan as unscored - #822

Merged
HugoRCD merged 1 commit into
mainfrom
EVL-535/map-logger-set-and-empty-score
Oct 10, 2026
Merged

HugoRCD merged 1 commit into
mainfrom
EVL-535/map-logger-set-and-empty-score

Conversation

@evlogai

@evlogai evlogai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Fixes two evlog map results reported in EVL-535.

1. Inline useLogger(event).set() was reported as missing log.set(). The call's chain hangs on the useLogger(event) call, which has no root identifier, so loggerCalls('set') never credited it. CallFact now carries the factory name (factory), and a call counts when that factory resolves to evlog. A local useLogger stub is still not credited.

2. A project with no entry points scored a free 100, "excellent", and passed --min-score. It is now graded unscored ("nothing to scan"). The numeric score is unchanged (Option A from the issue). --min-score cannot pass an unscored run, so it exits 1. The gate is one helper, passesMinScore, shared by the exit code, the human gate line, and the GitHub annotation.

Before/after was reproduced with the built CLI from this branch against small fixtures.

Before (evlog 0.9.0 from npm, the build I could run first):

inline/server/api/vip.get.ts   context: fail ("no log.set()"), score 85
inline project                 global score 68
empty project                  score 100, grade excellent
empty project --min-score 80   exit 0

After (built from e9f0210):

inline/server/api/vip.get.ts   context: pass
inline project                 global score 83, grade good
                               (checkout/missing still fails audit: sensitive route, no log.audit(), correct)
empty project                  grade unscored
empty project --min-score 80   GATE  nothing to scan, so --min-score 80 cannot be met, exit code 1

Verification

  • Regression tests written first and run red: inline set in rules.test.ts, passesMinScore in score.test.ts, empty-project grade and gate in map.command.test.ts.
  • pnpm run lint: passes.
  • tsc --noEmit for packages/cli: passes.
  • vitest run in packages/cli: 31 files pass.
  • pnpm run build in packages/cli: passes.

Caveats

  • The issue reports @evlog/cli@9a6ed6e. I reproduced on 0.9.0, so exact before-numbers may differ on that build.
  • Inline useLogger(event).audit(...) now goes through the same credit path. I did not add a dedicated test for it.
  • No documentation page was changed. The grade list is in the CLI output and telemetry field list only.

Refs EVL-535

ELI5

evlog map had two wrong answers. First, it missed a logger call when the code wrote the call directly after useLogger(event), without storing the logger in a variable first. Now it counts those calls. Second, a project with nothing to check got a perfect score and passed the CI gate. Now it says "nothing to scan" and the gate fails, because there is nothing to pass.

…unscored

evlog map missed log.set() when it was called straight on the factory call, e.g. useLogger(event).set({ … }), because the chain has no root identifier. Those calls are now credited when the factory resolves to evlog.

A project with no entry points to score reported a free 100 graded excellent, and --min-score passed it. It is now graded unscored (nothing to scan), and --min-score exits 1 in that case. The numeric score is unchanged.

Regression tests come first in the rules, score and command suites. Changeset: @evlog/cli patch.
@evlogai
evlogai Bot requested a review from HugoRCD October 10, 2026 22:10
@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
evi Ready Ready Preview Oct 10, 2026 10:12pm UTC
evlog-docs Ready Ready Preview, v0 Oct 10, 2026 10:12pm UTC
evlog-render-lab Ready Ready Preview Oct 10, 2026 10:12pm UTC
evlog-telemetry Ready Ready Preview Oct 10, 2026 10:12pm UTC
just-use-evlog Ready Ready Preview Oct 10, 2026 10:12pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c92d241-f55a-433e-87d8-5dea57116724

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@pkg-pr-new

pkg-pr-new Bot commented Oct 10, 2026

Copy link
Copy Markdown
@evlog/cli

npm i https://pkg.pr.new/@evlog/cli@822

evlog

npm i https://pkg.pr.new/evlog@822

@evlog/nuxthub

npm i https://pkg.pr.new/@evlog/nuxthub@822

@evlog/signals

npm i https://pkg.pr.new/@evlog/signals@822

@evlog/telemetry

npm i https://pkg.pr.new/@evlog/telemetry@822

commit: e9f0210

@HugoRCD
HugoRCD merged commit 2d7503a into main Oct 10, 2026
19 checks passed
@HugoRCD
HugoRCD deleted the EVL-535/map-logger-set-and-empty-score branch October 10, 2026 22:12

This branch was successfully deployed

5 active deployments
Preview – evlog-telemetry — e9f02108 Deployed Oct 10, 2026 by vercel[bot]
Preview – evi — e9f02108 Deployed Oct 10, 2026 by vercel[bot]
Preview – evlog-docs — e9f02108 Deployed Oct 10, 2026 by vercel[bot]
Preview – evlog-render-lab — e9f02108 Deployed Oct 10, 2026 by vercel[bot]
Preview – just-use-evlog — e9f02108 Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant