tang issue view <number> currently resolves <number> against a locally synthesized list index. That number can diverge from Tangled AppView's per-repo issue number used in URLs like /onev.cat/tang/issues/4.
Observed on onev.cat/tang:
https://tangled.org/onev.cat/tang/issues/4resolves toat://did:plc:r2whjvupgfw55mllpksnombn/sh.tangled.repo.issue/3mlpdhf6bdj2j.tang issue view 4resolves to a different issue becauseassignIssueNumberssorts issues byCreatedAtand assigns temporary1..Nnumbers.
Expected behavior:
- User-facing numeric issue arguments (
4,#4) should match Tangled AppView issue numbers. - Protocol-stable identifiers should be AT URI and/or rkey.
issue listshould not present local transient numbers as stable issue IDs.- JSON output should expose both AppView number, when known, and canonical record identity (
uri,rkey).
Likely approach:
- Resolve numeric issue arguments through AppView, e.g. fetch
/owner/repo/issues/<number>and extract the canonical issue AT URI. - Continue supporting direct
at://...and rkey inputs without AppView lookup. - Update list/view rendering so
numbermeans AppView number only; fall back to rkey/short URI when AppView number is unavailable. - Fix
issue view --json=number,title,...behavior; the current top-level wrapper makes those filters return{}.
Relevant local code:
internal/tangled/issues.go:assignIssueNumbersinternal/tangled/issues.go:ResolveIssueIdentifierinternal/cli/issue.go:resolveIssueArg
Fixed on
mainvia https://tangled.org/onev.cat/tang/pulls/4/round/0.The merged change makes numeric issue and pull arguments resolve through AppView numbers by default, so
issue view 5now maps to/issues/5andpr view 4maps to/pulls/4. Raw PDS/Constellation inspection remains available through--atproto, where numeric AppView IDs are intentionally rejected in favor of AT URIs, rkeys, or unique rkey prefixes.Validation included
go test ./...,git diff --check, and E2E checks againstonev.cat/tangfor AppView issue/pull number resolution.