<feed xmlns='http://www.w3.org/2005/Atom'>
<title>telegram/internal/app, branch main</title>
<subtitle>Official cep.is Telegram bot - @cepisbot
</subtitle>
<id>http://git.cep.is/telegram/atom?h=main</id>
<link rel='self' href='http://git.cep.is/telegram/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.cep.is/telegram/'/>
<updated>2026-07-28T00:12:05Z</updated>
<entry>
<title>Read the faixa from the client instead of fetching it again</title>
<updated>2026-07-28T00:12:05Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-28T00:12:05Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/telegram/commit/?id=97b49ae7081b989274b313532ff17c71694097a9'/>
<id>urn:sha1:97b49ae7081b989274b313532ff17c71694097a9</id>
<content type='text'>
cep.is/go v0.2.0 exposes the municipality as Error.Faixa, which is what
internal/lookup existed to work around: v0.1.0 discarded the 404 body, so
the bot re-issued the request just to read the block back.

The extra GET on the 404 path is gone, and with it the second timeout,
the body size cap and the "is it still a 404?" check that guarded it.
The replies are byte for byte what they were -- the formatting tests did
not change a single assertion, only the type they build.
</content>
</entry>
<entry>
<title>Name the municipality when the CEP does not exist</title>
<updated>2026-07-27T23:46:40Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-27T23:46:40Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/telegram/commit/?id=83ce95cf10fd9e9d581362453c558239d37ae06e'/>
<id>urn:sha1:83ce95cf10fd9e9d581362453c558239d37ae06e</id>
<content type='text'>
Answering only "não encontrei" wastes the trip. A CEP that fails is
almost never a random number: it is someone who knows the city and
guessed the rest, most often at the "-000" that 957 municipalities never
received. The API now names that municipality on the 404, so the reply
names it too.

It stays an answer to a failure. No 📮, no address block, and no CEP
suggested from inside the range — the range is sparse (Areal's 118 CEPs
span nearly five thousand numbers), so the reply gives the count and says
so instead of letting the two ends read as a list of valid CEPs.

cep.is/go v0.1.0 discards the 404 body, so internal/lookup reads it with
one extra GET, on that path alone and never inside a retry. Everything
that can go wrong there — a slow answer, broken JSON, a faixa naming no
municipality — falls back to the reply the bot has always given. The
wrapper goes away the day the library exposes the field.
</content>
</entry>
<entry>
<title>Initial import</title>
<updated>2026-07-26T18:18:21Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-26T18:18:21Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/telegram/commit/?id=3ca1d2c4370e8e79aba3940d5c8fe115960b75a8'/>
<id>urn:sha1:3ca1d2c4370e8e79aba3940d5c8fe115960b75a8</id>
<content type='text'>
</content>
</entry>
</feed>
