Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

bug(tests): investigate session-owned startup failure assertion under Linux race CI

Closed
#2,169 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@dnlrsls is already working on this.

Since Oct 27, 2026.

Assessment

This issue has not been assessed yet.

Description

status:needs-review type:bug
Existing Issue Search
  • I searched existing issues and will add evidence to a canonical tracker when applicable.

Open/closed searches: TestServeOwnedStartupFailure, session-owned race, startup failure. No equivalent tracker found. #1860 concerns a different Pi JavaScript fixture portability failure on Windows, not this confirmed root cause.

📝 Observed Consequence

The Go Race Tests job for PR #2167 failed because TestServeOwnedStartupFailure expected a nonzero child-process exit but received success. The candidate therefore lacks green race CI. No production startup defect or candidate causality has been established.

🔄 Steps to Reproduce

Observed hosted execution, not a deterministic standalone recipe:

  1. PR #2167 head c0ee4ebfac3ad765ce08f526f73a28ba17d00dea; base 2ceda3cc35ac76e50cca64db20b74aaeba8107e7.
  2. Existing Go Race Tests job on ubuntu-24.04, CGO_ENABLED=1, CC=gcc, GOTOOLCHAIN=local.
  3. Run /usr/bin/time -p go test -race -timeout=20m ./...
  4. Observe the assertion below. The command exited 1, not a timeout.

Targeted Linux reproduction is pending. A focused Windows attempt with Go 1.26.10 passed all 20 iterations: GOTOOLCHAIN=go1.26.10 go test -race ./cmd/engram -run "^TestServeOwnedStartupFailure$" -count=20 -timeout=2m (exit 0). That does not reproduce or rule out the Linux occurrence.

✅ Expected Behavior

The fixture reliably exercises invalid-store startup failure independently of parent transport shutdown scheduling, retaining assertions for no readiness, no token leakage, and unchanged fixture contents. Do not weaken production EOF shutdown, skip tests, or increase timeouts instead of diagnosing the failure.

❌ Actual Behavior

TestServeOwnedStartupFailure failed after 1.02s at serve_owned_test.go:110: expected startup failure. cmd/engram failed; overall exit 1 after 1153.09s. The failed-step log contains no data-race detector warning or timeout. Unit/E2E, Windows setup and native macOS adapter checks passed when inspected.

Operating System

Linux (Ubuntu/Debian): GitHub Actions ubuntu-24.04. Local non-reproduction: Windows amd64.

Release Version (Report Context)

Development CI at c0ee4ebfac3ad765ce08f526f73a28ba17d00dea, not an installed release. Current remote main observed during investigation: 2ceda3cc35ac76e50cca64db20b74aaeba8107e7. Relevant Go source/test files are unchanged between that base and this PR.

Agent / Client

Other: Go CLI test subprocess and GitHub Actions race suite.

📋 Relevant Logs
--- FAIL: TestServeOwnedStartupFailure (1.02s)
    serve_owned_test.go:110: expected startup failure
FAIL github.com/Gentleman-Programming/engram/v3/cmd/engram 576.505s
real 1153.09
Process completed with exit code 1.

Failing job

💡 Additional Context

Unconfirmed static hypothesis: the fixture leaves child stdin unset; watchOwnedParent cancels on EOF before/during store initialization, and runServe treats context cancellation as successful shutdown. EOF may win over invalid-store failure. Linux reproduction and ordering confirmation are required before choosing a correction.

Source at investigated main:

Plan: confirm ordering in isolated Linux state. If fixture-only, keep parent stdin open until invalid-store startup exits, preserving all assertions and independent EOF tests. Any production change needs a separate scope decision.

Filing only: no correction, hosted rerun, approval or PR authorized here. Assign dnlrsls and retain status:needs-review. Track independently from the OpenCode diagnostic scope in #2016 / PR #2167. Body follows the current Bug Report form fields; CLI rejects combining --template with --body.

Dominant language
Go
Stars
7.1k
Forks
729
Avg merge
9h 5m
Merged PRs (30d)
301

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Gentleman-Programming/engram

All issues in Gentleman-Programming/engram

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.