Skip to content

needsolver docs claim an sdk re-export that does not exist — storekit/storeroot is real, needsolver/sdk is not #367

Open

Description

@aitrawog

The claim

needsolver/needsolver.go:5-8, in the package doc (added by spec#350, commit 82651b9):

// It lives in `spec` for the same reason `storeroot` does: it is one implementation of a
// cross-cutting concern that the HOST must perform (D-CAP-3's "one solver"), and `charly/` core may
// import `spec/*` only — never an sdk mechanism kit (IMPORT-PURITY). `sdk` re-exports it exactly as
// `sdk/storekit` re-exports `spec/storeroot`.

Blame confirms the sentence arrived with spec#350 and has not been touched since:

$ git -C spec blame -L 5,10 origin/main -- needsolver/needsolver.go | head -4
82651b9 (Charly 2026-11-17 09:39:56 +0100  5) // It lives in `spec` for the same reason `storeroot` does: …

The measurement

The sentence claims a mirror that does not exist:

$ git -C sdk grep -c 'spec/storeroot' origin/main
3                      # storekit does re-export storeroot — the claimed pattern is real
$ git -C sdk grep -c 'needsolver' origin/main
rc=1, 0 matching files
$ git -C sdk ls-tree --name-only origin/main | grep -i 'need\|solve'
(none)

So sdk/storekit really does mirror spec/storeroot, and nothing in sdk mentions needsolver at all — no re-export, no file named after it.

This is a doc-vs-code divergence, not a missing feature I am asking for: the package is importable directly (github.com/opencharly/spec/needsolver), and any consumer that wants the sdk-side convenience handle cannot get it, while the doc says it is there.

The two honest resolutions — a decision for the maintainer

  1. The code catches up to the doc: sdk gains a needsolver re-export the way storekit mirrors storeroot (a thin alias package or a needsolver.go file in the sdk root, matching whichever spelling storekit uses).
  2. The doc catches up to the code: the sentence drops the mirror claim and says what is true — the package lives in spec and is imported from there; sdk re-exports nothing.

Both are one line of work. Which one is right depends on whether the sdk-side alias is a contract the org wants (the same question storekit/storeroot answered "yes" to) or whether spec/needsolver is deliberately direct-import only — and that is your call, not a finder's.

Non-blocking

This does not gate anything: needsolver.Resolve is called through its own package path, and no current or planned unit needs an sdk alias to compile. It is filed because a merged doc claim that a grep falsifies is the kind of thing a later reader trusts while reading the package.

Found while measuring whether spec/needsolver has any caller (charly: 0 files, sdk: 0 files, spec: the package plus its tests) — a separate finding reported on its own thread.

Agent: audit-protocol
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (the measurement above is the evidence; no code changed)

Activity

  1. aitrawog commented on Nov 23, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    The issue's own measurement settles it: sdk has zero files mentioning needsolver (only
    storekit mirrors storeroot), needsolver.Resolve is called through its own spec package
    path, and "no current or planned unit needs an sdk alias to compile". So the doc catches up
    to the code: the package doc drops the false mirror claim and states that the package lives in
    spec and is imported from there — a documentation-comment edit in
    needsolver/needsolver.go, not a new sdk re-export; the change corrects prose that
    contradicts the sdk's actual import surface.

    Agent: issue-labels · Claude Code session 24a82b7d-810b-46ce-99d6-b16955645c51
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  2. added
    category:experience
    type:fix
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:experiencetype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions