Repository navigation
fix: all text from the repo is shown only as code, and SHAs are short - #37
Merged
Merged
Conversation
Text from the repo, the commit, or a command that ran on it (paths,
subjects, symlink targets, submodules, summary and check output, errors)
reaches a message only through message.Code (<code>) or message.Output
(<pre>). The escape function is no longer exported. Telegram makes no
link, mention, hashtag or command of text inside <code>, so README.md
or login.example.com is no longer a link. Link previews stay off, and
a test now checks the request body.
Messages show 12-character SHAs. The question shows the full SHA once,
on its last line ("Full:"), which stays after a cut. Root still applies
the full SHA from its own state.
Fixes #29
Fixes #23
Fixes #30
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 17, 2026
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.
Fixes #29
Fixes #23
Fixes #30
What changes
summaryandcheck, and errors that may hold any of them reach a message only throughmessage.Code(one line in<code>) ormessage.Output(lines in<pre>). The oldmessage.Escandmessage.Cleanare no longer exported. Telegram makes no link, mention, hashtag or command of text inside<code>/<pre>, soREADME.mdandlogin.example.comare plain text now (fix: file names in the question become Telegram links (README.md → https://README.md) #23).link_preview_options, and a test checks it for every send and edit.<code>. The question shows the full SHA once, on its last line (Full: <code>…</code>);Fitkeeps that line after a cut. Logs, state andpullgate statuskeep the full SHA. Root applies the full SHA from its own state.Tests
TestRepoTextIsOnlyInsideCode(message): hostile values (a URL, domain-like names,README.md, HTML<a href>,@username,#tag,/command, a right-to-left mark, very long text) in every field of the question, with and without a cut and with a failed summary. Each must be only inside<code>/<pre>, and the text under the Telegram limit.TestHostileCommitTextIsOnlyCode(gate): hostile file names, subjects and command output through a failed check notice, a question and a failed apply.TestHostileSymlinkRefusalIsOnlyCode: the refused notice.TestGateBuildsNoRepoTextItself: the gate code builds no<code>/<pre>or escape of its own.TestLinkPreviewsAreOff(listener): question, reply, notice, expired note and edit, checked on the request body.TestShortSHAsAndOneFullSHA(message) andTestNoticesShowShortSHAs(gate): short SHAs, one full SHA on the last line, and the apply installs the full SHA.Reviews
Security review: no critical, high or medium findings. Fixed:
Cleanis unexported too, DESIGN wording about the last line, and a THREAT-MODEL note on short SHAs. Not changed: the "Applied" report keeps the short SHA (#30 asks for short SHAs in notices;pullgate statusshows the full one).Correctness review: added hostile apply output and the hostile symlink refusal to the tests, a wider source scan, and clearer wording. Its "notices have no length cap" finding does not hold:
message.Codecleans the text, which cuts it to 200 characters.🤖 Generated with Claude Code