Skip to content

slopcheck: add checkError flag to PackageVerdict for registry failures #37

@orioltf

Description

@orioltf

Problem

In lib/slopcheck.mjs, classifyPackages() catches registry errors and returns { name, assumed: true }. This means a network timeout or DNS failure makes all packages appear ASSUMED — the caller cannot distinguish a genuinely unknown package from a transient connectivity failure.

Example: if the npm registry is unreachable during CI, every new package gets flagged as assumed-slop even though they are legitimate packages that simply couldn't be verified.

Suggested fix

Add an optional checkError field to PackageVerdict:

```ts
type PackageVerdict = {
name: string
assumed: boolean
checkError?: boolean // true when the registry call itself failed
}
```

Populate it in the catch block:

```js
} catch (err) {
process.stderr.write([unic-archon-dlc] Warning: registry check failed for '${name}' …\n)
return { name, assumed: true, checkError: true }
}
```

Callers can then distinguish:

  • assumed: true, checkError: undefined → package not found in registry (likely slop)
  • assumed: true, checkError: true → registry unreachable (verdict is unreliable)

Affected file

apps/claude-code/unic-archon-dlc/lib/slopcheck.mjsclassifyPackages() catch block (line ~52)

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