Skip to content

DEV-8096: GET organization device details history (hub #9871) - #90

Open
borisd wants to merge 6 commits into
mainfrom
dev-7080-details-history-endpoint
Open

borisd wants to merge 6 commits into
mainfrom
dev-7080-details-history-endpoint

Conversation

@borisd

@borisd borisd commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

DEV-7080 — GET organization device details history

Linear: https://linear.app/xyte/issue/DEV-7080 · Hub: https://github.com/xyte-io/server/pull/9871 · MCP: xyte-io/xyte-mcp#41

Merge after hub #9871 — until it lands, the endpoint answers 404.

What changed

  • New catalog key organization.devices.getDeviceDetailsHistory — GET /core/v1/organization/devices/:device_id/details, org key, path device_id, no query/body. Same key as xyte-mcp.
  • Client namespace + type: client.organization.getDeviceDetailsHistory({ path: { device_id } }).
  • Skill data copy + references/endpoints.md, CHANGELOG [Unreleased].

CLI: xyte-cli api call organization.devices.getDeviceDetailsHistory --tenant <tenant> --path-json '{"device_id":"<id>"}'

Checks

npm test 1283 passed (2 skipped), typecheck clean, lint unchanged vs main (0 errors).

Heads-up

@borisd borisd added the awaiting-reviewer Waiting on the reviewer: a new PR, or the author has answered every comment label Nov 19, 2026
@borisd borisd changed the title DEV-7080: GET organization device details history (hub #9871) DEV-8096: GET organization device details history (hub #9871) Nov 19, 2026

@xyte-genie xyte-genie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI: Adds the new device details history read to the CLI catalog and typed client, so operators and agents can fetch a device's current details plus its earlier values. It mirrors the hub endpoint and must ship after it; until then the call returns not found.

reviewed@440c4b7cccfcf5c55eaa5afcc231cfe44212aabb

Comment thread CHANGELOG.md Resolved
Comment thread skills/xyte-cli/references/endpoints.md Resolved
Comment thread skills/xyte-cli/references/endpoints.md Resolved
Comment thread tests/auth-and-client.test.ts Resolved
Comment thread tests/endpoints.test.ts Resolved
@xyte-genie

Copy link
Copy Markdown

AI: Review lenses for 440c4b7

Lens Status Why
cross-repo ran catalog entry must match hub #​9871's route/Bruno doc and xyte-mcp #​41's key byte for byte
docs ran new endpoints.md section, catalog notes and CHANGELOG entry that agents read verbatim
spec-coverage ran three new tests added; check they pin what the catalog entry promises and that no snapshot/count test is left stale
spec-vs-ticket ran PR title says DEV-8096 while body, branch and ticket say DEV-7080; merge-order dependency on hub #​9871
correctness skipped the only logic is two one-line passthroughs in src/client/namespaces/organization.ts and src/types/client.ts, identical to the getDevice lines beside them
security-tenancy skipped no auth or scoping code in xyte-cli; authScope 'organization' mirrors hub's org-key route and is checked by cross-repo
data-integrity skipped read-only GET, no writes, jobs or retries
migrations-rollout skipped no migration, job or cached value; rollout check n/a
performance skipped no queries, loops or rendering; a single catalog entry
api-compat skipped xyte-cli's own surface only grows (new namespace method, new catalog key); the hub contract match is covered by cross-repo
backwards-compat skipped additive only — no default or behaviour changes for existing keys
errors-observability skipped no new raises, messages or logs; error statuses are hub's and are compared by cross-repo
ui-ux-product skipped no web/ files; xyte-cli has no UI screens for this
accessibility-i18n skipped no UI or user-facing strings beyond docs
readability skipped the one naming question (getHistories vs getDeviceDetailsHistory) is folded into the docs brief; no other new names or constants
design skipped no new flag, column or abstraction; the entry follows the existing catalog row shape
over-engineering skipped 114 added lines, almost all data/docs/tests; no abstraction introduced
deps-infra skipped package.json and lockfile untouched
skills-authoring skipped skills/xyte-cli changes are a data copy and a reference page, not SKILL.md frontmatter or structure; docs lens covers the reference page
decisions skipped mechanical mirror of a hub endpoint with the key fixed by xyte-mcp parity; the body argues no choice and lists no decisions

@xyte-genie xyte-genie added awaiting-author Waiting on the author: the reviewer left comments to address and removed awaiting-reviewer Waiting on the reviewer: a new PR, or the author has answered every comment labels Nov 19, 2026
@borisd
borisd marked this pull request as ready for review November 20, 2026 08:12
Copilot AI balanced review requested due to automatic review settings November 20, 2026 08:12
@borisd borisd added awaiting-reviewer Waiting on the reviewer: a new PR, or the author has answered every comment and removed awaiting-author Waiting on the author: the reviewer left comments to address labels Nov 20, 2026
@borisd
borisd requested a review from DorRaz103 November 20, 2026 08:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The required Hub server#9871 prerequisite is inaccessible, so a maintainer must verify its merge and deployment status and confirm the history-retention contract before approval.

No open issues 🎉

What changed in this PR

Adds device details history to the CLI’s endpoint catalog and typed organization client, making it available through the existing raw API command. Availability depends on hub PR #9871 landing.

Changes:

  • Registers the read-only endpoint and adds organization.getDeviceDetailsHistory.
  • Updates shipped skill data, usage documentation, and release notes.
  • Adds tests for endpoint metadata, namespace routing, authorization, path encoding, and body omission.
File Description
tests/​namespaces.test.ts Tests the new client method’s catalog mapping.
tests/​endpoints.test.ts Validates endpoint metadata and contract notes.
tests/​auth-and-client.test.ts Tests request rendering, authorization, and body omission.
src/​types/​client.ts Declares the organization client method.
src/​client/​namespaces/​organization.ts Maps the method to the new catalog key.
src/​api-catalog/​public-endpoints.json Defines the endpoint and documents history semantics.
skills/​xyte-cli/​references/​endpoints.md Adds usage guidance and a CLI example.
skills/​xyte-cli/​data/​public-endpoints.json Mirrors the endpoint in shipped skill data.
CHANGELOG.md Records the addition and skill-refresh guidance.

Review effort: Balanced

@ariel-greenfeld ariel-greenfeld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI: Adds organization.devices.getDeviceDetailsHistory (catalog entry, skill copy byte-identical, namespace + type, endpoints.md, CHANGELOG, tests). Route, method, org auth, path param, no body and the 401/response shape all match hub #9871 (get :details, on: :member, set_device before_action, jbuilder partial, Bruno doc). No code findings: 0 Critical, 0 High, 0 Mid, 0 Low.
CI is red only on windows-installer-package failed in runner setup (PowerShell Expand-Archive overload error extracting node.exe), not in anything this diff touches, and it passed on an earlier run of this branch. Approving; please re-run that job before merge. Merge after hub #9871 is deployed, or the endpoint answers 404.
UX: not applicable (no UI).
reviewed@5be36a86199845deb2aa1693834f3c8d0bb9e403

@ariel-greenfeld ariel-greenfeld removed the awaiting-reviewer Waiting on the reviewer: a new PR, or the author has answered every comment label Nov 22, 2026

This branch has not been deployed

No deployments
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.

4 participants