docs(E1-11): register :feature:vehicle outbox payload entityType fix story - #41
Merged
Conversation
Register GitHub issue #36 as backlog story E1-11 in Phase 1. The story restores docs/CONTRACTS.md §8 compliance of every outbox payload produced by VehicleOutboxMapper in :feature:vehicle. Issue #36 reports only the Fuel Entry tombstone written by the Vehicle cascade-delete path. Review of the same mapper found that toVehicleOutboxPayloadOrNull also omits entityType, which affects the vehicle create, update and tombstone write paths of SqlDelightVehicleRepository. Both defects share one root cause and one fix surface, so the story covers both mappers. E1-11 blocks E2-06 (local owner adoption enqueues an outbox snapshot for every non-synced row and coalesces snapshots onto cascade tombstones, and requires deterministic outbox order) and must precede E3-03 (the sync engine is the first consumer that assumes every outbox payload satisfies §8). The story is sized S, not human-gated, and introduces no schema or contract change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AQXLTc8vuk3gUAsBc9qRcJ
Append the correction entry required by the Definition of Done for the E1-11 backlog registration, and close the follow-up left by the 2026-09-01 E1-09 review-fixes entry, which recorded that the E1-11 backlog content was removed from PR #40 and needed its own PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AQXLTc8vuk3gUAsBc9qRcJ
davidru85
deployed
to
cloud-runtime-verification
September 1, 2026 12:03 — with
GitHub Actions
Active
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
E1-11in Phase 1 ofdocs/BACKLOG.md, sized S.docs/CONTRACTS.md §8compliance of every outbox payload produced byVehicleOutboxMapperin:feature:vehicle.toFuelEntryTombstonePayload. Review of the same mapper found thattoVehicleOutboxPayloadOrNullalso omitsentityType, which affects the vehicle create, update and tombstone write paths ofSqlDelightVehicleRepository. Both omissions share one root cause and one fix surface, so the story covers both mappers rather than splitting into two PRs against the same file.E1-11itself remains open and unimplemented.Story
E1-11 - :feature:vehicle Outbox Payload entityType Fix - SThis PR creates that story; it does not implement it.
Ready Check
ProposedorPendingScope Completed
E1-11section todocs/BACKLOG.mdafterE1-10, following the format of the surrounding Phase 1 stories: status line, scope statement, acceptance criteria,Blocks:line.E1-11to the dependency graph, to the execution-order rationale (why it must precedeE2-06andE3-03), and to the story index table.correctionentry todocs/PROJECT_LOG.md.Acceptance Evidence
The defect is confirmed in the current
main:feature/vehicle/src/commonMain/kotlin/com/ruizurraca/carapp/feature/vehicle/data/VehicleOutboxMapper.kt:29—toFuelEntryTombstonePayloadbuilds the payload with noentityTypekey (issue [Bug]: Vehicle cascade Fuel Entry tombstone omits entityType #36).feature/vehicle/src/commonMain/kotlin/com/ruizurraca/carapp/feature/vehicle/data/VehicleOutboxMapper.kt:10—toVehicleOutboxPayloadOrNulllikewise omitsentityType; called fromSqlDelightVehicleRepository.kt:128(create),:176(update) and:203(vehicle tombstone).feature/fuel/src/commonMain/kotlin/com/ruizurraca/carapp/feature/fuel/data/FuelEntryOutboxMapper.kt:14— the correct comparison path does emitput("entityType", "FUEL_ENTRY").docs/CONTRACTS.md §8requiresschemaVersionandentityTypein every outbox payload, and coalesces on(entityType, entityId)withON CONFLICT DO UPDATE. A Vehicle cascade delete can therefore overwrite a conformant Fuel Entry payload with an incomplete one for the same key.Test symbols named in the acceptance criteria were verified to exist:
VehicleRepositoryDeleteTest.permanentOwnerDeleteEnqueuesFuelTombstonesBeforeTheVehicleTombstone(VehicleRepositoryDeleteTest.kt:77)VehicleRepositoryCreateTest.permanentOwnerCreateEnqueuesTheFullVehicleSnapshot(VehicleRepositoryCreateTest.kt:62)Out of Scope / Not Done
E1-11implementation PR.docs/CONTRACTS.mdanddocs/TECHNICAL_PLAN.mdare deliberately untouched: the contract already mandatesentityType, so this is a code-conformance defect, not a contract gap.Files Changed
docs/BACKLOG.md— newE1-11story, dependency-graph line, execution-order paragraph, story-index row.docs/PROJECT_LOG.md— onecorrectionentry.Decisions Made
VehicleOutboxMapper.ktand its tests, with an avoidable conflict window. The story's status line records explicitly that the Vehicle payload omission is an additional finding, so the issue-to-story trace stays accurate.D-nis introduced: making code conform to an existing normative contract requires no decision.entityTypewill break the exact key-set assertion inVehicleRepositoryCreateTest, and that the assertion must stay exact so a future omission fails the build.Verification Run
Sharedframework from:composition:ios)No build or test verification was run, and none applies: the change touches two Markdown files and no compiled source. The verification listed under Acceptance Evidence is source inspection of the affected paths.
Contract Impact
Decision Board Impact
Shared-Write Modules Touched
Project Log Entry
docs/PROJECT_LOG.mdHuman Review Gate
docs/BACKLOG.mdis not a gated path underAGENTS.md §Human Review Gates, and registering a conformance fix for an already-normative requirement does not change MVP scope. Note thatE1-11blocksE2-06, which is itself a gated story; that gate applies toE2-06, not to this PR.docs/BACKLOG.mdanddocs/PROJECT_LOG.mdare both owned by @davidru85 inCODEOWNERS, so this PR requires owner review regardless.Risks or Follow-ups
E1-11implementation is still open and MUST precedeE2-06andE3-03.E2-06local owner adoption enqueues an outbox snapshot for every non-synced Vehicle and Fuel Entry row and coalesces snapshots onto cascade tombstones; a payload missingentityTypemakes those rows non-conformant with §8.E3-03is the first consumer that assumes every outbox payload satisfies §8.b19ebc3, rebased out of PR E1-09: iOS UI: Vehicles and Fuel Entries #40 by finding B3, is superseded by this branch and needs no recovery.E1-11implementation PR, not by this one.🤖 Generated with Claude Code
https://claude.ai/code/session_01AQXLTc8vuk3gUAsBc9qRcJ