Skip to content

chore: add codeowners#9

Merged
shumkov merged 1 commit into
masterfrom
codeowners
Nov 4, 2021
Merged

chore: add codeowners#9
shumkov merged 1 commit into
masterfrom
codeowners

Conversation

@shumkov
Copy link
Copy Markdown
Collaborator

@shumkov shumkov commented Nov 4, 2021

Issue being fixed or feature implemented

Add initial codeowners

What was done?

  • Added CODEOWNERS file

How Has This Been Tested?

None

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov shumkov added this to the v0.21.x milestone Nov 4, 2021
@shumkov shumkov merged commit 8972f60 into master Nov 4, 2021
@shumkov shumkov deleted the codeowners branch November 4, 2021 12:44
QuantumExplorer added a commit that referenced this pull request May 19, 2026
… into helpers

Closes thepastaclaw review nitpick #9 (240c820 review, carried forward
from earlier rounds) — the
`match &primary_key_sum_property { Some(prop) => ItemWithSumItem... }`
pattern was open-coded across all five insert arms in
`add_document_to_primary_storage_0` (keep-history × 4 + insert_without_check
× 4 + trailing else × 4 document_info shapes), and the parallel
`required_item_with_sum_item_space` vs `required_item_space` size
branch was duplicated three times in the
`DocumentEstimatedAverageSize` cost arms.

The 6c59b93 fix that wired `DocumentEstimatedAverageSize` for
sum-aware sizes had to be replicated independently across the two
relevant branches because there was no helper — exactly the drift
risk the reviewer called out.

- `build_primary_element(document, serialized, flags, sum_property)`
  centralizes the Item / ItemWithSumItem dispatch and the
  `read_document_sum_contribution` call. Returns `Result<Element>`
  so the contract-level invariant violation (i64 conversion fail)
  surfaces as `CorruptedCodeExecution` from one place.
- `required_primary_element_space(max_size, sum_property, grove_version)`
  is its cost-only twin for `DocumentEstimatedAverageSize` arms.
  The docstring spells out that the two helpers must stay in
  lock-step or estimation and execution drift on summable inserts.
- Replaced 9 element-construction sites + 3 size-estimation sites
  with single-line helper calls. Net -42 LOC despite adding two
  fully-documented helpers above the impl block.
- Trimmed the now-redundant header comment paragraph that
  explained the Element::Item -> ItemWithSumItem replacement
  inline; the helpers' docstrings carry the same contract.

Validation: cargo check + cargo clippy -p drive --lib clean; all
3174 drive lib tests pass (refactor is behavior-identical, only
collapses duplication).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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