trunk: evolve campaign — silent failures, observability, coverage#385
Merged
Conversation
…591] The embed-trigger walk had three places where errors silently truncated the embedded corpus — every one of them looks identical in production to "node legitimately had no content", so the bug class is "X is missing from semantic search but the file exists" and it never gets tracked back to indexing. Three patterns fixed in internal/leyline/trigger.go: 1. ReadContent error dropped (`n, _ := g.ReadContent(...)`). A corrupt SQLite content row, lazy-resolver template error, or permission failure became an empty file (n==0) and was skipped silently. Now logs `embed trigger: read <id>: <err>` and continues to the next child. 2. ListChildren error inside walkDir returned silently, truncating the entire subtree (and, transitively, any nested subtrees). Now logs `embed trigger: list children <id>: <err>` and skips that subtree only — outer roots still get walked. Partial corpus is better than zero corpus. 3. Status() error collapsed with `!Ready` under a single "not enabled" message, so operators couldn't tell a transport / parse failure from the daemon explicitly reporting embeddings disabled. Split into two distinct log lines: `status check failed` vs `embeddings disabled on daemon`. Test plan (internal/leyline/trigger_test.go, new file): - TestTriggerEmbedding_ReadContentError_LogsAndContinues: synthetic ReadContent error on one of two files; asserts the log line + the surviving file is still embedded via the embed_content op. - TestTriggerEmbedding_ListChildrenError_SkipsSubtreeButContinues: two top-level roots, one fails ListChildren; asserts the log line + the healthy root is still indexed. - TestTriggerEmbedding_StatusError_DistinctLog: a custom UDS server that replies with a bare newline (empty body) so Status()'s unmarshal errors; asserts the `status check failed` line and the absence of the disabled-daemon line. - TestTriggerEmbedding_StatusNotReady_DistinctLog: daemon successfully replies `ready: false`; asserts the disabled-daemon line and the absence of any status-check-failed line. Tests use a minimal stubGraph implementing graph.Graph with per-id error injection for ListChildren and ReadContent — no existing helper covered this shape; the sheaf_test mocks only proxy the socket layer.
Three silent-failure patterns in the Subscribe read goroutine
(internal/leyline/socket.go) gave operators no signal when the sheaf
invalidation stream went sideways — stale find_callers / read_file /
get_overview results with nothing in the log. All three live in the
same goroutine, so this is one PR:
1. Malformed-event silent drop. `json.Unmarshal(...); err != nil { continue }`
now logs the error and the offending line. A bounded
maxConsecutiveParseFailures (16) counter closes the subscription if
the wire stays garbage — sustained desync is treated as a dead
connection rather than a forever-spinning goroutine. The counter
resets on every successful parse.
2. Read-deadline timeout indistinguishable from clean EOF. Both paths
used to `return` into the same `defer close(ch)` so callers couldn't
tell "daemon SIGKILLed" from "daemon closed cleanly". The timeout
branch now logs distinctly before returning.
3. Slow-consumer event drop. The `select { case ch <- ev: default }`
path now bumps an atomic counter exposed via
SocketClient.SubscribeDropped() and logs the first drop + every
100th drop thereafter (bounded log volume on stuck consumers).
The goroutine body was extracted into runSubscribeLoop(ch, readTimeout)
so tests can drive it with a sub-second deadline; production callers
still hit the 60s defaultSubscribeReadTimeout via Subscribe().
Test plan
- TestSubscribe_MalformedEventLogsAndContinues: push `{this-is-not-json`
then a valid event; assert log line + the well-formed event still
reaches the consumer.
- TestSubscribe_ReadDeadlineLogged: drive runSubscribeLoop with a 50ms
timeout against a server that never pushes; assert the distinct
"read deadline exceeded" log line + channel closes. No 60s wait.
- TestSubscribe_SlowConsumerCountsAndLogsDrops: never read the channel,
push 80 events (buffer is 64), poll SubscribeDropped() until non-zero;
assert counter advances + first-drop log line.
All three pass under `go test -race -count=10 ./internal/leyline/
-run 'TestSubscribe'`. `task check` is green.
find_smells (advisory)Scoped to files changed in this PR. Rules below run on the standalone (no-LLO) cross-ref tables; fan_out_skew — 2 finding(s) in changed files
Rules: see |
Contributor
Author
Campaign roadmap (living doc — update as we go)Wave 1 — discovery + first closures ✅
Wave 2 — first observability fixes ✅ (on trunk)
Wave 3 — in flight 🔄
Wave 4 — queued (dispatchable today)Bug fixes, all P2, dev-agent owned, 1–2 file scope:
Wave 5 — gated on wave 3 landingDriven by
Wave 6+ — campaign tail
Merge discipline (per
|
This was referenced May 18, 2026
…51a0fb] Raises internal/control test coverage 37.3% → 88.0%. - All 6 zero-cov accessors (GetCurrentRoot, GetArenaPath, GetArenaSize, SetArena, SetArenaWithRoot, IsZeroRoot) now 100% - Close 66.7% → 100% (incl. concurrent-close test pinning at-least-one-nil-error contract — sync.Once tightening tracked as mache-4a827c follow-up) - validatePath 80% → 90% - OpenOrCreate 50% → 75% - Round-trip tests verify mmap-backed persistence (close → reopen → assert) Two lines flagged as un-coverable without production changes (Munmap error injection, filepath.Abs error path); both reasonable carve-outs. Production code untouched. Race-detector clean across -count=10. Closes mache-51a0fb. Lands on feat/evolve-coverage-trunk (PR #385).
ADR-0017 — matrix-coverage test-harness design for the evolve campaign. Six invariants (each falsifiable, each enforceable): - I1 Tool × Backend matrix — 18 MCP tools × 5 graph backends - I2 Fixture coverage matrix — 18 tools × 4 fixture categories - I3 Public API invariant — every exported symbol direct-tested, gated by find_smells --rule untested_function - I4 Schema engine invariant — every examples/*-schema.json has TestIngest_<schema> - I5 Daemon-paired invariant — every UDS-touching path has mock + live-daemon e2e - I6 Perf regression gate — benchmarks/baselines.json + per-bench threshold (default ±15%) Candidate I7 (fuzz / property-based) deferred to follow-up ADR. Three-milestone campaign roadmap (M1 SQLiteGraph fill / M2 fixture wiring / M3 perf gate active), 17 dispatchable sub-beads in Appendix A with explicit inter-sub-bead dependencies. Sub-beads not filed by this PR — next dispatch wave batches them. Includes corrections from fresh-eyes audit: - writeE2EFixture line range (451-539, was 441-555) - Schema ingest count (14 of 18 lack ingest tests, was 16 of 17) - write_file matrix cells changed ✓ → ~ for WritableGraph + GraphFS (only MemoryStore has e2e coverage) Closes mache-6682ec. Lands on feat/evolve-coverage-trunk (PR #385).
Contributor
Author
Campaign state update — 2026-05-18 (after wave 4 + wave 5 dispatch)Trunk at d017cadOpen trunk PRs (awaiting merge)
New rule: 100% new-code coverage on every trunk PRUser-set: trunk doesn't merge to main until every new prod line is covered. The coverage-gate tool above operationalizes this. Once it lands:
Discipline so far
Paired LLO work (not blocking)
Next wavesDriven by ADR-0017's sub-bead appendix (SB-01..SB-17, 3 milestones M1/M2/M3) once those get filed as beads in a batch. |
Pure-stdlib Go CLI at tools/coverage-gate/ that gates trunk PRs on new-code coverage. Contract: - Input: a Go cover profile (go test -coverprofile=cover.out) + a unified diff - Output: list of new/modified prod lines lacking coverage; exit 0 if clean, 1 if uncovered, 2 on error - Skips _test.go, testdata/, non-Go files, comment-only lines, blank lines - Supports // coverage:ignore single-line annotations - Deterministic output (sorted by file, then by line, with collapsed ranges) Demo run against PR #388 found 2 uncovered lines in downloadLeyline (L583, L605 — the httpGet + 404 paths). Demo run against PR #389 found 4 uncovered lines in DiscoverOrStart (L190-191 stale-managed reap, L256-257 pre-spawn liveness). Both are real, in-diff, uncovered prod lines — true positives. 15 self-tests covering profile parsing, diff parsing, intersection, overlap handling, comment-skip, test-file skip, testdata skip, coverage:ignore, exit codes, report formatting, and binary integration. All pass under -race -count=10. Fresh-eyes audit recommendation: APPROVE — no false positives or false negatives detected. Production-ready as merge gate. Closes part of mache-66d8df. The per-package ratchet baseline tracking is the natural Phase 2 (separate bead). Lands on feat/evolve-coverage-trunk (PR #385). Once merged, the gate runs against every subsequent trunk PR + retroactively on already-merged commits.
Changes the leyline auto-download URL from the floating /releases/latest/ tag on the private agentic-research/ley-line repo to a pinned /releases/download/v0.4.1/ on the public agentic-research/ley-line-open repo. - leylineBinaryVersion const mirrors the leyline-schema v0.4.1 pin in go.mod - The URL template is now const-to-var (with documented test-mutation contract) so httptest can mock without real network calls - Two new tests cover the happy 200 path (asserts bytes + exec bit) and the 404 path (asserts error message + that destPath is not created) - Existing TestLeylineReleaseURL_PointsAtPublicRepo + TestLeylineReleaseURL_IncludesVersion both pass Coverage-gate (mache-66d8df): exit 0 against trunk after backfill — every new prod line covered. Fresh-eyes audit recommendation: APPROVE. Closes mache-9051f0. Lands on feat/evolve-coverage-trunk (PR #385).
…che-52a23a] Fixes two real bugs in DiscoverOrStart: 1. Orphaned daemons on crash/SIGKILL — six observed during PR #371 smoke test 2. In-process double-spawn — no synchronization between findExistingSocket and cmd.Start Approach (hybrid): - isSocketAlive() — net.DialTimeout-based liveness check (500ms budget), replaces naive os.Stat - managed.mu lock spans the FULL discover-then-spawn cycle so concurrent in-process callers serialize - Stale socket file removal happens inside the lock - LEYLINE_SOCKET (user-pointed external daemon) is respected: stale → return clear error 9 new tests in socket_test.go (3 hermetic + 6 live-leyline E2E with skip-if-no-binary). Coverage 25.4% → 85.7%; remaining 14.3% is 5 fault-injection-only branches. One TOCTOU defensive guard annotated // coverage:ignore with explicit justification. Coverage-gate (mache-66d8df): exit 0 against trunk. Fresh-eyes audit: APPROVE. Closes mache-52a23a. Lands on feat/evolve-coverage-trunk (PR #385).
…gged by coverage-gate [mache-50c886] Coverage-gate flagged 10 new prod lines uncovered in commit 3c73e6b (Subscribe goroutine observability). This retroactive backfill closes the gap with targeted error-path tests and a single coverage:ignore annotation for the one branch that is genuinely unreachable. Test-only addition — no production-code behavior change. Per-line breakdown: L470 (Query early-return on SendOp err) → test TestQuery_PropagatesSendOpError: past SetDeadline forces SendOp's Write to trip i/o timeout, surfacing the wrapped error from Query's `if err != nil { return nil, err }` branch. L482-483 (Query unexpected rows type) → test TestQuery_UnexpectedRowsType: mock returns {"rows": "not-an-array"}; assertion that the rows.([]any) cast fails and Query surfaces "unexpected rows type: string". L518-519 (Subscribe json.Marshal failure) → ANNOTATED with `// coverage:ignore`. The request body is map[string]any{"op": string, "topics": []string} — encoding/json cannot fail on that shape (no cyclic refs, no channels, no funcs, no unsupported types). The branch is defensive-only and unreachable in practice. L523-524 (Subscribe Write failure) → test TestSubscribe_WriteFailsOnExpiredDeadline: past SetDeadline makes Subscribe's c.conn.Write trip i/o timeout, surfacing the "write subscribe" wrap. L529-530 (Subscribe read response failure) → test TestSubscribe_ReadResponseFailsOnEarlyClose: mock accepts the subscribe request line then closes the conn without replying; Subscribe's c.rd.ReadString returns EOF, surfacing the "read subscribe response" wrap. L534 (Subscribe unmarshal response failure) → test TestSubscribe_UnmarshalResponseFailsOnNonJSON: mock sends "not-json\n" in response to subscribe; json.Unmarshal fails, surfacing the "unmarshal subscribe response" wrap so a daemon-protocol mismatch is distinguishable from a transport failure (L529-530) and a daemon-side error (L536-537). Coverage-gate output after the backfill (against `git diff 3c73e6b^..3c73e6b > /tmp/3c73e6b.diff`): internal/leyline/socket.go L518-519 2 new prod line(s) uncovered. L518-519 are the annotated unreachable lines; the historical diff predates the annotation so the gate (which reads diff text, not source) still surfaces them. The source-side `// coverage:ignore` documents the contract for future readers and for any `3c73e6b^..HEAD` re-evaluation. Test seam: no new mock helper introduced — the existing `mockServer` covers L470/L482-483/L523-524, and small inline UDS listeners cover L529-530/L534 (subscribePushServer always sends a canned response, so we couldn't reuse it for the no-reply / non-JSON cases). Verification: task check → exit 0 (full sweep clean) go test -race -count=3 ./internal/leyline/ → ok (race-clean)
11 `for i := 0; i < N; i++` → `for i := range N` rewrites across 4 test files, applied via `modernize -rangeint -fix ./...`. Pure mechanical change, no behavior touched. Full test sweep passes. Files: - internal/control/control_test.go (2 sites) - internal/graph/sheaf_invalidate_test.go (4 sites) - internal/graph/snapshot_cache_test.go (2 sites) - internal/leyline/socket_test.go (3 sites) No bead — pure cleanup wave on feat/evolve-coverage-trunk (PR #385).
Mache's go.mod and go.work were pinned to 1.25.5; installed Go on the dev machine is 1.26.2, latest stable is 1.26.3. Bumping the pin to 1.26 unlocks any 1.26-only features for future use without changing today's behavior. `go mod tidy` + full `task check` green at exit 0 under the new pin. No bead — pure cleanup wave on feat/evolve-coverage-trunk (PR #385).
…nt [mache-50c886]
Adds three retroactive tests in socket_test.go that close the last three
coverage-gate gaps in internal/leyline/socket.go's runSubscribeLoop:
- TestSubscribe_EmptyLineSkippedSilently (L583): bare "\n" on the
wire must be silently skipped, not block the loop. Mock pushes
"\n" then a real event; consumer must still receive the event.
- TestSubscribe_MaxConsecutiveParseFailuresClosesSubscription
(L595-596): once maxConsecutiveParseFailures+1 consecutive bad-
JSON lines arrive, the goroutine must log "closing subscription"
and return so the channel closes. Without this guard a desynced
wire would spin forever. Asserts both: channel closes within 2s
AND the distinctive log line appears.
- TestSubscribe_NonEventLineSkippedSilently (L604): valid JSON
without "event":true is filtered silently (op-response leakage
onto the subscribe conn, future-proofed envelope keys). Mock
pushes a non-event JSON then a real event; the non-event must
NOT reach the consumer and the real event must.
All three tests reuse the existing subscribePushServer / captureLog
infrastructure — no new helpers added. Each test runs in <1ms and
passes -race.
Drops coverage-gate uncovered count from 106 → 102 new prod lines.
The remaining 102 are all in tools/coverage-gate/main.go and need a
separate refactor (extract main() to run()) to be covered.
Extracts the body of main() into a new exported-internal function:
func run(progName string, args []string, stdout, stderr io.Writer) int
main() is now a single-line wrapper:
func main() { // coverage:ignore
os.Exit(run(os.Args[0], os.Args[1:], os.Stdout, os.Stderr))
}
Observable behavior is unchanged: same usage message, same exit codes
(0 clean / 1 uncovered / 2 io-or-usage-error), same stdout/stderr
formats. The existing os/exec-based integration tests
(TestExitCodeZeroWhenCovered, TestExitCodeOneWhenUncovered,
TestExitCodeOneReportFormat) continue to pass against the real
binary — they exercise the boundary main → run.
The motivation is coverage: Go's -coverprofile does not propagate
into subprocesses spawned via os/exec, so the previous main() body
showed as 100% uncovered even though the integration tests fully
exercised it. With run() exposed in-package, new tests call it
directly with bytes.Buffer for stdout/stderr and assert on the
return code:
TestRun_CleanExitOnCoveredDiff — exit 0, empty stdout
TestRun_NonZeroExitWithUncoveredLines — exit 1, report format
TestRun_ErrorOnMissingProfile — exit 2, stderr message
TestRun_UsageOnWrongArgCount — exit 2, usage line
TestRun_ErrorOnMalformedProfile — exit 2, parse error
TestRun_ErrorOnMissingDiff — exit 2, diff open error
TestRun_ErrorOnMalformedDiff — exit 2, hunk parse error
Additional retroactive tests close the remaining coverage-gate gaps
in the parser helpers:
TestParseProfile_SkipsEmptyLines — empty line in cover profile
TestParseProfile_SpanWithoutComma — malformed span branch
TestParseProfile_ScannerError — bufio.Scanner err propagation
TestParseDiff_ScannerError — same for parseDiff
TestParseDiff_DevNullSkipped — `+++ /dev/null` file deletion
TestParseDiff_BlankLineInHunkAdvances — blank-in-hunk newLine bump
TestParseDiff_NoNewlineAtEndOfFile — `\ No newline` marker handling
TestParseHunkNewStart_NoPlus — missing '+' returns error
TestParseHunkNewStart_NoTerminator — no-space/comma fall-through
TestParentDir_Root — filesystem root edge case
TestModulePathFromGoMod_WalksUpAndStops — walks to root with no go.mod
TestIsCountableProdLine_BlockCommentContinuation — `* foo` skip path
Two lines remain explicitly annotated `// coverage:ignore`:
func main() — never invoked under `go test` (test binary has a
different entry point). Pure delegation to run().
os.Getwd error path in modulePathFromGoMod — only fires when the
process's cwd has been removed or detached, which can't be
reproduced from inside a running Go test without exotic syscalls.
Linter (errcheck) now requires `_, _ =` on fmt.Fprintf/Fprintln to
arbitrary io.Writers — the previous code wrote to os.Stdout/os.Stderr,
which errcheck whitelists. Updated in-place; no semantic change.
Diff-gate against main..HEAD now exits 0.
…sseq) [mache-cc34b7] Mechanical fixer pass via `modernize -stringscut -stringsseq -fix`: - 3× strings.Index → strings.Cut - 1× range over strings.Split → range over strings.SplitSeq All 22 tests in tools/coverage-gate pass under -race -count=3. Gate exit 0 against main..HEAD.
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
…51a0fb] Raises internal/control test coverage 37.3% → 88.0%. - All 6 zero-cov accessors (GetCurrentRoot, GetArenaPath, GetArenaSize, SetArena, SetArenaWithRoot, IsZeroRoot) now 100% - Close 66.7% → 100% (incl. concurrent-close test pinning at-least-one-nil-error contract — sync.Once tightening tracked as mache-4a827c follow-up) - validatePath 80% → 90% - OpenOrCreate 50% → 75% - Round-trip tests verify mmap-backed persistence (close → reopen → assert) Two lines flagged as un-coverable without production changes (Munmap error injection, filepath.Abs error path); both reasonable carve-outs. Production code untouched. Race-detector clean across -count=10. Closes mache-51a0fb. Lands on feat/evolve-coverage-trunk (PR #385).
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
ADR-0017 — matrix-coverage test-harness design for the evolve campaign. Six invariants (each falsifiable, each enforceable): - I1 Tool × Backend matrix — 18 MCP tools × 5 graph backends - I2 Fixture coverage matrix — 18 tools × 4 fixture categories - I3 Public API invariant — every exported symbol direct-tested, gated by find_smells --rule untested_function - I4 Schema engine invariant — every examples/*-schema.json has TestIngest_<schema> - I5 Daemon-paired invariant — every UDS-touching path has mock + live-daemon e2e - I6 Perf regression gate — benchmarks/baselines.json + per-bench threshold (default ±15%) Candidate I7 (fuzz / property-based) deferred to follow-up ADR. Three-milestone campaign roadmap (M1 SQLiteGraph fill / M2 fixture wiring / M3 perf gate active), 17 dispatchable sub-beads in Appendix A with explicit inter-sub-bead dependencies. Sub-beads not filed by this PR — next dispatch wave batches them. Includes corrections from fresh-eyes audit: - writeE2EFixture line range (451-539, was 441-555) - Schema ingest count (14 of 18 lack ingest tests, was 16 of 17) - write_file matrix cells changed ✓ → ~ for WritableGraph + GraphFS (only MemoryStore has e2e coverage) Closes mache-6682ec. Lands on feat/evolve-coverage-trunk (PR #385).
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
Pure-stdlib Go CLI at tools/coverage-gate/ that gates trunk PRs on new-code coverage. Contract: - Input: a Go cover profile (go test -coverprofile=cover.out) + a unified diff - Output: list of new/modified prod lines lacking coverage; exit 0 if clean, 1 if uncovered, 2 on error - Skips _test.go, testdata/, non-Go files, comment-only lines, blank lines - Supports // coverage:ignore single-line annotations - Deterministic output (sorted by file, then by line, with collapsed ranges) Demo run against PR #388 found 2 uncovered lines in downloadLeyline (L583, L605 — the httpGet + 404 paths). Demo run against PR #389 found 4 uncovered lines in DiscoverOrStart (L190-191 stale-managed reap, L256-257 pre-spawn liveness). Both are real, in-diff, uncovered prod lines — true positives. 15 self-tests covering profile parsing, diff parsing, intersection, overlap handling, comment-skip, test-file skip, testdata skip, coverage:ignore, exit codes, report formatting, and binary integration. All pass under -race -count=10. Fresh-eyes audit recommendation: APPROVE — no false positives or false negatives detected. Production-ready as merge gate. Closes part of mache-66d8df. The per-package ratchet baseline tracking is the natural Phase 2 (separate bead). Lands on feat/evolve-coverage-trunk (PR #385). Once merged, the gate runs against every subsequent trunk PR + retroactively on already-merged commits.
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
Changes the leyline auto-download URL from the floating /releases/latest/ tag on the private agentic-research/ley-line repo to a pinned /releases/download/v0.4.1/ on the public agentic-research/ley-line-open repo. - leylineBinaryVersion const mirrors the leyline-schema v0.4.1 pin in go.mod - The URL template is now const-to-var (with documented test-mutation contract) so httptest can mock without real network calls - Two new tests cover the happy 200 path (asserts bytes + exec bit) and the 404 path (asserts error message + that destPath is not created) - Existing TestLeylineReleaseURL_PointsAtPublicRepo + TestLeylineReleaseURL_IncludesVersion both pass Coverage-gate (mache-66d8df): exit 0 against trunk after backfill — every new prod line covered. Fresh-eyes audit recommendation: APPROVE. Closes mache-9051f0. Lands on feat/evolve-coverage-trunk (PR #385).
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
…che-52a23a] Fixes two real bugs in DiscoverOrStart: 1. Orphaned daemons on crash/SIGKILL — six observed during PR #371 smoke test 2. In-process double-spawn — no synchronization between findExistingSocket and cmd.Start Approach (hybrid): - isSocketAlive() — net.DialTimeout-based liveness check (500ms budget), replaces naive os.Stat - managed.mu lock spans the FULL discover-then-spawn cycle so concurrent in-process callers serialize - Stale socket file removal happens inside the lock - LEYLINE_SOCKET (user-pointed external daemon) is respected: stale → return clear error 9 new tests in socket_test.go (3 hermetic + 6 live-leyline E2E with skip-if-no-binary). Coverage 25.4% → 85.7%; remaining 14.3% is 5 fault-injection-only branches. One TOCTOU defensive guard annotated // coverage:ignore with explicit justification. Coverage-gate (mache-66d8df): exit 0 against trunk. Fresh-eyes audit: APPROVE. Closes mache-52a23a. Lands on feat/evolve-coverage-trunk (PR #385).
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
11 `for i := 0; i < N; i++` → `for i := range N` rewrites across 4 test files, applied via `modernize -rangeint -fix ./...`. Pure mechanical change, no behavior touched. Full test sweep passes. Files: - internal/control/control_test.go (2 sites) - internal/graph/sheaf_invalidate_test.go (4 sites) - internal/graph/snapshot_cache_test.go (2 sites) - internal/leyline/socket_test.go (3 sites) No bead — pure cleanup wave on feat/evolve-coverage-trunk (PR #385).
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
Mache's go.mod and go.work were pinned to 1.25.5; installed Go on the dev machine is 1.26.2, latest stable is 1.26.3. Bumping the pin to 1.26 unlocks any 1.26-only features for future use without changing today's behavior. `go mod tidy` + full `task check` green at exit 0 under the new pin. No bead — pure cleanup wave on feat/evolve-coverage-trunk (PR #385).
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
…-graph] Pure-move decomposition of internal/graph/graph.go (1420 → 159 LOC) across 8 files. No behavior changes. New files: - memstore.go (273) — struct + read methods - memstore_write.go (376) — mutations + indexNode + ShiftOrigins - memstore_refs.go (129) — refs/defs maps + accessors - memstore_callees.go (190) — GetCallees + Go import parsing - memstore_refsdb.go (207) — SQLite sidecar - memstore_livegraph.go (44) — mtime tracking - content_cache.go (80) — FIFO content cache extracted - graph.go (159) — Graph interface + Node/ContentRef types 3 new behavioral tests in memstore_*_test.go. likeMatch deliberately left in sqlite_graph.go (composite + memstore call it cross-package-scope). Coverage-gate (--rename-threshold 50): exit 0. 38 truly-new lines (memstore_livegraph.go + new file overhead), all covered. Skeptic-agent verdict: APPROVE WITH COMMENT. Tests are real-behavior, file layout coherent, API preserved (all 38 MemoryStore signatures byte-equal), lock discipline clean, -race -count=5 clean, no test-only exports. One doc comment addressed in followup commit. Closes mache-godfile-graph campaign work. Lands on feat/godfile-decomposition (PR #385's successor trunk).
jamestexas
added a commit
that referenced
this pull request
May 19, 2026
…-graph] Pure-move decomposition of internal/graph/graph.go (1420 → 159 LOC) across 8 files. No behavior changes. New files: - memstore.go (273) — struct + read methods - memstore_write.go (376) — mutations + indexNode + ShiftOrigins - memstore_refs.go (129) — refs/defs maps + accessors - memstore_callees.go (190) — GetCallees + Go import parsing - memstore_refsdb.go (207) — SQLite sidecar - memstore_livegraph.go (44) — mtime tracking - content_cache.go (80) — FIFO content cache extracted - graph.go (159) — Graph interface + Node/ContentRef types 3 new behavioral tests in memstore_*_test.go. likeMatch deliberately left in sqlite_graph.go (composite + memstore call it cross-package-scope). Coverage-gate (--rename-threshold 50): exit 0. 38 truly-new lines (memstore_livegraph.go + new file overhead), all covered. Skeptic-agent verdict: APPROVE WITH COMMENT. Tests are real-behavior, file layout coherent, API preserved (all 38 MemoryStore signatures byte-equal), lock discipline clean, -race -count=5 clean, no test-only exports. One doc comment addressed in followup commit. Closes mache-godfile-graph campaign work. Lands on feat/godfile-decomposition (PR #385's successor trunk).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long-lived integration branch (do not auto-merge)
feat/evolve-coverage-trunkis the trunk for the evolve campaign — sustained, parallel work toward observability hardening, silent-failure elimination, and 100% test coverage oninternal/. This PR exists for visibility and CI gating only. Squash-merging it would defeat the whole point.How to contribute (worktree convention)
Each session/agent claims a single bead:
Bead PRs target this trunk (not
main). After review they merge here. Trunk rebases onmainopportunistically — only when in-flight worktrees are quiet.What's already in this trunk
3c73e6bmache-50c886subscribeDroppedcounter exposed viaSubscribeDropped(), parse-failure threshold (16 consecutive bad lines → close subscription), distinct log lines on timeout vs clean EOF2627040mache-510591ReadContenterrors logged with node ID,ListChildrenerrors no longer truncate the walk silently, Status check distinguishes "daemon disabled" from "we couldn't tell"Both touch only
internal/leyline/(production + tests). Race-detector clean.task checkexit 0.Open beads currently scoped to this trunk
mache-5159a2—parseUint64/parseIntSlicesilent coercion (waits onley-line-open-503971typed event payload structs)mache-51a0fb—internal/control37% coverage gap (6 zero-cov accessors)mache-4a827c— test-discipline meta (CI -race vs local scheduling)mache-6b6da6+mache-be8090+mache-d332b5Related upstream
ley-line-open-503971— LLO publishes typed JSON event payload structs (mache picks up via paired bead once shipped)🤖 Generated with Claude Code