You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The #803 publication coordination slice serializes corpus-sized manifest builds per project publication shard (measured: peak overlapping builds = 1 at 1/2/4/8 scopes). Peak process RSS nevertheless grows linearly with the number of published worktree scopes, because memory acquired while a scope publishes is retained after that scope releases the build permit.
Measured with concurrent_worktree_scopes_publish_with_one_corpus_build_and_bounded_rss (600-file / 7,200-function corpus, one project, N distinct worktree generations, publish_verified_snapshot concurrently):
scopes
RSS before publish
sampled peak during publish
growth
growth / scope
1
0.27 GB
0.90 GB
0.64 GB
0.64 GB
2
0.39 GB
1.64 GB
1.25 GB
0.62 GB
4
0.59 GB
3.00 GB
2.41 GB
0.60 GB
8
1.03 GB
5.77 GB
4.74 GB
0.59 GB
Builds do not overlap (wall ≈ N × single publish), so this is retained published state per RetainedCodeGraphRuntimeV1/scope (staged relational projection, replay/materialization buffers, or the seated generation), not concurrent build memory. ~0.6 GB for a 7,200-function generation is also far above the sealed generation's on-disk size, so part of it is likely transient build memory that is never returned to the allocator or is held by an Arc that outlives publication.
Required design
Attribute the per-scope retention with Hotpath allocation tracking across publish_verified_snapshot (manifest projection, relational staging, sealed copy, replay pool) and identify what outlives the permit.
Release publish-time buffers when the permit is released; retain only what serving needs, and make retained-per-scope memory proportional to the served index, not to the build.
Re-run the 1/2/4/8-scope harness: peak RSS growth after the first scope should be bounded by the served-state size per scope, with the measurement in the closing comment.
Existing publication, journal-resume, cancellation, and rollback suites unchanged.
Problem
The #803 publication coordination slice serializes corpus-sized manifest builds per project publication shard (measured: peak overlapping builds = 1 at 1/2/4/8 scopes). Peak process RSS nevertheless grows linearly with the number of published worktree scopes, because memory acquired while a scope publishes is retained after that scope releases the build permit.
Measured with
concurrent_worktree_scopes_publish_with_one_corpus_build_and_bounded_rss(600-file / 7,200-function corpus, one project, N distinct worktree generations,publish_verified_snapshotconcurrently):Builds do not overlap (wall ≈ N × single publish), so this is retained published state per
RetainedCodeGraphRuntimeV1/scope (staged relational projection, replay/materialization buffers, or the seated generation), not concurrent build memory. ~0.6 GB for a 7,200-function generation is also far above the sealed generation's on-disk size, so part of it is likely transient build memory that is never returned to the allocator or is held by anArcthat outlives publication.Required design
publish_verified_snapshot(manifest projection, relational staging, sealed copy, replay pool) and identify what outlives the permit.Acceptance evidence
Refs #803 (measurement), PR #707 (
9de84bc8aharness).