Skip to content

refactor(storage): one rule per commit-encode fact, neutral bounded sink (LABS-1292) - #161

Merged
jexp merged 1 commit into
mainfrom
labs-1292-structure
Nov 11, 2026
Merged

jexp merged 1 commit into
mainfrom
labs-1292-structure

Conversation

@jexp

@jexp jexp commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Refactor: structure follow-ups to the encode-once commit path (ADR-0558, ADR-0564) — one rule per fact instead of re-spelled copies, with behavior, error text, figures and byte-identity unchanged. One WAL-group refusal (a batch whose own timestamps do not advance) now fires at preflight, before any frame is written, rather than at append.

Changes

  • commit.rs: Accepted no longer holds Option<EncodedOps>; the encoding travels beside it in Admitted and is moved into the append, so the expect is gone.
  • wal.rs/relate-write-local: Wal::preflight_group carries a running tip through a batch (F-2-1); append_assigned reports each record with its commit_ts instead of zipping positions (F-1-10).
  • wal.rs: one commit_ts_advances rule and one LSN-successor rule (Tip) shared by preflight, append and the segment scan (F-1-5, F-1-7); validate_redo_ids lives in the wal module so encoded.rs no longer imports Wal. A non-successor LSN is now refused at preflight with "WAL LSN must advance" (it was previously refused at append as a stale proof; no caller can produce one).
  • relate-engine-api: CommitRecord owns the header key spellings and width bound the encoder stamps, pinned to serde's output by a test (F-1-2).
  • vfs/bounded.rs: the shared sink keeps one refusal slot, mints no WAL-named error (the WAL layer words the allocation refusal), and narrows its bound to usize once with a typed error.
  • EncodedOps::encode_unmetered replaces the throwaway WorkspaceCharge::empty() encodes and closes the early-release hole; the charge base is read once.
  • relate-test-support::peak_pool::FixedPool is the one shared PeakPool fake (storage tests, alloc test, executor's PeakPoolDouble alias).
  • Tests: group-preflight refusal, append_assigned batch/commit_ts tests, header-spelling pin.

Left out (see LABS-1353): the optional-meter collapse (declined: an empty charge still charges an installed ledger, the hole encode_unmetered closes), nits in untouched code, and the preflight_with seam, which no longer exists in the tree.

Verification

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --exclude relate-python -- -D warnings (clean)
  • cargo test -p relate-storage -p relate-write-local -p relate-engine-api (incl. payload-cap byte-identity and the alloc-counting memory-bound test)
  • cargo test -p relate --lib (397 passed); cargo test -p relate --no-fail-fast (no failures)
  • Full local stellar round (stellar-prep.sh local): structure and comparison clean; branching/boundaries nits and one declined design ticketed
  • Ready-gate CI matrix

Fixes the structure items of LABS-1292.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Security review: (security-review skill)

Reviewed the WAL/commit encode refactor for reachable security impact: redo-op input validation (validate_redo_ids), the 64 MiB WAL payload cap, workspace-charge accounting across encoder growth/trim and the committed-slot path, read-only/poisoned write guards, group-preflight atomicity, and error rendering. The diff adds no network surface, auth change, secret handling, dependency, or CI/workflow change, and the test-support PeakPool move stays a dev-only dependency. All bounds and fail-closed checks are preserved; two are tightened — a non-successor LSN and a non-advancing intra-group commit timestamp are now refused at preflight, before any frame is written, instead of after a partial group append. The new expect in the sink's write path is guarded by capture_charged's allocation-space check, and the unmetered encode path remains bounded by the payload cap and has no production call site.

No issues found.

Security review: ✅ no issues found

fn record(commit_ts: u64) -> AssignedRecord {
AssignedRecord {
commit_ts,
encoded: EncodedOps::encode(&[], &mut WorkspaceCharge::empty()).unwrap(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Low] Ownership: The new helper encodes with EncodedOps::encode(&[], &mut WorkspaceCharge::empty()), so the temporary charge dies at the end of that statement while the EncodedOps it paid for lives on in the returned AssignedRecord.

Why this matters: EncodedOps::encode documents that the caller keeps the charge for as long as the encoding lives; releasing it early silently drops the buffer's accounting the moment a ledger is installed in this test binary — the exact hole encode_unmetered was added to close in this PR.
Suggested fix: encoded: EncodedOps::encode_unmetered(&[]).unwrap(), and drop the now-unused WorkspaceCharge import.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Rust review (rust-reviewer skill, full review)

Reviewed the full 14-file diff: the encode-once commit-path refactor in relate-engine-api, relate-storage (WAL preflight/encode/scan, bounded sink), relate-write-local, relate, and the shared PeakPool test fake. Ownership/borrowing, lifetimes, error handling (Result/Option), unsafe, and idiomatic Rust were checked against the changed code. The Option<&mut WorkspaceCharge> sink refactor still charges before allocation and settles afterwards, the refusal slot collapses into one BoundCore place, group preflight now rejects non-advancing LSN/timestamp batches before any frame is written, and encode_unmetered removes the early-charge-release hole without adding panics. No new unsafe, no unchecked unwrap/expect outside tests, and no ownership, lifetime, or error-propagation issues surfaced.

No issues found.

Rust review: ✅ no issues found

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stellar review round 1: 6 inline finding(s); see summary comment.

self,
result: std::result::Result<(), E>,
serde_error: impl FnOnce(E) -> Error,
allocation_error: impl FnOnce(usize) -> Error,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] branching (std-2): The terminal now takes a second caller-owned error policy, but only a capture built with a growth policy (capture_charged, which encode_with always uses) can ever record `GrowthFailure::Allocation

Suggested fix: Keep the refusal policy where the sink is built, not at its terminal: pass the allocation renderer into capture_charged (beside Refusal) or render Allocation with the sink's one neutral message, and leave finish(result, serde_error) for the serializer failure only, so no uncharged capture is

finding F-1-1


fn admits_lsn(self, lsn: u64) -> bool {
self.lsn.checked_add(1) == Some(lsn)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] branching (q-missing-helper): Tip::next_lsn (60–64) already spells the LSN-advance rule as checked_add(1); admits_lsn re-spells the same relation in the same impl, and the two already disagree on overflow — next_lsn refuse

Suggested fix: Derive one spelling from the other (self.next_lsn().is_ok_and(|next| next == lsn)), or have one method return the successor-or-overflow and let the two enforcement sites render their own message.

finding F-1-2

result: std::result::Result<(), E>,
serde_error: impl FnOnce(E) -> Error,
allocation_error: impl FnOnce(usize) -> Error,
) -> Result<u64> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] boundaries (std-4): The sink resolves one half of its refusal channel from construction-time state (the recorded Refused crossing plus the Refusal the caller configured in capture) but resolves the allocation refus

Suggested fix: Give the growth path the same construction-time policy as Refusal: carry the allocation-refusal rendering beside limit in ChargedGrowth (or let GrowthFailure::Allocation emit its own typed error), so finish stays two-parameter and an uncharged capture supplies nothing for a refusal it ca

finding F-1-3

/// The rendering the in-flight serializer is aborted with.
fn abort(&self) -> io::Error {
match self {
GrowthFailure::Charge(error) => io::Error::other(error.to_string()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] boundaries (std-6): The module already owns the canonical renderer for "typed refusal as the in-flight serializer's io abort" — bound_refusal, documented as the one spelling so the abort can never disagree with the ref

Suggested fix: Render the Charge arm through the canonical helper (bound_refusal(error)); keep the allocation arm as the one place that builds a message with no typed error to pass.

finding F-1-4

fn record(commit_ts: u64) -> AssignedRecord {
AssignedRecord {
commit_ts,
encoded: EncodedOps::encode(&[], &mut WorkspaceCharge::empty()).unwrap(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] comparison (flag-canonical-dup): This new test re-spells the throwaway encoding the same diff replaced everywhere else: encode_unmetered is documented as the one spelling 'for a throwaway encoding no admission holds a budget for (a

Suggested fix: Use EncodedOps::encode_unmetered(&[]) here as at every other throwaway site, and drop the then-unused WorkspaceCharge import.

finding F-1-5

.map(|(_, a)| a.commit_ts)
.map(|(_, a)| a.record.commit_ts)
.unwrap_or_else(|| shared.graph.commit_ts());
last.checked_add(1).map(|next| next.max(slot.txn_id))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] comparison (std-6): The diff centralized the commit-timestamp validity rule in wal::commit_ts_advances ('neither 0 nor the u64::MAX sentinel', consulted by preflight, append and the scan), but admission re-derives

Suggested fix: Validate the computed commit_ts through the canonical commit_ts_advances (or refuse when next >= u64::MAX) so admission and the WAL agree on the sentinel at every site, and keep the one rule in one place.

finding F-1-6

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Stellar review (stellar-review skill)

Round 3 · head c31736a5 · scope: 0/273 units (273 sealed from earlier rounds).

Still open from earlier rounds

  • [Medium] branching (std-2) F-1-1: relate/relate-storage/src/vfs/bounded.rs:335-339 — The terminal now takes a second caller-owned error policy, but only a capture built with a growth policy (capture_charged, which encode_with always uses) can ever record `GrowthFailure::Allocation
  • [Low] boundaries (std-6) F-1-10: relate/relate-storage/src/snapshot/native/mod.rs:149-154 — This closure can never fire (an uncharged capture has no growth slot, so no refusal path records Refused::Growth), yet it must exist — and its text is byte-identical to GrowthFailure::abort's al
  • [Low] boundaries (std-5) F-1-11: relate/relate-storage/src/vfs/bounded.rs:311-313 — base must equal the bytes the passed charge already holds, but that value is readable from the very reference the sink owns (charge.bytes() — which the previous signature read itself), so the eq
  • [Low] boundaries (std-4) F-1-12: relate/relate-storage/src/vfs/bounded.rs:30-31 — Two adjacent fields whose names differ by one letter now hold two different concepts (the recorded outcome vs. the configured policy), and finish reads both in one expression (self.core.refused …
  • [Low] boundaries (std-5) F-1-13: relate/relate-storage/src/vfs/bounded.rs:116-121 — The single match over the new two-variant refusal vocabulary ends in _ => None, so a future Refused variant silently answers "no refusal" here instead of forcing the decision the way the rest of t
  • [Medium] branching (q-missing-helper) F-1-2: relate/relate-storage/src/wal.rs:66-68 — Tip::next_lsn (60–64) already spells the LSN-advance rule as checked_add(1); admits_lsn re-spells the same relation in the same impl, and the two already disagree on overflow — next_lsn refuse
  • [Medium] boundaries (std-4) F-1-3: relate/relate-storage/src/vfs/bounded.rs:335-340 — The sink resolves one half of its refusal channel from construction-time state (the recorded Refused crossing plus the Refusal the caller configured in capture) but resolves the allocation refus
  • [Medium] boundaries (std-6) F-1-4: relate/relate-storage/src/vfs/bounded.rs:55-57 — The module already owns the canonical renderer for "typed refusal as the in-flight serializer's io abort" — bound_refusal, documented as the one spelling so the abort can never disagree with the ref
  • [Medium] comparison (std-6) F-1-6: relate/relate/src/commit.rs:626-631 — The diff centralized the commit-timestamp validity rule in wal::commit_ts_advances ('neither 0 nor the u64::MAX sentinel', consulted by preflight, append and the scan), but admission re-derives
  • [Low] branching (q-obscured-invariant) F-1-7: relate/relate-storage/src/vfs/bounded.rs:116-119 — The wildcard folds a recorded Growth refusal into None, so the shared core's crossing query now answers “no crossing” for a refusal it cannot represent, and its doc (“None while the bound held”)
  • [Low] branching (q-legibility) F-1-8: relate/relate-storage/src/vfs/bounded.rs:27-31 — refused (the recorded fact) and refusal (the construction policy) are one letter apart and meet in the same expression in finish (self.core.refused matched, self.core.refusal rendered), so e
  • [Low] branching (q-legibility) F-1-9: relate/relate-storage/src/wal/tests/encoded.rs:292-292 — The deleted test-local FixedPool was replaced by a use left in the middle of the module, between two #[test] functions, instead of in the file's import block — an artifact of the extraction that
  • [Medium] branching (std-0) F-2-1: relate/relate-storage/src/vfs/bounded.rs:341-346 — The refusal slot is dispatched twice: the early crossed_refusal() matches refused for the crossing, then this match self.core.refused re-examines the same slot and must glue the now-unreachable
  • [Medium] boundaries (std-5) F-2-2: relate/relate-storage/src/vfs/bounded.rs:341-346 — The terminal resolves the recorded refusal twice: crossed_refusal() already matches Refused and returns the crossing error, then the match reads self.core.refused again and folds the already-ret

Stellar review: ⚠️ 14 issue(s) open (0 + 0 anchored new (fail/low) + 14 carried)

…ink (LABS-1292)

Behavior-preserving structure follow-ups to the encode-once commit path
(ADR-0558, ADR-0564):

- Accepted no longer carries Option<EncodedOps>; the encoding travels beside
  it in Admitted and is moved into the append, so the expect is gone.
- Wal::preflight_group carries a running tip through a batch, so a batch
  whose own timestamps do not advance is refused before any frame is
  written; append_assigned reports each record with its commit_ts.
- One commit_ts advance rule and one LSN-successor rule in the WAL, shared
  by preflight, append and the segment scan; validate_redo_ids lives in the
  wal module, not behind Wal.
- CommitRecord owns the header key spellings and width the encoder stamps.
- BoundedSink records one refusal and mints no WAL-named error: the WAL
  layer words the allocation refusal; the limit narrows to usize once.
- EncodedOps::encode_unmetered replaces the throwaway local charges; the
  charge base is read once. One shared FixedPool test fake.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jexp
jexp force-pushed the labs-1292-structure branch from cdca440 to c31736a Compare November 11, 2026 01:34

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stellar review round 2: 2 inline finding(s); see summary comment.

return Err(error);
match self.core.refused {
// Handled above; kept so the match stays exhaustive.
Some(Refused::Crossed(_)) | None => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] branching (std-0): The refusal slot is dispatched twice: the early crossed_refusal() matches refused for the crossing, then this match self.core.refused re-examines the same slot and must glue the now-unreachable

Suggested fix: Match self.core.refused once: None maps the serializer's result, Some(Refused::Crossed(at)) returns self.core.refusal.error(at, self.core.limit), and the two Growth arms return their errors — deleting the duplicate dispatch, the merged dead arm, and its comment.

finding F-2-1

return Err(error);
match self.core.refused {
// Handled above; kept so the match stays exhaustive.
Some(Refused::Crossed(_)) | None => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Medium] boundaries (std-5): The terminal resolves the recorded refusal twice: crossed_refusal() already matches Refused and returns the crossing error, then the match reads self.core.refused again and folds the already-ret

Suggested fix: Match self.core.refused once in finish: handle Some(Refused::Crossed(crossed_at)) by rendering self.core.refusal.error(crossed_at, self.core.limit) there, keep the growth arms, and let only None take result.map_err(serde_error); delete the early crossed_refusal() call and the dead arm.

finding F-2-2

@jexp
jexp marked this pull request as ready for review November 11, 2026 01:44
@oplane-bot

oplane-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

Oplane Security Review

Oplane identified security requirements relevant to this PR and checked the implementation against them. All requirements are satisfied. Review the generated threat model.

StatusRequirementSeverityAction
🟢 ImplementedBuffer Size and Integer Overflow Checks in BoundedSink Allocation
OPLANE_REQ-00355052
Critical
🟢 ImplementedInput Validation for WAL Commit Timestamp and LSN Advancement
OPLANE_REQ-00355051
High
🟢 ImplementedHeader Field Length and Key Validation in CommitRecord Encoding
OPLANE_REQ-00355053
High
🟢 ImplementedError Handling and Refusal Propagation in WAL Commit Path
OPLANE_REQ-00355054
Medium

Change comment settings · Set up Oplane in your agent · Workflow guidance

@github-actions

Copy link
Copy Markdown

Spec-harness coverage — 🟡

  • 🟡 spec coverage 98.53% — 494 genuine failures (1.47% of the executed scenarios)
  • scenarios run: 33677 (passed 33183, failed 494)
  • bands: 🟢 zero failures · 🟡 failure share ≤ 10% · 🔴 beyond (ADR-0482 §4 — the light never fails the build)
  • suite runtime: 1m 7s
  • neo4j_expected_fail (not counted): 375
  • nondeterministic (not counted): 2
  • skipped (not counted): 2323
  • harness ref: c5c66693bf6011f51fbd8615207f572cac2f0fea
failure category count
error-class-mismatch 196
missing-validation 105
side-effects 51
result-mismatch 33
result-temporal-fidelity 29
syntax-error 28
notification-missing 19
type-error 12
other 10
semantic-error 8
setup-failed-syntax 2
setup-failed-type 1

Rerun spec-harness to refresh. Coverage below 100% never fails the build (ADR-0482 §4).

@github-actions

Copy link
Copy Markdown

Loadtest baselines comparison

Note: loadtest comparison completed with no failing rows.


Loadtest baseline comparison

Frozen baselines vs current reports; bands match the compare-loadtests gate.

Status: ok

Pairs: fraud-loadtest: compared · identity-loadtest: compared

fraud-loadtest

baselines/fraud-loadtest.json → target/fraud-loadtest.json

Metric Baseline PR Δ Status
environment relate-loadtest-baseline/v1 relate-loadtest-baseline/v1 — match
errors 0 0 +0 ok
ops/s 3938.56 4793.86 +855.31 (+21.7%) ok
p99 (worst: search_customer) 7.84 ms 7.49 ms -0.35 ms (-4.5%) ok
logical bytes 17,344,481 17,348,755 +4,274 (+0.0%) ok
Per-use-case p99 latency
Use case ops Baseline p99 PR p99 Δ Status
p2p_transfer 3,857 8.04 ms 7.35 ms -0.69 ms (-8.6%) ok
payroll_scatter 1,100 17.85 ms 13.74 ms -4.11 ms (-23.0%) ok
onboard_customer 888 8.53 ms 7.15 ms -1.39 ms (-16.3%) ok
mule_scatter 810 14.80 ms 9.99 ms -4.81 ms (-32.5%) ok
layering_cycle 878 15.10 ms 9.71 ms -5.39 ms (-35.7%) ok
recent_transfers 2,241 7.65 ms 6.66 ms -1.00 ms (-13.0%) ok
customer_portfolio 1,382 7.37 ms 6.11 ms -1.27 ms (-17.2%) ok
outgoing_volume 1,053 7.48 ms 6.87 ms -0.61 ms (-8.2%) ok
detect_fanout 810 25.78 ms 10.57 ms -15.20 ms (-59.0%) ok
detect_cycle 807 7.55 ms 6.61 ms -0.94 ms (-12.5%) ok
activity_page 1,106 7.48 ms 6.64 ms -0.84 ms (-11.2%) ok
search_customer 846 7.84 ms 7.49 ms -0.35 ms (-4.5%) ok
counterparties 1,172 7.45 ms 6.45 ms -1.00 ms (-13.5%) ok
payment_path 823 7.47 ms 7.06 ms -0.41 ms (-5.5%) ok
amount_band 839 7.30 ms 6.82 ms -0.48 ms (-6.6%) ok
flag_account 717 8.21 ms 7.31 ms -0.90 ms (-10.9%) ok
reverse_last_out 671 8.04 ms 7.07 ms -0.97 ms (-12.1%) ok

identity-loadtest

baselines/identity-loadtest.json → target/identity-loadtest.json

Metric Baseline PR Δ Status
environment relate-loadtest-baseline/v1 relate-loadtest-baseline/v1 — match
errors 0 0 +0 ok
ops/s 573.51 782.07 +208.57 (+36.4%) ok
p99 (worst: revoke_membership) 8.10 ms 7.72 ms -0.38 ms (-4.7%) ok
logical bytes 7,167,614 7,166,837 -777 (-0.0%) ok
Per-use-case p99 latency
Use case ops Baseline p99 PR p99 Δ Status
provision_user 1,373 11.00 ms 9.28 ms -1.72 ms (-15.6%) ok
add_to_group 1,775 18.57 ms 14.35 ms -4.22 ms (-22.7%) ok
grant_role 1,079 18.52 ms 14.85 ms -3.66 ms (-19.8%) ok
attach_device 907 18.88 ms 15.74 ms -3.14 ms (-16.6%) ok
nested_grant 736 19.41 ms 14.84 ms -4.57 ms (-23.5%) ok
effective_access 2,173 25.25 ms 17.38 ms -7.87 ms (-31.2%) ok
org_walk 1,387 19.94 ms 13.75 ms -6.18 ms (-31.0%) ok
optional_manager 1,312 20.00 ms 15.33 ms -4.67 ms (-23.3%) ok
detect_nested_admin 810 19.97 ms 14.67 ms -5.31 ms (-26.6%) ok
detect_sod 817 19.60 ms 14.76 ms -4.84 ms (-24.7%) ok
stale_grants 827 15.06 ms 10.05 ms -5.01 ms (-33.3%) ok
search_directory 1,147 10.91 ms 8.87 ms -2.04 ms (-18.7%) ok
group_roster 1,047 7.72 ms 7.07 ms -0.64 ms (-8.3%) ok
access_review 801 20.02 ms 13.23 ms -6.79 ms (-33.9%) ok
reporting_path 794 30.98 ms 19.77 ms -11.21 ms (-36.2%) ok
disable_user 644 19.50 ms 13.34 ms -6.16 ms (-31.6%) ok
add_alias 710 19.99 ms 14.62 ms -5.36 ms (-26.8%) ok
revoke_membership 674 8.10 ms 7.72 ms -0.38 ms (-4.7%) ok
detach_device 538 14.79 ms 10.00 ms -4.80 ms (-32.4%) ok
clear_expiry 449 17.39 ms 12.54 ms -4.85 ms (-27.9%) ok

@github-actions

Copy link
Copy Markdown

Memory controls and workspace memory calibration

Warning: memory controls reported mixed.


Memory controls and workspace memory calibration

Status: mixed

sort — max_cgroup_to_logical_ratio

Verdict: improvement

Given: a fresh server per observation, admission on, a hold of 2500 ms, and 1 repeats. Families: sort, expand, aggregation, distinct, and create.

When: each observation parks its sessions on RETURN 1, then holds one workspace family at the target reservation. The shapes are one holder at 1.00 MB, 4.00 MB, and 16.00 MB, then the same 16.00 MB across two and four holders.

Then: each observation records VmRSS and cgroup deltas against the live held logical bytes. The child stays alive.

Outcome: Expected cgroup ratio 0.999x–1.082x. A reading may sit 5% outside that range. Measured 1.25 MB, ratio 0.907x.

Investigate whether this improvement is a false positive. When it is real, re-freeze the envelope with the create-loadtest-baselines workflow.

expand — max_rss_to_logical_ratio

Verdict: improvement

Given: a fresh server per observation, admission on, a hold of 2500 ms, and 1 repeats. Families: sort, expand, aggregation, distinct, and create.

When: each observation parks its sessions on RETURN 1, then holds one workspace family at the target reservation. The shapes are one holder at 1.00 MB, 4.00 MB, and 16.00 MB, then the same 16.00 MB across two and four holders.

Then: each observation records VmRSS and cgroup deltas against the live held logical bytes. The child stays alive.

Outcome: Expected RSS ratio 2.099x–2.147x. A reading may sit 5% outside that range. Measured 2.15 MB, ratio 1.009x.

Investigate whether this improvement is a false positive. When it is real, re-freeze the envelope with the create-loadtest-baselines workflow.

expand — max_cgroup_to_logical_ratio

Verdict: improvement

Given: a fresh server per observation, admission on, a hold of 2500 ms, and 1 repeats. Families: sort, expand, aggregation, distinct, and create.

When: each observation parks its sessions on RETURN 1, then holds one workspace family at the target reservation. The shapes are one holder at 1.00 MB, 4.00 MB, and 16.00 MB, then the same 16.00 MB across two and four holders.

Then: each observation records VmRSS and cgroup deltas against the live held logical bytes. The child stays alive.

Outcome: Expected cgroup ratio 2.072x–2.215x. A reading may sit 5% outside that range. Measured 34.00 MB, ratio 1.000x.

Investigate whether this improvement is a false positive. When it is real, re-freeze the envelope with the create-loadtest-baselines workflow.

aggregation — max_rss_to_logical_ratio

Verdict: regression

Given: a fresh server per observation, admission on, a hold of 2500 ms, and 1 repeats. Families: sort, expand, aggregation, distinct, and create.

When: each observation parks its sessions on RETURN 1, then holds one workspace family at the target reservation. The shapes are one holder at 1.00 MB, 4.00 MB, and 16.00 MB, then the same 16.00 MB across two and four holders.

Then: each observation records VmRSS and cgroup deltas against the live held logical bytes. The child stays alive.

Outcome: Expected RSS ratio 1.317x–1.395x. A reading may sit 5% outside that range. Measured 2.58 MB, ratio 1.497x.

This reading is above the frozen envelope. The compare warns and the job stays green until a new envelope is taken.

distinct — max_rss_to_logical_ratio

Verdict: regression

Given: a fresh server per observation, admission on, a hold of 2500 ms, and 1 repeats. Families: sort, expand, aggregation, distinct, and create.

When: each observation parks its sessions on RETURN 1, then holds one workspace family at the target reservation. The shapes are one holder at 1.00 MB, 4.00 MB, and 16.00 MB, then the same 16.00 MB across two and four holders.

Then: each observation records VmRSS and cgroup deltas against the live held logical bytes. The child stays alive.

Outcome: Expected RSS ratio 1.256x–1.322x. A reading may sit 5% outside that range. Measured 2.50 MB, ratio 1.451x.

This reading is above the frozen envelope. The compare warns and the job stays green until a new envelope is taken.

distinct — max_cgroup_to_logical_ratio

Verdict: regression

Given: a fresh server per observation, admission on, a hold of 2500 ms, and 1 repeats. Families: sort, expand, aggregation, distinct, and create.

When: each observation parks its sessions on RETURN 1, then holds one workspace family at the target reservation. The shapes are one holder at 1.00 MB, 4.00 MB, and 16.00 MB, then the same 16.00 MB across two and four holders.

Then: each observation records VmRSS and cgroup deltas against the live held logical bytes. The child stays alive.

Outcome: Expected cgroup ratio 1.098x–1.152x. A reading may sit 5% outside that range. Measured 2.25 MB, ratio 1.306x.

This reading is above the frozen envelope. The compare warns and the job stays green until a new envelope is taken.

@github-actions

Copy link
Copy Markdown

Memory shape

Note: loadtest comparison completed with no failing rows.


Memory shape

Status: ok

All memory shapes held. 🟢

base

Given: an empty relate serve, 1 integer properties on every node, text indexes 0, point indexes 0, range indexes 0, and a 32.00 MB logical ceiling.

When: the base shape is loaded to 0 nodes and 0 relationships, then checkpointed. The child RSS is sampled.

Then: the database holds those counts. The load finishes under the ceiling. Logical bytes, disk, attributed RSS, and the ratio stay inside the frozen boundaries.

Baseline: logical 0.00 MB – 0.00 MB, disk 0.00 MB – 0.00 MB, attributed RSS 0.00 MB – 0.00 MB, ratio 0.000x–0.000x. A reading may sit 5% outside the ratio, and 15% or 1.00 MB outside the sizes.

Validated: logical 0.00 MB, disk 0.00 MB, attributed RSS 0.00 MB, ratio 0.000x.

Report: logical, disk, attributed RSS, and the ratio held.

flat

Given: an empty relate serve, 1 integer properties on every node, text indexes 0, point indexes 0, range indexes 0, and a 32.00 MB logical ceiling.

When: the flat shape is loaded to 120000 nodes and 0 relationships, then checkpointed. The child RSS is sampled.

Then: the database holds those counts. The load finishes under the ceiling. Logical bytes, disk, attributed RSS, and the ratio stay inside the frozen boundaries.

Baseline: logical 26.02 MB – 26.02 MB, disk 1.95 MB – 1.95 MB, attributed RSS 36.49 MB – 36.93 MB, ratio 1.402x–1.419x. A reading may sit 5% outside the ratio, and 15% or 1.00 MB outside the sizes.

Validated: logical 26.02 MB, disk 1.26 MB, attributed RSS 37.75 MB, ratio 1.451x.

Report: logical, disk, attributed RSS, and the ratio held.

fanout

Given: an empty relate serve, 1 integer properties on every node, text indexes 0, point indexes 0, range indexes 0, and a 32.00 MB logical ceiling.

When: the fanout shape is loaded to 52016 nodes and 52000 relationships, then checkpointed. The child RSS is sampled.

Then: the database holds those counts. The load finishes under the ceiling. Logical bytes, disk, attributed RSS, and the ratio stay inside the frozen boundaries.

Baseline: logical 28.62 MB – 28.62 MB, disk 1.75 MB – 1.75 MB, attributed RSS 34.93 MB – 36.61 MB, ratio 1.220x–1.279x. A reading may sit 5% outside the ratio, and 15% or 1.00 MB outside the sizes.

Validated: logical 28.62 MB, disk 1.10 MB, attributed RSS 35.81 MB, ratio 1.251x.

Report: logical, disk, attributed RSS, and the ratio held.

ring

Given: an empty relate serve, 1 integer properties on every node, text indexes 0, point indexes 0, range indexes 0, and a 32.00 MB logical ceiling.

When: the ring shape is loaded to 46000 nodes and 46000 relationships, then checkpointed. The child RSS is sampled.

Then: the database holds those counts. The load finishes under the ceiling. Logical bytes, disk, attributed RSS, and the ratio stay inside the frozen boundaries.

Baseline: logical 29.99 MB – 29.99 MB, disk 1.77 MB – 1.77 MB, attributed RSS 35.30 MB – 35.89 MB, ratio 1.177x–1.197x. A reading may sit 5% outside the ratio, and 15% or 1.00 MB outside the sizes.

Validated: logical 29.99 MB, disk 1.20 MB, attributed RSS 36.20 MB, ratio 1.207x.

Report: logical, disk, attributed RSS, and the ratio held.

dense ring

Given: an empty relate serve, 1 integer properties on every node, text indexes 0, point indexes 0, range indexes 0, and a 32.00 MB logical ceiling.

When: the dense ring shape is loaded to 5000 nodes and 100000 relationships, then checkpointed. The child RSS is sampled.

Then: the database holds those counts. The load finishes under the ceiling. Logical bytes, disk, attributed RSS, and the ratio stay inside the frozen boundaries.

Baseline: logical 31.41 MB – 31.41 MB, disk 1.62 MB – 1.62 MB, attributed RSS 31.27 MB – 32.46 MB, ratio 0.996x–1.034x. A reading may sit 5% outside the ratio, and 15% or 1.00 MB outside the sizes.

Validated: logical 31.41 MB, disk 0.73 MB, attributed RSS 31.72 MB, ratio 1.010x.

Report: logical, disk, attributed RSS, and the ratio held.

@jexp
jexp merged commit d79a221 into main Nov 11, 2026
76 of 78 checks passed
@jexp
jexp deleted the labs-1292-structure branch November 11, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant