Skip to content

feat: dynamic chunkindex shard prefix#111

Open
woutervanranst wants to merge 27 commits into
masterfrom
dynamic-shard-prefix
Open

feat: dynamic chunkindex shard prefix#111
woutervanranst wants to merge 27 commits into
masterfrom
dynamic-shard-prefix

Conversation

@woutervanranst

@woutervanranst woutervanranst commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • add dynamic chunk-index shard prefix length support with parent-wins lookup and shard split behavior
  • add raw name-prefix blob listing support needed by shard traversal
  • include related tests, docs, and follow-up fixes currently stacked on this branch

Testing

  • not run in this PR creation step

Summary by CodeRabbit

  • New Features

    • Added dynamic chunk-index shard splitting with configurable size thresholds to optimize storage and lookup performance.
    • Introduced configurable prefix handling for blob listing operations.
  • Documentation

    • Updated AGENTS.md with new guidance for feature constraints and abstraction standards.
    • Updated README.md Windows installation instructions for clarity.
    • Revised cache documentation to describe variable-length shard partitioning, parent-wins read rules, and dynamic cache validation behavior.
  • Refactor

    • Redesigned chunk-index routing to support hierarchical shard layouts with automatic splitting and repair.
    • Updated local cache coverage model to support variable-length prefixes with snapshot-based validation.
  • Tests

    • Added comprehensive test coverage for shard-split scenarios, interrupted splits, and layout rebalancing.

woutervanranst and others added 9 commits June 16, 2026 07:10
Azure blob name prefixes for chunk-index shards are not segment-aligned
(chunk-index/aa must match aa, aa0, aa3f). The existing ListAsync appends
a trailing slash, so add ListAsync(directory, namePrefix) with a default
client-side-filter implementation, a native Azure override, a recording
override on the in-memory fake, and a ChunkIndexLists counter on the
counting decorator.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Shards start at the 2-char prefix layout and split 16-way by the next hex
char when they exceed MaxShardEntryCount (10k) at flush time, recursively
and unevenly per subtree. Only non-empty shards are written; the layout is
self-describing from blob existence.

- Routing: parent-wins walk — the shallowest existing shard on a hash's
  prefix path is authoritative; a crashed split leaves the parent intact
  and unpublished children shadowed, so reads stay correct at every crash
  point and a flush retry re-splits and converges.
- Lookup: per-root coverage claims in loaded_prefixes (validated at the
  latest snapshot, zero remote calls when warm); cold path = one subtree
  listing per root deciding empty-vs-descend, etag revalidation from the
  listed etag (no download).
- Flush: per-root gates; split uploads all non-empty leaves before
  deleting the parent and stale blobs in its range.
- Repair: recomputes a balanced layout from staged entries (splits and
  coarsens); stale-shard deletion unchanged.
- Local store schema v2: entries keyed by content_hash BLOB ranges (no
  routed prefix column), recreate-on-version-mismatch, non-overlapping
  coverage claims.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lance

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…load

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ShardSerializer.Deserialize and SerializeAsync now require an
ICompressionService argument (added by the zstd branch). ChunkIndexService
and SnapshotService constructors also gained a compression parameter.
Tests added by the dynamic-shard-prefix branch were written against the
pre-zstd signatures; this commit threads TestCompression.Instance through
all the affected call sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Replaces the fixed 2-hex-character chunk-index shard layout with a variable-depth dynamic scheme. IBlobContainerService.ListAsync gains a BlobListPrefixKind parameter. ChunkIndexRouter adds root-prefix derivation, parent-wins target resolution, recursive leaf partitioning, and SQLite range-bound helpers. ChunkIndexLocalStore drops the stored prefix column and adds range-query APIs. ChunkIndexService rewrites lookup, flush, and repair to operate on root subtrees with configurable split thresholds. All fake implementations and tests are updated to match.

Changes

Dynamic chunk-index shard partitioning

