Skip to content

fix(numbering): a materializing partition inherits the base row's counter, not zero (#6517) - #6518

Merged
delchev merged 1 commit into
masterfrom
fix/partition-inherits-counter
Aug 4, 2026
Merged

fix(numbering): a materializing partition inherits the base row's counter, not zero (#6517)#6518
delchev merged 1 commit into
masterfrom
fix/partition-inherits-counter

Conversation

@delchev

@delchev delchev commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Closes #6517.

Live failure: on a freshly provisioned tenant with a per:-partitioned series, the operator seeded prefix + Next=178 on the base row (before the first allocation nothing marks the series partitioned, so the base row is the only editable row) — the first issued document rendered 0000000001. materializePartition copied only the shape from the base row and hardcoded the counter to 0, silently discarding the seed.

  • The base row is now the tenant's full template: a partition row materializes with the base shape and the base counter — seeding before first use finally works. The .numbers provisioning of a declared series still starts the base at zero, and already-materialized partition rows are untouched.
  • The settings page's virtual rows (feat(numbering): declared partition sources — labeled rows + counter seeding before first use (#6506) #6507) preview the inherited counter (next = base + 1) instead of a hardcoded 1, and the base-row hint copy now reads "…inheriting this shape and its starting counter" (en + bg).

Test: NumberingSdkIT.aFreshPartitionInheritsTheBaseRowsSeededCounter — seed base Next=300, the first allocation of a brand-new partition renders exactly T-0300 and continues with T-0301. All three numbering ITs green locally.

Runtime-only (engine + settings page) — no regeneration needed; a platform rebuild picks it up.

🤖 Generated with Claude Code

…nter, not zero (#6517)

On a fresh tenant with a partitioned series the operator seeded prefix +
next on the base row (the only row that exists before the first
allocation) - and the first issued document rendered ...0000000001: the
prefix took effect, the counter did not. materializePartition copied
only the shape and hardcoded the counter to zero, silently discarding
the seed.

The base row is the tenant's full template now: a partition row is born
with the base shape AND the base counter, so seeding before first use
works; the settings page's virtual rows preview the inherited value and
the base-row hint says "inheriting this shape and its starting counter".
Declared-series provisioning still starts at zero, and existing
partition rows are untouched.

NumberingSdkIT: seed base next=300, first allocation of a brand-new
partition renders exactly T-0300 and continues (3 numbering ITs green
locally).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@delchev
delchev merged commit d257f12 into master Aug 4, 2026
10 checks passed
@delchev
delchev deleted the fix/partition-inherits-counter branch August 4, 2026 16:56
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.

Seeded document-number counter is ignored on a fresh tenant - the first partition allocation starts at 1

1 participant