Skip to content

docs: a posts: unit of work covers the rows, not the number and the trail (#7297) - #7420

Merged
delchev merged 1 commit into
masterfrom
issue-7297-posts-unit-of-work-docs
Sep 17, 2026
Merged

delchev merged 1 commit into
masterfrom
issue-7297-posts-unit-of-work-docs

Conversation

@delchev

@delchev delchev commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The defect

Posts.java.template's contract comment (and #7245's PR body) said a tick that fails part-way "leaves nothing behind". It leaves no rows - the unit of work covers the derived rows and their outbox events, and that is all it covers. JavaEntityStore.inUnitOfWork's own javadoc is explicit:

the change history (History), document-number allocation and the outbox table's own DDL each run on their own connection, so a rolled-back unit can leave a history row or consume a number

So a posts: target carrying number: or history: true does leave a consumed number and a trail entry of the attempt behind - by design, and identically to Posting (#7132), the scheduled tick (#7133) and the create-from (#7069).

Second half: .claude/docs/intent-layer.md documented #7132 and #7133 and had no sentence for posts: / #7179 at all, and engine-intent/CLAUDE.md did not change with #7245 either - so the next reader of the "partial UnitOfWork adoption" pattern would not find that Posts.java.template is covered.

The change

Prose only, no behaviour.

Verification

Comment and Markdown only: no Java, no Velocity directive, no generated output changes. The added template lines are continuation lines of the existing block comment (* ), so nothing new is parsed by Velocity.

Fixes #7297

🤖 Generated with Claude Code

…rail (#7297)

`Posts.java.template`'s contract comment said a failed tick "leaves nothing
behind". The unit of work covers the derived rows and their outbox events and
nothing else: a target carrying `number:` allocates its document number before
the insert and a `history: true` one writes its trail after it, each on its own
connection, exactly as `JavaEntityStore.inUnitOfWork` documents - so a refused
tick can consume a number and record the attempt. The comment now says "no
rows".

The same sentence is corrected for the scheduled tick in `intent-layer.md`,
which additionally had no note for `posts:` / #7179 at all beside its #7132 and
#7133 ones; `engine-intent/CLAUDE.md` gains the same pointer on its `postings:`
bullet, so the next reader of the partial-UnitOfWork-adoption pattern finds
that `Posts.java.template` is covered and what the unit does not reach.

Fixes #7297

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@delchev
delchev merged commit 1e0f2b4 into master Sep 17, 2026
10 checks passed
@delchev
delchev deleted the issue-7297-posts-unit-of-work-docs branch September 17, 2026 12:51
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.

docs: posts: 'a refused row leaves nothing' overstates the unit of work (number + history survive), and intent-layer.md has no #7179 note

1 participant