Skip to content

Confirm original DSV completion after assignment changes - #487

Merged
OziinG merged 7 commits into
mainfrom
codex/dsv-completion-result-recovery
Oct 11, 2026
Merged

OziinG merged 7 commits into
mainfrom
codex/dsv-completion-result-recovery

Conversation

@OziinG

@OziinG OziinG commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

A destination completion can commit before its response is lost. A later assignment rejection cannot prove that the original command was rejected. This change adds an account-authenticated result lookup for the original completion. It grants no current route or proof access.

New events record the authenticated account in a nullable server-owned UUID column. The result lookup and both duplicate paths require the exact owner, time, route, destination and full stop fingerprint. Legacy, partial and colliding evidence stays unknown. Only confirmed pre-commit rejection carries NOT_APPLIED. The additive migration creates the owner column and lookup index. It does not backfill ownership. Apply the migration before this server version.

Final source: 18ea784934ec3cf511f56646b708d141617c404b. This Draft targets server PR483's branch at 44e6d880684609f7d075f3102c634a999b5c24ca to keep the contract reviewable. Original PR483 remains unchanged. Driver integration is Draft PR65, APK source f5609529a00d9a39ea12ad81319183e5de5bac20, documentation HEAD 047d57fdb783294ba4a48e62715387842cd8f65c.

Validation: Prisma generate/validate, typecheck, typed ESLint with command-scoped 4 GiB, API build and whitespace passed. Tests: 3,284 passed; 314 guarded/optional skipped. CI37643790521 passed, including disposable PostgreSQL checks. Independent code and architecture reviews covered owner provenance and both duplicate paths.

Actual API and independent PostgreSQL17 acceptance passed for canonical association, foreign/inactive account, account relinking, route token, legacy JSON owner forgery, partial completion, duplicate fingerprint collisions and same-key proof retry. Final Galaxy Note20/Android13 acceptance passed with the exact source: committed completion response loss, route reassignment, ACTIVE-account APPLIED lookup, immutable event/time and no automatic proof or route POST before explicit close. Original direct duplicate200 recovery and normal photo-only retries also passed. Independent device review: APPROVE. Raw screens/HTTP/DB/proof files and their linked manifest remain private. Owned services were stopped while retaining PG data and evidence.

Driver Issue62 audit high20 remains a release blocker. No whole-photo offline queue, production DB, AWS, real FCM, vehicle GPS, operating-policy decision, merge, deployment, store publishing or P7 work is included.

Refs EVNSolution/clever-driver-app#63
Change-control: EVNSolution/clever-change-control#312

… client evidence

Constraint: Stop commits are independent and approval responses can be lost before reassignment.
Rejected: Client JSON ownership and current Driver account linkage | Both can misidentify an earlier completion actor.
Confidence: high
Scope-risk: moderate
Directive: Apply the nullable owner migration before this server; never backfill ownership from payload or promote legacy duplicate rows.
Tested: Fresh Prisma generate/validate, typecheck, 4GiB typed lint, 3284 tests, API build, focused collision/receipt regressions, diff check.
Not-tested: 314 guarded or optional tests skipped; private HTTP/DB/device acceptance and production runtime remain separate.
@OziinG OziinG changed the title Confirm prior DSV completion after assignment changes Confirm original DSV completion after assignment changes Oct 7, 2026
OziinG and others added 5 commits October 11, 2026 16:29
…branch so PR #487 reviews against current main

Merges the updated codex/dsv-server-notifications (main e48d1c6 merged) into the
completion-recovery branch. Conflicts were additive: the DriverEvent model keeps
both main's (id, shopId) unique key and the completion-owner index; the receipt
repository keeps main's stored-completion reader beside the destination
fingerprint matcher; the driver-events route keeps both the 400 proof error and
the 409 completion collision handlers.

Confidence: medium
Scope-risk: narrow
Tested: prisma generate/validate, tsc, vitest 3473 pass, migration 20261008010000 deploys after main's 118, DSV PostgreSQL integration 63 pass, typed eslint
Not-tested: CI on this merge, production migration order

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…p time after driver change) into the completion-recovery branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…overy branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n-recovery branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ion-recovery branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@OziinG
OziinG changed the base branch from codex/dsv-server-notifications to main October 11, 2026 11:03
@OziinG
OziinG marked this pull request as ready for review October 11, 2026 11:03
@OziinG
OziinG merged commit efd877f into main Oct 11, 2026
2 checks passed
@OziinG
OziinG deleted the codex/dsv-completion-result-recovery branch October 13, 2026 15:20
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.

1 participant