Skip to content

fix(sdk): expose the version-matched ref pin formatter - #5124

Merged
thymikee merged 3 commits into
mainfrom
fix/sdk-ref-pin-formatter
Nov 26, 2026
Merged

thymikee merged 3 commits into
mainfrom
fix/sdk-ref-pin-formatter

Conversation

@thymikee

@thymikee thymikee commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Expose the existing formatPinnedRef helper from agent-device, so integrations use the grammar shipped with their client instead of duplicating its separator. This supplies the missing SDK construction API behind the e2e nightly failure after #5097.

Four files changed: public export, unit and installed-package tests, and Node API docs. No runtime admission change or legacy-input fallback. e2e-inc/e2e#2319 remains release-blocked; published 0.21.43 does not contain this export.

Before / after

import { formatPinnedRef } from 'agent-device';
formatPinnedRef('@e4', 7); // '@e4-s7'

Base: the import fails. Head: the public formatter returns a pin accepted by the live parser. Documentation includes an installed-package availability check instead of inventing an unpublished minimum release.

Validation

Head 9dca64c52b; base 9f7751eeb0. Public-entry regression failed before the export and passes all 3 tests after it. The installed-package test reproduced CI's exact export-surface mismatch before the fix and passes after it, including an actual installed formatter invocation.

Full-repository formatting passed. Independent review found no issues. 9dca64c52b passed exact-head affected validation (receipt run-5TJo9z), including packaging, Node integration, unit tests, and docs checks. Hosted CI was green at 5d83bf6cf0; it will rerun for this docs-only expiry clarification.

Hosted CI will rerun at the updated head. No device run: dispatch, capture, and native execution are unchanged.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.63 MB 6.63 MB +553 B
Package (unpacked) 6.63 MB 6.63 MB +553 B
Package (download) 2.02 MB 2.02 MB +222 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 24.2 ms 24.1 ms -0.2 ms
CLI --help 57.3 ms 53.5 ms -3.8 ms

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread website/docs/docs/client-api.md Resolved
@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 5d83bf6, and no change is required before merge.

Not blocking, so take or leave these: the staleness sentence could say that a device action or a newer ref-issuing response ends the pin’s validity and a new snapshot is then needed (a second press from the same snapshot is refused with ref_frame_expired); a follow-up with the #5097 port to 0.22 could add this export, its API reference bullet and its name in the installed-package export list, because merging this head into 0.22 conflicts in all four touched files and keeping the 0.22 side would drop the export while its exact-list test still passes (no migration table row is needed for an added name); and e2e #2319 in the PR body could be written as e2e-inc/e2e#2319, because a bare #2319 links to an unrelated PR in this repository.

The earlier thread on release availability is resolved: the docs now say that releases through 0.21.43 lack the export and give an availability check.

All checks pass except Proof, which is skipped, and Integration Tests covers the changed installed-package test and the client-api.md snippet compile.

Not verified here: local tests, a build and a device run were not performed; the documented availability command and the example press were only traced in code; and a client from this head was not exercised against an older remote daemon that still expects ~s, a version difference that comes from #5097 and not from this export.

The next step is maintainer merge; the 0.22 forward-port should be tracked with the #5097 port, and e2e-inc/e2e#2319 waits for a release that contains the export.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 26, 2026
@thymikee

Copy link
Copy Markdown
Member Author

Addressed the follow-up suggestions in #5124 (comment): 9dca64c clarifies expiry after device actions and replacement by newer ref-issuing responses, including ref_frame_expired when pressing again without fresh refs. The PR description now qualifies e2e-inc/e2e#2319. The four-file 0.22 forward-port checklist is tracked with #5097 at #5097 (comment); no forward-port completion is claimed. Independent review found no issues, and exact-head affected validation passed at 9dca64c (receipt run-5TJo9z). Hosted CI will rerun for this docs-only change.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 9dca64c

Since the review of 5d83bf6: 0 new · 0 still open · 0 no longer raised

No open findings.

Reviewed with this repository's own Sentinel configuration (9f7751eeb035).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee
thymikee merged commit 0adeae6 into main Nov 26, 2026
21 of 22 checks passed
@thymikee
thymikee deleted the fix/sdk-ref-pin-formatter branch November 26, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant