Skip to content

TestRegistry_SyncIntegration fails instead of skipping without a network, and its escape hatch calls t.Fatalf where it means t.Skip #888

Open

Description

@David-Noble-at-work

What happens

cmd/internal/lorepackage/registry_test.go:171 clones
https://github.com/NobleFactor/devlore-registry.git in the ordinary test suite. The file carries no build tag,
so make test runs it. Without a usable network it hangs until the suite's own deadline:

panic: test timed out after 1m0s
	running tests:
		TestRegistry_SyncIntegration (1m0s)
FAIL	github.com/NobleFactor/devlore-cli/cmd/internal/lorepackage	60.585s

Observed 2026-09-13 on an aircraft, where a satellite link cannot finish the clone inside the budget. The whole
package fails, so make test is red for reasons that have nothing to do with the tree.

The escape hatch is written backwards

Two guards open the test, and both fail where they mean to skip:

if testing.Short() {
    t.Fatalf("requires full test mode: run without -short flag")
}

// Skip if no network
if os.Getenv("SKIP_NETWORK_TESTS") != "" {
    t.Fatalf("requires network access: unset SKIP_NETWORK_TESTS")
}

t.Fatalf marks the test failed; t.Skip marks it skipped and passes the package. As written, setting
SKIP_NETWORK_TESTS turns a hang into an immediate failure, and -short does the same, so there is no way to
run the suite without a network. The comment above the second guard says "Skip if no network", which is the
intent the code contradicts.

Evidence of completion

  • SKIP_NETWORK_TESTS skips the test rather than failing it, and -short does the same
  • A grep for t.Fatalf immediately after a testing.Short() or environment guard finds no other instance,
    or fixes what it finds
  • make test passes with no network reachable

Plan and design documents

Kind Document
Plan no branch has opened; the plan arrives with it

Activity

  1. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

    • severity: a Bug whose Severity is blank; a bug is Critical, High, Medium or Low
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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions