feat: add reorder operation correlation, timing, and diagnostic telemetry - #993
Open
devin-ai-integration[bot] wants to merge 11 commits into
Open
feat: add reorder operation correlation, timing, and diagnostic telemetry#993devin-ai-integration[bot] wants to merge 11 commits into
devin-ai-integration[bot] wants to merge 11 commits into
Conversation
…reproduction Establishes the epic #975 fixture: 80 sibling categories, 600 sibling images, mixed root and nested scopes, duplicate sort_order values, with idempotent CLI seeding, backend integration tests against real PostgreSQL, and frontend latency-injected regression tests reproducing the silent-drop, stale-refresh-overwrite, and partial-persistence failures. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…arent Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…etry Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…ned semantics Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ecording Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
changed the base branch from
devin/1785262304-reorder-fixture
to
main
July 28, 2026 19:35
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…y doc Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Jul 28, 2026
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
Closes #977 (epic #975). Adds end-to-end correlation for ordering operations so one reorder can be followed from drop to database: silently ignored drops, slow persistence, navigation mid-save, and failures are now all observable.
Stacked on #992 (uses its
reorderFixturetest helpers) — until #992 merges, this PR's diff also shows the fixture commits. Merge #992 first.One client-generated
operation_idper drag flows through:frontend/src/reorderDiagnostics.ts(new):newReorderOperationId(),emitReorderDiagnostic(),subscribeReorderDiagnostics(); bounded state vocabularyignored | queued | coalesced | submitted | committed | conflicted | failed | stale_discarded | abandoned(queued/coalesced/conflicted/stale_discardedare reserved for Implement an atomic, revisioned tile-order API with set-based updates #978–Prevent stale refresh overwrites and add ordering conflict recovery #980; the grid currently emitsignored/submitted/committed/failed/abandoned).SortableTileGrid: emitsignoredwhen the in-flight guard discards a genuinely order-changing reorder drop (no-op drops and move-into-category drops are excluded),submittedwith scope/indices/counts,committed/failedwith duration, andabandonedon unmount during an active save.reorder_telemetry.py(new):sanitize_reorder_operation_id(strict^[A-Za-z0-9-]{8,64}$so client text never reaches traces/logs),classify_reorder_exception(409 →conflict, other 4xx →client_error, elsefailure, matching thetracing.py4xx convention), span annotation, and per-request structured log + metrics.reorder_metrics.py(new):hriv_reorder_request_duration_seconds{entity},hriv_reorder_request_items{entity},hriv_reorder_requests_total{entity,outcome},hriv_reorder_client_operations_total{state}— joined into/api/metrics. Labels stay bounded; operation/category IDs are never metric labels (allowlist updated indocs/observability-conventions.md).reorder.operationadded to the event allowlist with server-side bounding/coercion ofstate,item_type, andoperation_id.docs/reorder-telemetry.md— full trace-one-operation walkthrough (Loki/Tempo queries) + lifecycle table; linked from README.Existing tests updated only for the widened contract (added optional
operationIdargument and the new allowlisted event name).Needs human verification: confirming the
reorder.operationevents andhriv_reorder_*metrics appear in the deployed Grafana/Loki/Tempo stack (all names follow the documented conventions).Testing
backend: poetry run pytest— 955 passed, 86% coverage (newtests/test_reorder_telemetry.py)frontend: npm test— all green (newtests/reorderDiagnostics.test.ts,tests/components/SortableTileGridReorderTelemetry.test.tsx)npx tsc --noEmit,npm run format:checkclean; the singlenpm run linterror (CanvasOverlay.tsxreact-refresh) is preexisting onmainLink to Devin session: https://app.devin.ai/sessions/414754bd88374dc693f47100ac269e78