Layer / File(s) Summary
IBlobContainerService listing contract and AzureBlob implementation
src/Arius.Core/Shared/Storage/IBlobContainerService.cs, src/Arius.AzureBlob/AzureBlobContainerService.cs
Adds BlobListPrefixKind enum (DirectoryPrefix, BlobNamePrefix) to IBlobContainerService, makes ListAsync accept optional prefixKind and optional includeMetadata. AzureBlobContainerService derives the blob prefix string by switching on prefixKind.
ChunkIndexRouter expansion and Shard.PrefixOf removal
src/Arius.Core/Shared/ChunkIndex/ChunkIndexRouter.cs, src/Arius.Core/Shared/ChunkIndex/Shard.cs
Introduces ShardTarget record struct; replaces GetLeafPrefix with GetRootPrefix; adds ResolveTarget (parent-wins shallowest-shard walk), PartitionIntoLeaves (recursive threshold split), GetHashRangeBounds (SQLite BLOB range bounds), and GetChildPrefixes. Removes Shard.PrefixOf.
ChunkIndexLocalStore schema overhaul and new range-query APIs
src/Arius.Core/Shared/ChunkIndex/ChunkIndexLocalStore.cs
Drops the stored prefix column from chunk_index_entries; switches deletion from prefix-equality to content_hash BETWEEN lower AND upper; adds FindCoveredPrefixes, GetRootsWithPendingFlushes, GetPendingFlushHashes, ReadRangeEntries, CountRangeEntries; renames GetStoredPrefixes to GetStoredRootPrefixes; adds partial index for pending_flush = 1 and index on loaded_prefixes(snapshot_version, prefix); rewrites UpsertLoadedPrefix overlap removal to use substring prefix-length hierarchy.
ChunkIndexService rewrite: root-gated lookup, shard split flush, and repair rebalancing
src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs
Adds MinShardPrefixLength/MaxShardEntryCount constants and configurable maxShardEntryCount constructor parameter. Rewrites batch/single LookupAsync to group by root prefix and use EnsureCoverageForHashesAsync/EnsureCoverageCoreAsync (subtree LIST, ETag-revalidate, download, one retry). Rewrites FlushAsync/FlushRootAsync to flush by root subtree; adds SplitShardAsync (upload leaf children, delete parent and stale blobs). Updates RepairAsync layout planning with CollectLeaves using CountRangeEntries.
FakeInMemoryBlobContainerService tracking and ListAsync signature propagation
src/Arius.Tests.Shared/Storage/FakeInMemoryBlobContainerService.cs, src/Arius.Core.Tests/Fakes/*, src/Arius.Core.Tests/Shared/ChunkStorage/Fakes/*, src/Arius.Core.Tests/Shared/FileTree/Fakes/*, src/Arius.Explorer/Infrastructure/RepositorySession.cs, src/Arius.Integration.Tests/...
FakeInMemoryBlobContainerService gains ListedNamePrefixes queue and ClearListedNamePrefixes(). All fake/stub/decorator ListAsync signatures are updated to accept and forward prefixKind. FaultingChunkIndexUploadBlobContainerService gains AllowedChunkIndexUploads and an atomic attempt counter. CountingBlobContainerService gains ChunkIndexLists counter.
ChunkIndexRouter and ChunkIndexLocalStore unit tests
src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexRouterTests.cs, src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexLocalStoreTests.cs, src/Arius.Core.Tests/Shared/ChunkIndex/ShardTests.cs, src/Arius.Core.Tests/Shared/Storage/FakeInMemoryBlobContainerServiceTests.cs
New ChunkIndexRouterTests covers ResolveTarget, PartitionIntoLeaves, and GetHashRangeBounds. ChunkIndexLocalStoreTests updates prefix derivation throughout and adds tests for odd-nibble range filtering, root-range pending flush/hash filtering, FindCoveredPrefixes coverage semantics, and upsert overlap resolution. ShardTests renames prefix test. FakeInMemoryBlobContainerServiceTests adds raw-name-prefix and default-interface-implementation tests.
ChunkIndexService lookup, flush, repair, and archive-scenario unit tests
src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexService*Tests.cs, src/Arius.Core.Tests/Features/...
ChunkIndexServiceLookupTests updates all shard path derivations and adds three split-layout tests. ChunkIndexServiceFlushTests adds five shard-split tests (threshold split, recursive split, interrupted-split PARENT-WINS+retry, empty child range, stale-foreign-child deletion). ChunkIndexServiceRepairTests adds two layout-rebalancing tests. ChunkIndexServiceArchiveScenarioTests replaces download-count assertions with LIST/ListedNamePrefixes assertions. ArchiveRecoveryTests and RestoreCommandHandlerTests update blob path derivation.
Integration tests, handler logging, and documentation
src/Arius.Integration.Tests/ChunkIndex/..., src/Arius.Core/Features/*/..., docs/cache.md, AGENTS.md, README.md, src/Arius.Tests.Shared/Hashes/HashTestData.cs
Integration tests add an Azurite-backed shard-split round-trip test and ChunkIndexLists assertions. ArchiveCommandHandler logs before cache invalidation. ListQueryHandler adds debug/info logs at snapshot resolution and BFS walk. docs/cache.md documents dynamic sharding, updated LookupAsync/FlushAsync flowcharts. AGENTS.md adds Fable 5 guidance and revised shard terminology. README.md removes PowerShell code fence. HashTestData updates SHA-256 payload to UTF-8.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant ChunkIndexService
  participant ChunkIndexRouter
  participant ChunkIndexLocalStore
  participant BlobContainer

  rect rgba(70, 130, 180, 0.5)
    Note over Caller,BlobContainer: LookupAsync (root-gated)
    Caller->>ChunkIndexService: LookupAsync(hashes)
    ChunkIndexService->>ChunkIndexRouter: GetRootPrefix(hash)
    ChunkIndexService->>ChunkIndexLocalStore: FindCoveredPrefixes(root, hashes, snapshot)
    ChunkIndexService->>BlobContainer: ListAsync(chunk-index/root, BlobNamePrefix)
    ChunkIndexService->>ChunkIndexRouter: ResolveTarget(existingShards, hash)
    ChunkIndexService->>BlobContainer: DownloadAsync(shard blob)
    ChunkIndexService->>ChunkIndexLocalStore: UpdatePrefix / AddEmptyPrefix
    ChunkIndexService-->>Caller: hits map
  end

  rect rgba(60, 179, 113, 0.5)
    Note over Caller,BlobContainer: FlushAsync (split-aware)
    Caller->>ChunkIndexService: FlushAsync()
    ChunkIndexService->>ChunkIndexLocalStore: GetRootsWithPendingFlushes()
    ChunkIndexService->>ChunkIndexLocalStore: CountRangeEntries(prefix)
    alt count <= MaxShardEntryCount
      ChunkIndexService->>BlobContainer: UploadAsync(merged shard)
    else count > MaxShardEntryCount
      ChunkIndexService->>BlobContainer: UploadAsync(leaf child shards)
      ChunkIndexService->>BlobContainer: DeleteAsync(parent + stale children)
    end
    ChunkIndexService->>ChunkIndexLocalStore: MarkPendingFlushesSynchronized(ETags)
    ChunkIndexService-->>Caller: done
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • woutervanranst/Arius7#106: Touches ListQueryHandler BFS walk logic, which this PR extends with additional structured logging at snapshot resolution and per-directory traversal.
  • woutervanranst/Arius7#69: Refactors chunk-index APIs to typed ContentHash/ChunkHash; this PR then removes Shard.PrefixOf (introduced or used there) and replaces it with ChunkIndexRouter.GetRootPrefix as part of dynamic sharding.
  • woutervanranst/Arius7#19: Propagates Azure blob Content-Type headers during uploads, which intersects with the ChunkIndexService shard upload path modified in this PR.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dynamic-shard-prefix

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.95402% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.00%. Comparing base (b4009f7) to head (3eeb957).

