Skip to content

triage: the pip path scores higher than npm by running fewer probes #489

Closed

Description

@sandstream

The gap

triage prints one Health score: N/100 regardless of ecosystem, and the score is a flat penalty count:

# skills/triage/scripts/triage.py
score = max(0, 100 - 45 * len(self.criticals) - 12 * len(self.warnings))

So the number falls out of how many probes an ecosystem has, not out of how safe the package is. The npm and pip paths do not run the same probes:

check triage_npm triage_pip
not found / cannot verify ✅ critical ✅ critical
deprecated / yanked ✅ ✅ (yanked)
abandoned (no release in N days) ✅ ✅
no declared license — ✅
very new — limited track record ✅ warn ❌ absent
maintainer count (bus-factor / takeover) ✅ warn ❌ absent

Measured on three real packages against 6.6.3:

$ kit triage npm deepsec                → 88/100   ! single maintainer -- bus-factor / takeover risk
$ kit triage npm @deepseek-ai/dsh       → 88/100   ! package is very new (4 days) -- limited track record
$ kit triage pip opensandbox-server     → 100/100  (no warnings)

Both 88s exist only because the npm path could see something the pip path never looks for. Had opensandbox-server been a single-maintainer package four days old, the pip path would have said nothing and still printed 100/100.

So a perfect pip score means "nothing that was checked found anything" — but it is rendered in the same units as a score that ran more checks, next to it, in the same CLI. A reader comparing the two concludes the Python package is the safer one.

Confirmed still present on main at 6.6.5: triage_pip contains zero maintainer references and no newness check, while triage_npm has both.

Why this is kit's own rule inverted

kit check holds that lost coverage outranks a regression — a check that stopped running is unknown, not fixed, and gateStatus fails a didNotRun warn by default precisely so green means it actually ran. Here, coverage that never existed produces a higher number than coverage that ran and found something. Same family as #470: a verdict that reads stronger than its evidence.

Second, smaller half (same file)

triage_pip reports author: unknown for essentially every modern Python package:

rep.fact(f"triaged {ver}{tag}, {len(releases)} releases, author: {info.get('author') or 'unknown'}")

PyPI's info.author is null under PEP 621 (authors = [{name=…, email=…}]); the value lands in info.author_email. Measured:

author            null
author_email      "OpenSandbox Team <…@alibaba-inc.com>"

That attribution is also what settles a provenance question cheaply — it is how the org behind opensandbox-group/OpenSandbox was confirmed against a look-alike repo with an identical tagline.

Proposed

  1. Add newness and maintainer probes to triage_pip, or
  2. If PyPI genuinely cannot answer one of them, make the absence visible rather than free: report which probes did not run for this ecosystem, so a 100 with two probes skipped cannot be read as a 100 with all probes clean. Option 2 is the one that matches didNotRun semantics elsewhere in kit.
  3. Read info.author_email as a fallback for the attribution line.

A cross-ecosystem test asserting that the two paths run a comparable probe set — or that any shortfall is stated in the output — would keep this from drifting back.

Provenance

Found while researching a sandbox runtime and triaging its published package; the three scores above came from three unrelated research passes in the same week, which is what made the asymmetry visible.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions