Skip to content

Conversation

@lidel
Copy link
Member

@lidel lidel commented Jan 17, 2026

Warning

Not ready yet, using this PR draft to catch any CI regressions after each sub-task is done.

lidel added 2 commits January 16, 2026 23:42
add configurable size estimation modes for determining when to switch
between BasicDirectory and HAMTDirectory:

- SizeEstimationLinks: legacy mode using len(name) + len(CID), default
- SizeEstimationBlock: full serialized dag-pb block size (accurate)
- SizeEstimationDisabled: link-count only via MaxLinks, ignores size

includes:
- HAMTSizeEstimation global for default mode
- WithSizeEstimationMode option for per-directory override
- helper functions for accurate protobuf size calculation

part of IPIP-499 UnixFS CID Profiles implementation.
introduces UnixFSProfile struct with predefined profiles:
- UnixFS_v0_2015: legacy CIDv0 settings (256 KiB chunks, 174 links/node)
- UnixFS_v1_2025: modern CIDv1 settings (1 MiB chunks, 1024 links/node)

profiles control file chunking, DAG width, and HAMT sharding parameters.
ApplyGlobals() sets all relevant global variables at once.

part of IPIP-499 implementation.
@lidel lidel changed the title feat(unixfS): configurable CID Profiles from IPIP-499 feat(unixfs): configurable CID Profiles from IPIP-499 Jan 17, 2026
@codecov
Copy link

codecov bot commented Jan 17, 2026

Codecov Report

❌ Patch coverage is 83.68794% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.23%. Comparing base (319662c) to head (4ff72d0).

Files with missing lines Patch % Lines
ipld/unixfs/io/directory.go 80.18% 12 Missing and 9 partials ⚠️
files/serialfile.go 91.30% 1 Missing and 1 partial ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1088      +/-   ##
==========================================
+ Coverage   61.18%   61.23%   +0.05%     
==========================================
  Files         264      265       +1     
  Lines       26230    26346     +116     
==========================================
+ Hits        16049    16134      +85     
- Misses       8508     8527      +19     
- Partials     1673     1685      +12     
Files with missing lines Coverage Δ
chunker/parse.go 53.96% <ø> (ø)
ipld/unixfs/io/profile.go 100.00% <100.00%> (ø)
files/serialfile.go 72.44% <91.30%> (+7.01%) ⬆️
ipld/unixfs/io/directory.go 72.47% <80.18%> (+1.27%) ⬆️

... and 12 files with indirect coverage changes

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

lidel added 2 commits January 17, 2026 01:32
add SerialFileOptions and NewSerialFileWithOptions to control whether
symlinks are preserved as UnixFS symlink nodes (Data.Type=4) or
dereferenced and replaced with their target content during file
traversal.
Link.Size is already uint64, so the explicit conversions are redundant
and flagged by golangci-lint unconvert check.
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.

2 participants