Files with missing lines Patch % Lines
.../Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs 92.18% 8 Missing and 2 partials ⚠️
...ius.Core/Shared/ChunkIndex/ChunkIndexLocalStore.cs 91.83% 7 Missing and 1 partial ⚠️
src/Arius.AzureBlob/AzureBlobContainerService.cs 71.42% 1 Missing and 1 partial ⚠️
...Arius.Explorer/Infrastructure/RepositorySession.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
+ Coverage   80.77%   81.00%   +0.22%     
==========================================
  Files          99       99              
  Lines        6340     6516     +176     
  Branches      852      886      +34     
==========================================
+ Hits         5121     5278     +157     
- Misses        986     1001      +15     
- Partials      233      237       +4     
Flag Coverage Δ
linux 83.77% <92.30%> (+0.16%) ⬆️
windows 79.95% <91.95%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/Arius.Core/Features/ArchiveCommand/ArchiveCommandHandler.cs (1)

254-254: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Resolve the unresolved TODO flagged by CI.

Line 254 is still carrying a TODO marker (S1135). Either implement the channel options now or replace this with a tracked issue reference to keep warnings actionable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Arius.Core/Features/ArchiveCommand/ArchiveCommandHandler.cs` at line 254,
The Channel.CreateBounded call in the ArchiveCommandHandler constructor at line
254 has an unresolved TODO comment about specifying channel options like
SingleWriter or MultipleReader. Either implement the specific
BoundedChannelOptions with appropriate SingleReader, SingleWriter, and other
relevant properties based on how the filePairChannel is used throughout the
code, or replace the TODO comment with a tracked issue reference in the format
of your tracking system (e.g., a Jira ticket, GitHub issue) to keep the warning
actionable and avoid CI failures from unresolved TODOs.

Source: Pipeline failures

🧹 Nitpick comments (1)
src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs (1)

18-22: TODO: Restore production threshold before merge.

The constant is currently set to 16 for testing, with the production value 10_000 noted in the TODO comment. This should be restored before the PR leaves draft status.

Would you like me to create an issue to track restoring the production threshold?

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs` around lines 18 - 22,
The MaxShardEntryCount constant in the ChunkIndexService class is currently set
to the test value of 16 instead of the production value of 10_000. Change the
MaxShardEntryCount value from 16 to 10_000 and remove the TODO comment that
indicates this is a temporary test value, ensuring the production threshold is
restored before merging.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/Arius.Core.Tests/Shared/Storage/FakeInMemoryBlobContainerServiceTests.cs`:
- Around line 46-76: Extract the PassthroughBlobContainerService class from the
test file and move it to a dedicated file in a local Fakes/ subfolder next to
the test file, following the coding guideline that scenario-specific test
doubles should be in a Fakes/ subfolder rather than nested within the test file
itself. Update the test class FakeInMemoryBlobContainerServiceTests to reference
the moved PassthroughBlobContainerService from its new location.

---

Outside diff comments:
In `@src/Arius.Core/Features/ArchiveCommand/ArchiveCommandHandler.cs`:
- Line 254: The Channel.CreateBounded call in the ArchiveCommandHandler
constructor at line 254 has an unresolved TODO comment about specifying channel
options like SingleWriter or MultipleReader. Either implement the specific
BoundedChannelOptions with appropriate SingleReader, SingleWriter, and other
relevant properties based on how the filePairChannel is used throughout the
code, or replace the TODO comment with a tracked issue reference in the format
of your tracking system (e.g., a Jira ticket, GitHub issue) to keep the warning
actionable and avoid CI failures from unresolved TODOs.

---

Nitpick comments:
In `@src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs`:
- Around line 18-22: The MaxShardEntryCount constant in the ChunkIndexService
class is currently set to the test value of 16 instead of the production value
of 10_000. Change the MaxShardEntryCount value from 16 to 10_000 and remove the
TODO comment that indicates this is a temporary test value, ensuring the
production threshold is restored before merging.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8fbafec5-dbec-4362-93e2-f0173113f357

📥 Commits

Reviewing files that changed from the base of the PR and between b4009f7 and e6d1506.

📒 Files selected for processing (41)
  • AGENTS.md
  • README.md
  • docs/cache.md
  • src/Arius.AzureBlob/AzureBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FakeMetadataOnlyBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FakeRecordingBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FakeSeededBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FaultingChunkIndexUploadBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/ThrowOnCreateBlobContainerService.cs
  • src/Arius.Core.Tests/Features/ArchiveCommand/ArchiveRecoveryTests.cs
  • src/Arius.Core.Tests/Features/RestoreCommand/RestoreCommandHandlerTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexLocalStoreTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexRouterTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceArchiveScenarioTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceFlushTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceLookupTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceRepairTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ShardTests.cs
  • src/Arius.Core.Tests/Shared/ChunkStorage/Fakes/BlobAlreadyExistsOnSetMetadataOnceBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/ChunkStorage/Fakes/BlockingDeleteBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/ChunkStorage/Fakes/ContentTypeCapturingBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/BlockingFileTreeUploadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/FaultingAndBlockingFileTreeUploadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/SlowDownloadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/ThrowingDownloadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/UnsortedSnapshotBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/Storage/FakeInMemoryBlobContainerServiceTests.cs
  • src/Arius.Core/Features/ArchiveCommand/ArchiveCommandHandler.cs
  • src/Arius.Core/Features/ListQuery/ListQueryHandler.cs
  • src/Arius.Core/Shared/ChunkIndex/ChunkIndexLocalStore.cs
  • src/Arius.Core/Shared/ChunkIndex/ChunkIndexRouter.cs
  • src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs
  • src/Arius.Core/Shared/ChunkIndex/Shard.cs
  • src/Arius.Core/Shared/Storage/IBlobContainerService.cs
  • src/Arius.Explorer/Infrastructure/RepositorySession.cs
  • src/Arius.Integration.Tests/ChunkIndex/ChunkIndexServiceArchiveScenarioTests.cs
  • src/Arius.Integration.Tests/ChunkIndex/Fakes/CountingBlobContainerService.cs
  • src/Arius.Integration.Tests/Pipeline/Fakes/FaultingBlobService.cs
  • src/Arius.Integration.Tests/Pipeline/Fakes/RehydrationSimulatingBlobService.cs
  • src/Arius.Tests.Shared/Hashes/HashTestData.cs
  • src/Arius.Tests.Shared/Storage/FakeInMemoryBlobContainerService.cs
💤 Files with no reviewable changes (1)
  • src/Arius.Core/Shared/ChunkIndex/Shard.cs

@woutervanranst woutervanranst marked this pull request as ready for review June 16, 2026 17:45
@woutervanranst

Copy link
Copy Markdown
Owner Author

@CodeRabbit do a full review on this PR

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@woutervanranst Sure! I'll kick off a full review of this PR right away.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs (1)

19-19: ⚡ Quick win

TODO needs resolution before release.

The MaxShardEntryCount = 16 is clearly a test value. The comment indicates it should be 10_000 for production. This will cause excessive shard splitting in production if not addressed.

Do you want me to help track this as a separate issue, or is this intentionally set low for the current testing phase?

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs` at line 19, The
MaxShardEntryCount constant in ChunkIndexService.cs is set to a test value of 16
instead of the production value of 10_000 as indicated in the TODO comment.
Change the MaxShardEntryCount constant from 16 to 10_000 and remove the TODO
comment, as this test value will cause excessive shard splitting in production
environments if left unresolved.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs`:
- Line 19: The MaxShardEntryCount constant in ChunkIndexService.cs is set to a
test value of 16 instead of the production value of 10_000 as indicated in the
TODO comment. Change the MaxShardEntryCount constant from 16 to 10_000 and
remove the TODO comment, as this test value will cause excessive shard splitting
in production environments if left unresolved.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 51eda737-a443-4203-b313-6514bc0656d3

📥 Commits

Reviewing files that changed from the base of the PR and between b4009f7 and e6d1506.

📒 Files selected for processing (41)
  • AGENTS.md
  • README.md
  • docs/cache.md
  • src/Arius.AzureBlob/AzureBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FakeMetadataOnlyBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FakeRecordingBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FakeSeededBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/FaultingChunkIndexUploadBlobContainerService.cs
  • src/Arius.Core.Tests/Fakes/ThrowOnCreateBlobContainerService.cs
  • src/Arius.Core.Tests/Features/ArchiveCommand/ArchiveRecoveryTests.cs
  • src/Arius.Core.Tests/Features/RestoreCommand/RestoreCommandHandlerTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexLocalStoreTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexRouterTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceArchiveScenarioTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceFlushTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceLookupTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ChunkIndexServiceRepairTests.cs
  • src/Arius.Core.Tests/Shared/ChunkIndex/ShardTests.cs
  • src/Arius.Core.Tests/Shared/ChunkStorage/Fakes/BlobAlreadyExistsOnSetMetadataOnceBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/ChunkStorage/Fakes/BlockingDeleteBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/ChunkStorage/Fakes/ContentTypeCapturingBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/BlockingFileTreeUploadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/FaultingAndBlockingFileTreeUploadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/SlowDownloadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/ThrowingDownloadBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/FileTree/Fakes/UnsortedSnapshotBlobContainerService.cs
  • src/Arius.Core.Tests/Shared/Storage/FakeInMemoryBlobContainerServiceTests.cs
  • src/Arius.Core/Features/ArchiveCommand/ArchiveCommandHandler.cs
  • src/Arius.Core/Features/ListQuery/ListQueryHandler.cs
  • src/Arius.Core/Shared/ChunkIndex/ChunkIndexLocalStore.cs
  • src/Arius.Core/Shared/ChunkIndex/ChunkIndexRouter.cs
  • src/Arius.Core/Shared/ChunkIndex/ChunkIndexService.cs
  • src/Arius.Core/Shared/ChunkIndex/Shard.cs
  • src/Arius.Core/Shared/Storage/IBlobContainerService.cs
  • src/Arius.Explorer/Infrastructure/RepositorySession.cs
  • src/Arius.Integration.Tests/ChunkIndex/ChunkIndexServiceArchiveScenarioTests.cs
  • src/Arius.Integration.Tests/ChunkIndex/Fakes/CountingBlobContainerService.cs
  • src/Arius.Integration.Tests/Pipeline/Fakes/FaultingBlobService.cs
  • src/Arius.Integration.Tests/Pipeline/Fakes/RehydrationSimulatingBlobService.cs
  • src/Arius.Tests.Shared/Hashes/HashTestData.cs
  • src/Arius.Tests.Shared/Storage/FakeInMemoryBlobContainerService.cs
💤 Files with no reviewable changes (1)
  • src/Arius.Core/Shared/ChunkIndex/Shard.cs

@woutervanranst woutervanranst changed the title feat: dynamic shard prefix feat: dynamic chunkindex shard prefix Jun 17, 2026
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