fix(tlon): keep fragment image URLs as media blocks#104867
Conversation
b4c3f5a to
d3e9f4d
Compare
|
Codex review: needs changes before merge. Reviewed July 11, 2026, 9:54 PM ET / July 12, 2026, 01:54 UTC. Summary PR surface: Source +12, Tests +44. Total +56 across 5 files. Reproducibility: yes. from source with high confidence: current main's matcher excludes fragment suffixes and its caller falls back to a link verse. This review did not independently execute the contributor branch, so the structured status is source-reproducible rather than reproduced. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Rebuild the branch from current main with only the fragment-aware Tlon matcher and its regression tests; reconsider hooks validation only in a separate proposal with explicit compatibility and upgrade review. Do we have a high-confidence way to reproduce the issue? Yes, from source with high confidence: current main's matcher excludes fragment suffixes and its caller falls back to a link verse. This review did not independently execute the contributor branch, so the structured status is source-reproducible rather than reproduced. Is this the best way to solve the issue? The two-file Tlon matcher change is the narrowest maintainable fix. The submitted branch is not the best merge unit until the unrelated closed hooks proposal is removed. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7a456e362d0b. Label changesLabel justifications:
Evidence reviewedPR surface: Source +12, Tests +44. Total +56 across 5 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
#fragmentsuffixes still render asblock.imageverses.Why does this matter now?
What is the intended outcome?
buildMediaStory()should treathttps://cdn.example/image.png#previewthe same way it already treats query-suffixed image URLs.What is intentionally out of scope?
What does success look like?
What should reviewers focus on?
buildMediaStory().Linked context
Which issue does this close?
Closes #104852
Which issues, PRs, or discussions are related?
Related #104852
Was this requested by a maintainer or owner?
Real behavior proof (required for external PRs)
#fragmentwere emitted as link verses instead of image verses.buildMediaStory()implementation viapnpm tsx.main):CI=true pnpm tsx -e "import { buildMediaStory } from './extensions/tlon/src/urbit/send.ts'; console.log(JSON.stringify(buildMediaStory('caption', 'https://cdn.example/image.png#preview'), null, 2));"pnpm tsx -e "import { buildMediaStory } from './extensions/tlon/src/urbit/send.ts'; console.log(JSON.stringify(buildMediaStory('caption', 'https://cdn.example/image.png#preview'), null, 2));"[ { "inline": ["caption"] }, { "block": { "image": { "src": "https://cdn.example/image.png#preview", "height": 0, "width": 0, "alt": "" } } } ]block.imageverse.[ { "inline": ["caption"] }, { "inline": [ { "link": { "href": "https://cdn.example/image.png#preview", "content": "https://cdn.example/image.png#preview" } } ] } ]Tests and validation
Which commands did you run?
pnpm vitest run extensions/tlon/src/urbit/send.test.tsCI=true pnpm tsx -e "import { buildMediaStory } from './extensions/tlon/src/urbit/send.ts'; console.log(JSON.stringify(buildMediaStory('caption', 'https://cdn.example/image.png#preview'), null, 2));"(onmainfor before-proof)pnpm tsx -e "import { buildMediaStory } from './extensions/tlon/src/urbit/send.ts'; console.log(JSON.stringify(buildMediaStory('caption', 'https://cdn.example/image.png#preview'), null, 2));"(on this branch for after-proof)What regression coverage was added or updated?
buildMediaStory()tests for fragment-suffixed image URLs and non-image fragment URLs.What failed before this fix, if known?
mainreturned a link verse forimage.png#previewinstead of an image verse.If no test was added, why not?
Risk checklist
Did user-visible behavior change? (
Yes/No)Did config, environment, or migration behavior change? (
Yes/No)Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)What is the highest-risk area?
How is that risk mitigated?
Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
Which bot or reviewer comments were addressed?