Repository navigation
docs: asset history items are stays, not scans (TRA-1265) - #221
Draft
mikestankavich wants to merge 1 commit into
Draft
mikestankavich wants to merge 1 commit into
mikestankavich wants to merge 1 commit into
Conversation
GET /api/v1/assets/{asset_id}/history now returns one item per unbroken
run of observations at a location (platform #679). The API changelog
records the new item meaning, total_count/paging over stays, the
from/to no-clipping rule and gaps inside a stay. The history prose in
date-fields, data-model, pagination, quickstart and resource-identifiers
is rewritten to match.
The duration_seconds section was also backwards: it described time at
the previous location with null on the earliest row. It has always been
time at the item's own location, null on the newest. Corrected in the
rewrite and called out in the changelog.
Refs: TRA-1265
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KRNEVkxF5rYpoebNmLBgNg
Deploying docs with
|
| Latest commit: |
6abf4b7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6fc550df.docs-4n7.pages.dev |
| Branch Preview URL: | https://docs-tra-1265-asset-movement.docs-4n7.pages.dev |
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.
HOLD — draft until app v1.6.0 is on prod. Merging publishes to customers. Prod runs v1.5.0 without this behaviour; preview (
v1.6.0-dev-preview+645) has it.What changed
GET /api/v1/assets/{asset_id}/historynow returns one item per stay (trakrf/platform#679): an unbroken run of observations at one location, not one item per recorded minute.#history-stays. It covers the new item meaning,total_count/limit/offsetcounting stays,from/toselecting stays without clipping them (no false "ongoing" on a past window), and a gap in reads staying inside a stay.duration_seconds: rewritten for stays, including how to clip window edges when summing. Anchor unchanged.Docs correction included. The
duration_secondssection said it measured time at the previous location and wasnullon the earliest row. The code has always usedLEAD: time at the item's own location,nullon the newest. The changelog entry says so.Still open: whether a long silence should end a stay. That's the same age-out question dwell has. The docs describe today's behaviour.
The
v1.6.0version in the changelog entry is an assumption. Confirm it at release. App release notes are left for the release PR, as with v1.5.0.Validation
pnpm lint,pnpm typecheck,pnpm build(against the preview spec): green.Closes TRA-1265
🤖 Generated with Claude Code
https://claude.ai/code/session_01KRNEVkxF5rYpoebNmLBgNg