Repository navigation
Conversation
A13xB0
force-pushed
the
upstream/pr-2149
branch
from
October 10, 2026 23:02
c663f6a to
1b66d38
Compare
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.
From upstream
This PR brings in upstream Kpa-clawbot/CoreScope#2149 by @n30nex, unchanged. It is open upstream at the time of writing and addresses upstream issue Kpa-clawbot#2148. Both commits are cherry-picked with
-x, so each commit message names its upstream commit:532436e6test: respect native permissions and fixture release context (upstream2403d28f)c663f6a7perf(server): reduce retained observation allocation size (upstream1b66d388)They applied to our
master(3e21b17) with no conflicts. Nothing in this PR was written for the fork; if upstream changes Kpa-clawbot#2149 before merging, this PR should be refreshed from it.What it changes
StoreObs(one per retained observation) hadtsParseOnce sync.Oncebetween two fields, and the padding put the struct at 200 bytes, so each observation landed in Go's 208-byte allocation class. MovingtsParsed time.Timeahead of thesync.Oncepacks it to 192 bytes, the 192-byte class. The second commit makes three tests portable (Windows symlink privilege, POSIX file modes, release-notes fixture context).Performance
Upstream's own
BenchmarkStoreObsRetainedMemory(100k observations), 10 runs each onmasterand on this branch:Scale on our deployment: production holds about 167k observations in memory, so this saves about 2.7 MB of heap there. It is a small, free win; the larger memory items are tracked separately (subpath index, analytics recompute allocations).
Tests
TestStoreObsMemoryFootprint(from upstream) fails ifStoreObsgrows past 192 bytes on 64-bit targets.make test: 16 of 16 modules pass.master,tests/unit/test-issue-1956-release-routing.jsfailed locally because it expected CI'sGITHUB_REF_NAME; the second commit fixes that, so this branch is the first where every local suite passes.Review notes
sync.Oncemust not be copied after first use, and nothing copiesStoreObsby value (it is always held by pointer).🤖 Generated with Claude Code
https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H