bug(tests): investigate session-owned startup failure assertion under Linux race CI
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
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:
- PR #2167 head c0ee4ebfac3ad765ce08f526f73a28ba17d00dea; base 2ceda3cc35ac76e50cca64db20b74aaeba8107e7.
- Existing Go Race Tests job on ubuntu-24.04, CGO_ENABLED=1, CC=gcc, GOTOOLCHAIN=local.
- Run /usr/bin/time -p go test -race -timeout=20m ./...
- 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.
💡 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:
- https://github.com/Gentleman-Programming/engram/blob/2ceda3cc35ac76e50cca64db20b74aaeba8107e7/cmd/engram/serve_owned_test.go#L47-L61
- https://github.com/Gentleman-Programming/engram/blob/2ceda3cc35ac76e50cca64db20b74aaeba8107e7/cmd/engram/serve_owned_test.go#L101-L122
- https://github.com/Gentleman-Programming/engram/blob/2ceda3cc35ac76e50cca64db20b74aaeba8107e7/cmd/engram/serve_owned.go#L43-L51
- https://github.com/Gentleman-Programming/engram/blob/2ceda3cc35ac76e50cca64db20b74aaeba8107e7/cmd/engram/main.go#L943-L962
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
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gentleman-Programming/engram
-
status:needs-review type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Gentleman-Programming/engram#2138 · 1 comment ·
Maintainers usually reply within 1 day
-
status:needs-review
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Gentleman-Programming/engram#2065 ·
Maintainers usually reply within 1 day
-
status:needs-review type:question
Difficulty 5/5 Over a week Newbie friendliness 20/100
Gentleman-Programming/engram#2201 ·
Maintainers usually reply within 1 day
-
bug(cloud): dashboard read model is rebuilt from full history after every write (~30 s first load)Openstatus:needs-review type:bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
Gentleman-Programming/engram#2200 ·
Maintainers usually reply within 1 day
-
status:needs-review type:feature
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Gentleman-Programming/engram#2197 ·
Maintainers usually reply within 1 day
All issues in Gentleman-Programming/engram
Similar issues
-
area:web p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Lets-Parley/Parley#912 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Git-Hospital/githealthcheck#61 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
afreidah/s3-orchestrator#1824 ·
Maintainers usually reply within 1 day
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
projectdiscovery/notify#569 ·
-
internal
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day