Repository navigation
neighbors: follow-ups from #541 (graph-age clamp, cache/publish tests, atomic.Pointer) - #550
Conversation
…, atomic.Pointer) Relates to #545 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rapport — CS-Minimax PR#550 #545 — head 4572e1eStatus: Draft, all 4 requirements implemented with tests and mutants; local suites and all CI jobs green; no local E2E run (see residuals). Evidence tags: [T] = test or tool run, [A] = analysis, [K] = known and unchanged. F1 — graph rebuild clamped to the TTL
Default 300 s still rebuilds every tick, so behaviour is unchanged [T][A]. Intervals above the TTL make the graph as old as the interval; this is documented in F2 — response built from this tick's graph
My first M2 variant survived because only the default shape was checked. I fixed the test and re-ran. F3/F7 — atomic.Pointer
F4 / F6
Note: F2 and F6 pass on the old code (they are coverage-gap tests), so their red evidence is the mutants. F1 and F3 are red on the old code because the new API does not exist there. Local runs
CI (run 40083681089)
No job failed, so no rerun and no #271 flake. Residuals
|
Relates to #545
Plan / summary
Follow-ups from the #541 review. Server-only, no schema, API, dependency or workflow change;
cmd/serverstays read-only.cacheRecomputeIntervalSeconds, but the graph rebuild now runs everyceil(neighborGraphTTL / interval)ticks (neighborGraphRebuildEvery). Default 300 s: every tick, unchanged. Intervals above the TTL: graph age equals the interval (documented).TestNeighborGraphRebuildEvery,TestNeighborGraphFastCacheCadenceDoesNotRebuildGraphEveryTickTestNeighborGraphCacheBuiltFromSameTickGraph,TestNeighborGraphCacheTickWithoutRebuildKeepsGraphServer.neighborGraphis nowatomic.Pointer[NeighborGraph];neighborMuis removed, so the mutex-less mutant cannot be written.neighborBuildMustill serializes builds.TestNeighborGraphFieldIsAtomicPointer,TestNeighborGraphPublishIsRaceFree#1481 P0-1/#1483restored in theconfig.goandconfig.example.jsoncomments, which also describe the new semantics.TestNeighborCacheIntervalDocsKeepIssueRefsNeighborMaxEdgeKm()and forDebugAffinity/MaxEdgeKmreaching the build.TestConfigNeighborMaxEdgeKm,TestBuildNeighborGraphWiresMaxEdgeKm,TestBuildNeighborGraphWiresDebugAffinityDefaultMaxEdgeKm; forceEnableLog=false; offset the returned valueExisting #541 tests were adapted to the
atomic.Pointerfield (.Store(...)instead of assignment under the mutex).Performance
The request path is unchanged (an atomic load, cheaper than the former mutex). Background work goes down for intervals below 300 s: one ~1.3 s graph build per TTL instead of one per tick. At the default there is no change. No new unbounded structure.
Config / customizer
No new knob.
cacheRecomputeIntervalSecondssemantics are documented; the graph TTL stays a constant.Verification
See the report comment on this PR. Draft only; no merge or ready.
🤖 Generated with Claude Code