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
Refs #2388 (fixture-reduction PR; the stress-policy change comes separately per the issue).
What changed
Sandbox-boundary capacity test (sqlite-session-metadata-store.test.ts): each expansion request now carries 15 near-MAX_SANDBOX_BOUNDARY_PATH_CHARS paths instead of 32 shorter ones. Per-request serialized size stays near MAX_SANDBOX_BOUNDARY_SERIALIZED_BYTES (the fewest settles that can cross the 1 MiB execution-boundary cap), but each settle's boundary rescan now walks less than half the accumulated entries.
Legacy Plan ledger fixture (sqlite-workflow-store.test.ts): seedLegacyPlanLedger now exceeds each projection bound by just enough to force truncation — 4 steps (enough to push the shared text budget below the asserted 4,000 bytes), 51 files > PLAN_MAX_FILES_PER_STEP, 21 risks > PLAN_MAX_RISKS, 31-char titles > PLAN_STEP_TITLE_MAX_CHARS — instead of ~500KB of near-max fields per ledger event.
What deliberately did not change
Assertions: every truncation/atomicity/persisted-state assertion is untouched; the fixtures still cross every asserted boundary.
Catalog capacity test: already minimal — each connection sits at CONNECTION_CATALOG_MAX_ENABLED_MODEL_IDS × CONNECTION_MODEL_ID_MAX_LENGTH (~262KB), so ~16 commits is the floor for crossing the 4 MiB document cap.
Vault capacity test: already minimal — secrets are at MAX_SECRET_LENGTH (64 KiB), and the provider auth contract (coordinator.ts) requires one connection per stored secret (oauth_token is github-copilot-only), so 32 commits is the floor for the 2 MiB cap.
All three capacity loops break on first rejection, so their loop caps were never a cost driver.
Timing (Apple Silicon, node --test per file)
Test
Before
After
rejects an expansion atomically before the complete boundary exceeds capacity
2,495ms
1,171ms
projects a pre-bound legacy Plan ledger into the bounded Host contract
517ms
118ms
requires a projected legacy proposal to be revised or abandoned
114ms
41ms
Full @maka/storage suite: 766 tests, 754 pass / 12 skipped / 0 fail before and after. Suite wall time is bounded by the slowest test file, so the win shows up as ~3.8s less per-file CPU rather than lower end-to-end wall time.
…al crossings
Refs apache#2388.
The sandbox-boundary capacity test now reaches MAX_EXECUTION_BOUNDARY_SERIALIZED_BYTES
with 15 near-max-length paths per request instead of 32 shorter ones — same
per-request byte size, less than half the accumulated entries each settle has
to rescan (2,495ms -> 1,171ms).
The legacy Plan ledger fixture now exceeds each projection bound by just
enough to force truncation (4 steps, 51 files, 21 risks, 31-char step titles)
instead of ~500KB of near-max fields per event (517ms -> 118ms, 114ms -> 41ms).
The catalog and vault capacity tests are unchanged: their per-item sizes
already sit at CONNECTION_CATALOG_MAX_ENABLED_MODEL_IDS x
CONNECTION_MODEL_ID_MAX_LENGTH and MAX_SECRET_LENGTH, and the provider auth
contract requires one connection per stored secret, so their commit counts are
already the minimum that crosses the aggregate byte limits.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ac5rv6WUKWtMZgQb5QPN16
The reason will be displayed to describe this comment to others. Learn more.
Thanks — this keeps the important capacity, atomicity, persistence, and truncation assertions intact while materially reducing fixture amplification. The direction is sound and CI is green.
Two non-blocking P3 notes:
The legacy Plan fixture can be reduced from four steps to three and still cross the shared text budget while preserving the existing files, risks, title, and truncation assertions.
The sandbox-boundary comment overstates “fewest settles”: 16 near-max paths still fit below the per-request cap and cross the aggregate boundary one settle earlier. Since #2388 originally marked this capacity test as already minimal, it may be worth either tightening the fixture/wording or leaving that hunk unchanged in a follow-up.
Neither point weakens the current assertions or blocks this improvement. Approved.
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
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.
Refs #2388 (fixture-reduction PR; the stress-policy change comes separately per the issue).
What changed
Sandbox-boundary capacity test (
sqlite-session-metadata-store.test.ts): each expansion request now carries 15 near-MAX_SANDBOX_BOUNDARY_PATH_CHARSpaths instead of 32 shorter ones. Per-request serialized size stays nearMAX_SANDBOX_BOUNDARY_SERIALIZED_BYTES(the fewest settles that can cross the 1 MiB execution-boundary cap), but each settle's boundary rescan now walks less than half the accumulated entries.Legacy Plan ledger fixture (
sqlite-workflow-store.test.ts):seedLegacyPlanLedgernow exceeds each projection bound by just enough to force truncation — 4 steps (enough to push the shared text budget below the asserted 4,000 bytes), 51 files >PLAN_MAX_FILES_PER_STEP, 21 risks >PLAN_MAX_RISKS, 31-char titles >PLAN_STEP_TITLE_MAX_CHARS— instead of ~500KB of near-max fields per ledger event.What deliberately did not change
CONNECTION_CATALOG_MAX_ENABLED_MODEL_IDS×CONNECTION_MODEL_ID_MAX_LENGTH(~262KB), so ~16 commits is the floor for crossing the 4 MiB document cap.MAX_SECRET_LENGTH(64 KiB), and the provider auth contract (coordinator.ts) requires one connection per stored secret (oauth_tokenis github-copilot-only), so 32 commits is the floor for the 2 MiB cap.Timing (Apple Silicon, node --test per file)
Full
@maka/storagesuite: 766 tests, 754 pass / 12 skipped / 0 fail before and after. Suite wall time is bounded by the slowest test file, so the win shows up as ~3.8s less per-file CPU rather than lower end-to-end wall time.Co-Authored-By: Claude noreply@anthropic.com
https://claude.ai/code/session_01Ac5rv6WUKWtMZgQb5QPN16