Conversation
`@doist/comms-sdk` has exported `isValidUuidV7Base58` since 0.11.1 (July), and it checks the v7 version nibble and variant bits on top of the base58 decode. The local `looksLikeOpaqueCommsId` checked neither, so a 21-char name like `EngineeringDiscussion` decoded to 16 bytes and read as an id. That collision is the only reason `resolveChannelRef` grew a name-first-then-getChannel fallback in #66, so both go: `getDirectChannelId` recognises an opaque id again, which also restores the workspace-agnostic behaviour a bare digit-free channel id had before #66. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
8 tasks
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.
Overview
The id check added in #66 was a duplicate of the SDK's
isValidUuidV7Base58, which I only spotted after it merged. This removes ours in favour of the SDK one.Reference
Follows @scottlovegrove's review on #66. The error helpers from that PR (
isNotFound,isConflict,isMalformedId) have no SDK equivalent yet and are untouched here; they need their own SDK PR.Changelog
A bare channel id resolves without needing a workspace again, and ids are recognised by the SDK's rule rather than a local copy of it.
Test plan
tdc channel threads EngineeringDiscussion --limit 1Error: CHANNEL_NOT_FOUND, so a name that looks like an id is still treated as a nametdc search x --channel CbjxNkWHJBwcaVkoTCRgM --limit 1(any bare channel id)INVALID_REFtdc conversation done <a conversation id with no digit in it> --dry-run[dry-run] Would archive conversation, the case Bare opaque ids without a digit are rejected, and bad ids surface as raw SDK errors #65 was abouttdc thread view id:nopeError: INVALID_REFwith the server's message, no stack tracetdc groups view id:<a well-formed id that does not exist>Error: GROUP_NOT_FOUNDwith thetdc groupshint🤖 Generated with Claude Code