Skip to content

get rid of python libraries replace with native golang#10

Merged
vincentkoc merged 3 commits into
openclaw:mainfrom
joshp123:codex/pure-go-telegram-import
Jun 8, 2026
Merged

get rid of python libraries replace with native golang#10
vincentkoc merged 3 commits into
openclaw:mainfrom
joshp123:codex/pure-go-telegram-import

Conversation

@joshp123

@joshp123 joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

human description

  • we currently have a few python libraries for doing the telegram import
  • this means you need to setup a venv and have some python tooling
  • that makes it a bit harder to install/manage/etc since you're calling python from golang and all that.

here we replace the python stuff with pure golang to make builds/packaging installs simpler. if the crawler binary is present on path, thats all you need

Intent

Remove the Python/venv Telegram import bridge and make Telegram import a Go-only path while keeping both supported Telegram source families working:

  • Telegram Desktop tdata
  • native Telegram for macOS Postbox

This intentionally leaves backup's git shellout alone.

Intentional changes

  • Add a gotd-based Telegram Desktop tdata importer for dialogs, messages, folders, topics, reactions/reply metadata, and --fetch-media downloads.
  • Add an in-repo Go Postbox reader for .tempkeyEncrypted, SQLCipher v4 pages, Postbox peer/message/media records, metadata, and native macOS account session reuse.
  • Use gotd for Postbox cloud media fetching through the native account auth key when --fetch-media is set.
  • Remove embedded Python importer scripts, Python Docker stages, Python env vars, venv setup docs, bridge dependencies, telecrawl deps install, and --python.
  • Keep media/archive behavior scoped to existing telecrawl import surfaces; no backup behavior changes.
  • Add deadcode ./cmd/telecrawl to CI and delete unreachable Postbox helper wrappers it found.
  • Cap GoReleaser parallelism in CI and release workflows so the larger pure-Go dependency graph can still produce all release targets on hosted runners.

Review comments addressed

  • Removed the deprecated deps install no-op and all --python compatibility handling.
  • Removed the Docker smoke assertion about Python absence; the Docker job now proves the image builds and starts the Go CLI.
  • Removed generated frontmatter from the public README.
  • Added live current-head proof for both Telegram Desktop tdata and native macOS Postbox, including --fetch-media counters.
  • Replaced proof summaries with redacted command output and a short explanation of what each proof block demonstrates.

Proof

Current pushed head: e59514a5bff0.

Path redaction only: proof output below replaces local source paths with $HOME/... and temp archive paths with $tmpdir/.... No message text, contact names, usernames, phone numbers, metadata rows, media filenames, or media file paths are included.

CLI surface

This proves the public command surface no longer documents dependency setup or Python flags, while --fetch-media remains exposed on the import path.

$ /tmp/telecrawl-proof.ebPd0s/telecrawl --help
telecrawl: Telegram archive probe/import CLI

usage:
  telecrawl [--json] doctor [--path PATH]
  telecrawl [--json] metadata
  telecrawl [--json] import [--path PATH] [--chat ID] [--dialogs-limit N] [--messages-limit N] [--fetch-media]
  telecrawl [--json] status
  telecrawl [--json] folders
  telecrawl [--json] contacts [--limit N]
  telecrawl [--json] contacts export
  telecrawl [--json] chats [--limit N] [--unread] [--folder ID]
  telecrawl [--json] topics --chat ID [--limit N]
  telecrawl [--json] messages [--chat ID] [--topic ID] [--limit N] [--after DATE]
  telecrawl [--json] search "query" [--chat ID] [--topic ID]
  telecrawl [--json] backup init|push|pull|status
  telecrawl version

notes:
  import auto-detects Telegram Desktop tdata or native macOS Postbox data
  import archives local cached Postbox media by default; --fetch-media also tries Telegram cloud media
  backup writes encrypted age shards to a git repo

Active Python bridge residue

These commands prove the active code/docs/CI/module surface has no Python bridge files, dependency manifests, setup commands, importer scripts, or Python CLI flags. The scan intentionally excludes CHANGELOG.md because historical release notes describe old releases, not current runtime/setup behavior.

$ git ls-files | rg '(^|/)([^/]+\.py|requirements\.txt|pyproject\.toml|Pipfile|poetry\.lock|.*venv.*)$'
(no output; rg exit 1 because no tracked files matched)

$ rg -n 'Python|python|venv|--python|deps install|telethon|opentele2|pycryptodomex|sqlcipher3|import_tdata|import_postbox|TELECRAWL_PYTHON' .github Dockerfile README.md internal go.mod go.sum
(no output; rg exit 1 because no active-path strings matched)

Live Telegram Desktop tdata

doctor proves the newly installed Telegram Desktop source is detected as real tdata, not Postbox or a fixture.

$ telecrawl --db "$tmpdir/tdata.db" --source "$HOME/Library/Application Support/Telegram Desktop/tdata" doctor
path: $HOME/Library/Application Support/Telegram Desktop/tdata
exists: true
accessible: true
store: tdesktop-binary
sqlite_files: 0
tdesktop_files: 11
files_scanned: 92
bytes_scanned: 1448
account_dirs: 1
note: Telegram Desktop tdata is readable, but messages are in TDesktop binary/encrypted storage, not SQLite

import --fetch-media proves the Go tdata importer can read live dialogs/messages and fetch remote media without the removed Python bridge.

$ telecrawl --db "$tmpdir/tdata.db" --source "$HOME/Library/Application Support/Telegram Desktop/tdata" import --dialogs-limit 5 --messages-limit 50 --fetch-media
source_path: $HOME/Library/Application Support/Telegram Desktop/tdata
db_path: $tmpdir/tdata.db
chats: 5
messages: 250
media_messages: 38
media_files: 34
media_bytes: 13689492
started_at: 2026-06-07T22:05:18Z
finished_at: 2026-06-07T22:05:30Z
remote_media_candidates: 38
remote_media_attempted: 38
remote_media_downloads: 35
remote_media_missing: 3
remote_media_unavailable: 3
remote_media_timeouts: 0
remote_media_errors: 0

status proves the imported archive is queryable through the existing store boundary after import.

$ telecrawl --db "$tmpdir/tdata.db" status
db_path: $tmpdir/tdata.db
chats: 5
messages: 250
unread_chats: 1
unread_messages: 7
media_messages: 38
folders: 0
topics: 2
oldest_message: 2026-04-17T08:52:36Z
newest_message: 2026-06-07T21:12:50Z
last_import_at: 2026-06-07T22:05:30Z

$ find "$tmpdir/media" -type f -maxdepth 4 | wc -l
34
$ du -sk "$tmpdir/media"
13436	$tmpdir/media

Live native macOS Postbox

doctor proves the native Telegram for macOS source is detected separately as Postbox and finds multiple account databases.

$ telecrawl --db "$tmpdir/postbox-doctor.db" --source "$HOME/Library/Group Containers/6N38VWS5BX.ru.keepcoder.Telegram" doctor
path: $HOME/Library/Group Containers/6N38VWS5BX.ru.keepcoder.Telegram
exists: true
accessible: true
store: telegram-macos-postbox
sqlite_files: 12
tdesktop_files: 0
key_files: 2
postbox_dbs: 2
files_scanned: 73654
bytes_scanned: 1101456
account_dirs: 2
note: Native Telegram for macOS Postbox data is readable locally; import archives cached media, and --fetch-media can fetch missing cloud media from the existing native session

This isolated temp-dir import --fetch-media proves the Go Postbox reader and gotd native-session media fetch path work without relying on the tdata smoke's media directory.

$ telecrawl --db "$tmpdir/postbox.db" --source "$HOME/Library/Group Containers/6N38VWS5BX.ru.keepcoder.Telegram" import --dialogs-limit 5 --messages-limit 50 --fetch-media
source_path: $HOME/Library/Group Containers/6N38VWS5BX.ru.keepcoder.Telegram
db_path: $tmpdir/postbox.db
chats: 5
messages: 250
media_messages: 115
media_files: 34
media_bytes: 13689492
started_at: 2026-06-07T22:18:13Z
finished_at: 2026-06-07T22:19:22Z
remote_media_candidates: 10
remote_media_attempted: 10
remote_media_downloads: 9
remote_media_missing: 1
remote_media_unavailable: 1
remote_media_timeouts: 0
remote_media_errors: 0

status proves the Postbox import is stored/queryable through the same archive boundary, and the media count proves files were actually archived in the isolated temp media directory.

$ telecrawl --db "$tmpdir/postbox.db" status
db_path: $tmpdir/postbox.db
chats: 5
messages: 250
unread_chats: 0
unread_messages: 0
media_messages: 115
folders: 0
topics: 0
oldest_message: 2026-04-17T08:52:36Z
newest_message: 2026-06-07T21:12:50Z
last_import_at: 2026-06-07T22:19:22Z

$ find "$tmpdir/media" -type f -maxdepth 4 | wc -l
34
$ du -sk "$tmpdir/media"
13436	$tmpdir/media

Tests and analyzers

These are not substitutes for the live import proof above. They verify the narrower code boundaries: store/import behavior, race safety, lint/static analysis, module integrity, called vulnerability status, and production reachability from the CLI entry point.

$ nix shell nixpkgs#go_1_26 -c go test -count=1 ./...
?    github.com/openclaw/telecrawl/cmd/telecrawl [no test files]
ok   github.com/openclaw/telecrawl/internal/backup 1.332s
ok   github.com/openclaw/telecrawl/internal/cli 0.705s
ok   github.com/openclaw/telecrawl/internal/store 0.407s
ok   github.com/openclaw/telecrawl/internal/telegramdesktop 0.259s
ok   github.com/openclaw/telecrawl/internal/telegramdesktop/postbox 0.951s

$ nix shell nixpkgs#go_1_26 -c go test -count=1 -race ./...
?    github.com/openclaw/telecrawl/cmd/telecrawl [no test files]
ok   github.com/openclaw/telecrawl/internal/backup 2.736s
ok   github.com/openclaw/telecrawl/internal/cli 1.651s
ok   github.com/openclaw/telecrawl/internal/store 1.671s
ok   github.com/openclaw/telecrawl/internal/telegramdesktop 1.839s
ok   github.com/openclaw/telecrawl/internal/telegramdesktop/postbox 2.055s

$ nix shell nixpkgs#go_1_26 -c go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.1 run
0 issues.

$ nix shell nixpkgs#go_1_26 -c go vet ./...
(no output; exit 0)

$ nix shell nixpkgs#go_1_26 -c go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./...
(no output; exit 0)

$ nix shell nixpkgs#go_1_26 -c go run golang.org/x/tools/cmd/deadcode@v0.45.0 ./cmd/telecrawl
(no output; exit 0)

$ nix shell nixpkgs#go_1_26 -c go run mvdan.cc/gofumpt@v0.9.2 -l .
(no output; exit 0)

$ nix shell nixpkgs#go_1_26 -c go mod verify
all modules verified

gosec verifies no issues under the repo's configured exclusions.

$ nix shell nixpkgs#go_1_26 -c go run github.com/securego/gosec/v2/cmd/gosec@v2.25.0 -exclude=G101,G115,G202,G301,G304 ./...
Results:


Summary:
  Gosec  : dev
  Files  : 22
  Lines  : 7139
  Nosec  : 3
  Issues : 0

govulncheck verifies there are no called vulnerabilities in this code path. It still sees vulnerable modules in the dependency graph that this code does not call.

$ nix shell nixpkgs#go_1_26 -c go run golang.org/x/vuln/cmd/govulncheck@v1.3.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 6
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.

Release and Docker checks

The local snapshot release check proves the GoReleaser parallelism cap still produces all configured platform archives. Docker is covered by the remote docker check on the pushed head; local Docker daemon was unavailable on this machine.

$ nix shell nixpkgs#go_1_26 nixpkgs#goreleaser -c goreleaser release --snapshot --clean --skip=publish --parallelism=2
  • starting release
  • skipping announce, publish, and validate...
  • cleaning distribution directory
  • loading environment variables
  • getting and validating git state
    • using tags                                     previous=v0.1.0 current=v0.2.0
    • pipe skipped or partially skipped              reason=disabled during snapshot mode
  • parsing tag
  • setting defaults
  • snapshotting
    • building snapshot...                           version=0.2.0-SNAPSHOT-e59514a
  • ensuring distribution directory
  • setting up metadata
  • writing release metadata
  • loading go mod information
  • build prerequisites
  • building binaries
    • building                                       paths=cmd/telecrawl binaries=telecrawl target=darwin_arm64_v8.0
    • building                                       paths=cmd/telecrawl binaries=telecrawl target=darwin_amd64_v1
    • building                                       paths=cmd/telecrawl binaries=telecrawl target=linux_amd64_v1
    • building                                       paths=cmd/telecrawl binaries=telecrawl target=linux_arm64_v8.0
    • building                                       paths=cmd/telecrawl binaries=telecrawl target=windows_amd64_v1
    • building                                       paths=cmd/telecrawl binaries=telecrawl target=windows_arm64_v8.0
  • archives
    • archiving                                      name=dist/telecrawl_0.2.0-SNAPSHOT-e59514a_windows_arm64.zip
    • archiving                                      name=dist/telecrawl_0.2.0-SNAPSHOT-e59514a_windows_amd64.zip
    • archiving                                      name=dist/telecrawl_0.2.0-SNAPSHOT-e59514a_darwin_arm64.tar.gz
    • archiving                                      name=dist/telecrawl_0.2.0-SNAPSHOT-e59514a_darwin_amd64.tar.gz
    • archiving                                      name=dist/telecrawl_0.2.0-SNAPSHOT-e59514a_linux_amd64.tar.gz
    • archiving                                      name=dist/telecrawl_0.2.0-SNAPSHOT-e59514a_linux_arm64.tar.gz
  • calculating checksums
  • writing artifacts metadata
  • release succeeded after 11s
  • thanks for using GoReleaser!

Dependency and security boundary

Socket reported both dependency alerts and dependency changes. The golang.org/x/tools path is Go project tooling: this PR uses golang.org/x/tools/cmd/deadcode for CI, and gotd also brings an older x/tools version transitively. That is not a random Telegram runtime package. The actual gotd-specific dependency concern is github.com/gotd/neo.1.5, which is archived and arrives through github.com/gotd/td.145.1.

$ nix shell nixpkgs#go_1_26 -c go mod graph | rg 'github.com/gotd/td|github.com/gotd/neo|golang.org/x/tools'
github.com/openclaw/telecrawl github.com/gotd/neo@v0.1.5
github.com/openclaw/telecrawl github.com/gotd/td@v0.145.1
github.com/openclaw/telecrawl golang.org/x/tools@v0.45.0
github.com/gotd/td@v0.145.1 github.com/gotd/neo@v0.1.5
github.com/gotd/td@v0.145.1 golang.org/x/tools@v0.44.0

The code review result is that this is an explicit maintainer security/dependency acceptance, not an untested hidden behavior: tdata and Postbox sessions are loaded into gotd memory storage for the import/fetch run, and native Postbox media fetch validates fetched message identity before accepting media.

Options checked for github.com/gotd/neo:

  • Upgrading gotd does not help: github.com/gotd/td v0.145.1 is the latest tagged release, and it still depends on github.com/gotd/neo v0.1.5 through github.com/gotd/td/clock.
  • Replacing gotd is worse for this PR because the branch depends on gotd for real Telegram sessions, dialogs/messages, tdata, and media fetches.
  • Forking gotd/td or adding a local replace for gotd/neo is possible, but it creates a fork/maintenance burden to remove a small timer/ticker abstraction dependency.
  • Recommended handling: accept/ignore gotd/neo for this PR, document that it is archived, and keep the active Telegram client dependency on current gotd/td. github.com/gotd/neo tests pass locally and govulncheck reports no called vulnerabilities in telecrawl.

Local ClawSweeper-style preflight

I ran a local preflight against the current ClawSweeper review rubric with three read-only review lenses:

  • Python residue/proof quality: found stale PR-body text only; active code/docs/CI are clean.
  • Behavior/dead-code: no findings; removed wrappers were unreachable from production and the new deadcode ./cmd/telecrawl CI rule is targeted at the executable entry point.
  • gotd/session/security/privacy: no code defects found beyond maintainer acceptance of gotd/native auth-key reuse; proof output is aggregate counts only after path redaction.

Remote checks

Remote checks for pushed head e59514a5bff0:

$ gh pr checks 10 --repo openclaw/telecrawl
deps          pass  31s   https://github.com/openclaw/telecrawl/actions/runs/27106480812/job/79996436849
docker        pass  1m34s https://github.com/openclaw/telecrawl/actions/runs/27106480814/job/79996436765
lint          pass  2m31s https://github.com/openclaw/telecrawl/actions/runs/27106480812/job/79996436850
release-check pass  5m22s https://github.com/openclaw/telecrawl/actions/runs/27106480812/job/79996436866
secrets       pass  15s   https://github.com/openclaw/telecrawl/actions/runs/27106480812/job/79996436888
test          pass  3m10s https://github.com/openclaw/telecrawl/actions/runs/27106480812/job/79996436853

Remaining maintainer decision

Compatibility decision: Josh explicitly requested no backward compatibility for removed Python dependencies. telecrawl deps install and --python are intentionally gone rather than kept as deprecated no-ops.

The remaining non-automated review item is whether maintainers accept the gotd dependency graph and the native-session media fetch security boundary.

Prompt summary

Josh asked for a single PR that removes Python and non-Go Telegram import dependencies from telecrawl, rebased on latest main, while preserving behavior for both Telegram Desktop and native macOS Telegram. He asked for sub-agent checks against gotd and upstream Telegram source code before choosing the Go replacement path, behavior tests and media-fetch support, commits per repair slice, real command-output proof, no Python compatibility shim, live testing of the newly installed Telegram Desktop tdata source, and a ClawSweeper-style preflight before re-review.

for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.

for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 7, 2026, 6:54 PM ET / 22:54 UTC.

Summary
The PR replaces Python Telegram import scripts with Go tdata and Postbox importers, removes Python setup surfaces, updates docs/Docker/workflows, and adds gotd/Postbox decoding code and dependencies.

Reproducibility: not applicable. this is a feature-level replacement PR, not a bug report with a current-main failing path. The PR body provides live after-change CLI/import proof instead of a bug reproduction.

Review metrics: 3 noteworthy metrics.

  • Diff size: 31 files, 4973 additions, 3109 deletions. The branch replaces the core import implementation and packaging surface, so human review should focus on upgrade and security boundaries rather than treating it as a small cleanup.
  • Python bridge removal: 2 Python importer scripts removed. The removed scripts are the current runtime bridge on main, making this an intentional compatibility break for setup and wrapper scripts.
  • New dependency root: 1 direct gotd dependency added. github.com/gotd/td brings the Telegram client implementation and transitive supply-chain review surface.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Get explicit maintainer acceptance for removing Python setup/flag compatibility and for the gotd/native-session media-fetch boundary.

Risk before merge

  • [P1] This intentionally removes the documented telecrawl deps install, --python, Docker Python dependencies, and Python bridge surfaces, so existing scripts or deployment wrappers that rely on them will fail unless maintainers accept the Go-only upgrade break.
  • [P1] The new native Postbox --fetch-media path reads existing Telegram auth-key material from accounts-shared-data and uses gotd network calls, which is a security-boundary change even though it is gated by the explicit media-fetch flag.
  • [P1] The gotd dependency graph adds a Socket-flagged archived transitive package (github.com/gotd/neo); the PR's govulncheck proof lowers vulnerability concern but does not settle supply-chain acceptance.

Maintainer options:

  1. Accept the Go-only importer boundary
    Maintainers can merge as-is if they intentionally want to remove Python setup and flag compatibility and are comfortable with the new native-session gotd media-fetch path.
  2. Preserve an upgrade shim first
    Before merge, keep a deprecated deps install or --python compatibility path only if maintainers decide existing automation needs one more release of warning.
  3. Pause for dependency/security alternative
    Pause or close this branch if maintainers want a different Telegram client strategy or cannot accept the archived gotd transitive dependency.

Next step before merge

  • [P2] The remaining action is maintainer compatibility and security acceptance, not an automated repair on the PR branch.

Security
Needs attention: No narrow exploit was found, but the PR needs maintainer security/supply-chain acceptance for native Telegram auth-key reuse and the new gotd dependency graph.

Review details

Best possible solution:

Merge only after maintainers explicitly accept the Go-only compatibility break and the gotd/native-session security and supply-chain boundary for Telegram media fetches.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this is a feature-level replacement PR, not a bug report with a current-main failing path. The PR body provides live after-change CLI/import proof instead of a bug reproduction.

Is this the best way to solve the issue?

Unclear for maintainer policy: the implementation appears coherent and well-proven, but whether a Go-only break and gotd/native-session media fetch are the right product/security tradeoff needs maintainer acceptance.

AGENTS.md: not found in the target repository.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 9df81dcf3183.

Label changes

Label justifications:

  • P2: This is a normal-priority but broad import-stack replacement with limited blast radius to Telegram import users.
  • merge-risk: 🚨 compatibility: Merging removes the documented Python setup command, --python flag, Docker Python runtime, and bridge dependencies that existing user automation may still call.
  • merge-risk: 🚨 security-boundary: Merging adds a gotd path that reads native Telegram auth-key material and performs media-fetch network calls under --fetch-media.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body includes redacted current-head terminal output for --help, active Python-residue scans, live tdata import/status with --fetch-media, live native Postbox import/status with --fetch-media, and validation commands.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted current-head terminal output for --help, active Python-residue scans, live tdata import/status with --fetch-media, live native Postbox import/status with --fetch-media, and validation commands.
Evidence reviewed

Security concerns:

  • [medium] Accept native Telegram auth-key reuse — internal/telegramdesktop/postbox/source.go:121
    The new Postbox --fetch-media implementation reads accounts-shared-data, decodes the native session auth key, and uses it with gotd network calls; that is an intentional but security-sensitive boundary change.
    Confidence: 0.88
  • [low] Review archived gotd transitive dependency — go.mod:21
    The PR adds github.com/gotd/td, whose dependency graph includes Socket-flagged github.com/gotd/neo v0.1.5; maintainer supply-chain acceptance is still needed even with no called vulnerabilities reported in the PR proof.
    Confidence: 0.8

What I checked:

  • Current main still has Python bridge: Current main contains Docker Python stages, telecrawl deps install, --python, embedded importer scripts, and Python bridge dependencies. (internal/cli/cli.go:57, 9df81dcf3183)
  • PR removes active Python residue: The PR head has no tracked Python bridge files or active-path Python setup strings outside historical changelog context. (e59514a5bff0)
  • Security-sensitive credential path: The PR reads native macOS Telegram account auth-key material and creates an in-memory gotd session for --fetch-media. (internal/telegramdesktop/postbox/source.go:121, e59514a5bff0)
  • Dependency surface changed: The PR adds github.com/gotd/td v0.145.1; Socket also flagged archived transitive github.com/gotd/neo v0.1.5 in the PR discussion. (go.mod:21, e59514a5bff0)
  • Diff hygiene check: The local diff has no whitespace errors under git diff --check. (e59514a5bff0)
  • Original import stack provenance: The current Python bridge, Docker packaging, docs, and importer scripts were introduced in the v0.2.0 release commit. (internal/telegramdesktop/importer.go:20, 49930fd7e801)

Likely related people:

  • Peter Steinberger: The released v0.2.0 import stack added the current Python bridge, Docker packaging, docs, and importer scripts across the central files. (role: introduced behavior; confidence: high; commits: 49930fd7e801; files: internal/telegramdesktop/importer.go, internal/telegramdesktop/scripts/import_postbox.py, internal/telegramdesktop/scripts/import_tdata.py)
  • the sun gif man: Recent merged work extended Telegram contacts, Postbox metadata, contact export, and importer-adjacent CLI/store behavior. (role: recent area contributor; confidence: high; commits: 01eeecc55fc0, 9df81dcf3183; files: internal/telegramdesktop/importer.go, internal/telegramdesktop/scripts/import_postbox.py, internal/cli/cli.go)
  • Vincent Koc: Recent history includes targeted Telegram import documentation work around tempkey hashing, adjacent to the Postbox decoder/auth material touched here. (role: adjacent docs contributor; confidence: medium; commits: 9b449241aaaa; files: README.md, internal/telegramdesktop/importer.go)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@joshp123 joshp123 force-pushed the codex/pure-go-telegram-import branch from 9d0eeed to d42fd33 Compare June 7, 2026 20:09
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang.org/​x/​crypto@​v0.45.0 ⏵ v0.52.074 +1100100100100
Addedgithub.com/​gotd/​td@​v0.145.177100100100100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: golang golang.org/x/tools is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?golang/modernc.org/sqlite@v1.50.1golang/golang.org/x/crypto@v0.52.0golang/github.com/gotd/td@v0.145.1golang/golang.org/x/tools@v0.44.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore golang/golang.org/x/tools@v0.44.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Deprecated by its maintainer: golang github.com/gotd/neo

Reason: Repository has been archived by the owner.

From: ?golang/github.com/gotd/td@v0.145.1golang/github.com/gotd/neo@v0.1.5

ℹ Read more on: This package | This alert | What is a deprecated package?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore golang/github.com/gotd/neo@v0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@joshp123 joshp123 force-pushed the codex/pure-go-telegram-import branch from d42fd33 to 8163e0a Compare June 7, 2026 20:15
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Jun 7, 2026
@joshp123 joshp123 force-pushed the codex/pure-go-telegram-import branch from 8163e0a to c56572a Compare June 7, 2026 20:33
@joshp123 joshp123 force-pushed the codex/pure-go-telegram-import branch from c56572a to 69d5852 Compare June 7, 2026 20:45
@joshp123

joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated current head 69d5852 after the review:

  • telecrawl deps install is now a deprecated no-op instead of a hard failure.
  • global/import --python is accepted and ignored with a warning instead of failing argument parsing.
  • changelog edits were removed from the PR.
  • current-head CI is green, including release-check after capping GoReleaser parallelism.
  • PR body now calls out the remaining live tdata proof limit and gotd dependency/security review need.

for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.

for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@joshp123

joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated PR body with current-head proof for 69d5852 after the last review:

  • current-head race test proof is now included without the stale caveat.
  • live native Postbox aggregate smoke was rerun on current head and the PR body now says so.
  • current-head remote CI remains green.

The remaining explicit limits are still live Telegram Desktop tdata availability on this Mac and maintainer acceptance/security review for gotd/native session handling.

for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.

for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jun 7, 2026
@joshp123

joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up after the latest ClawSweeper review:

  • CI is green on current head 69d5852.
  • Current-head native Postbox aggregate proof is in the PR body.
  • I cannot produce live Telegram Desktop tdata proof from this machine: expected paths, Spotlight metadata lookup, and bounded home searches did not find a tdata directory.
  • The README written_by: ai frontmatter is intentional for this branch because the user-provided AGENTS instructions for this worktree require AI frontmatter on human-readable non-code files substantially edited by an agent. I am not removing it without a higher-priority instruction from Josh/maintainers.
  • The gotd/native session path still needs maintainer security acceptance or a different Telegram client strategy.

for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.

for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels

Comment thread .github/workflows/docker.yml Outdated
Comment thread internal/cli/cli.go Outdated
Comment thread internal/cli/cli.go Outdated
Comment thread internal/cli/cli.go Outdated
Comment thread internal/cli/cli.go Outdated
Comment thread internal/cli/cli.go Outdated
Comment thread README.md Outdated
Comment thread README.md
@joshp123 joshp123 changed the title Replace Telegram import bridge with pure Go get rid of python libraries replace with native golang Jun 7, 2026
@joshp123

joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated head e59514a5bff0 after the latest review comments:

  • removed the telecrawl deps install no-op and all --python compatibility handling instead of preserving removed Python dependency surfaces;
  • removed the Docker Python/venv absence assertion and kept Docker smoke focused on building/starting the Go CLI;
  • removed generated README frontmatter;
  • added a targeted deadcode ./cmd/telecrawl CI check and deleted the unreachable Postbox helper wrappers it found;
  • updated the PR body with redacted actual output for live Telegram Desktop tdata and native macOS Postbox imports, including --fetch-media counters and archive status output;
  • all pushed-head checks pass: deps, docker, lint, release-check, secrets, and test.

The only remaining review item I know about is maintainer acceptance of the gotd dependency graph and native-session media-fetch security boundary.

for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.

for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@joshp123

joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore golang/golang.org/x/tools@v0.44.0

(this is published by the core go team.......)

@joshp123

joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Latest head/body are now aligned for e59514a5bff0:

  • all inline review threads from Josh are resolved because the corresponding code/docs were removed or the media-download question is answered by live --fetch-media proof;
  • the PR body now includes redacted actual output for both live tdata and live native Postbox imports/status/media counts;
  • the compatibility decision is explicit: no backwards compatibility for removed Python setup/flag surfaces;
  • the Socket/dependency section now separates golang.org/x/tools as Go project tooling from the real gotd-specific archived transitive dependency concern, github.com/gotd/neo.

All pushed-head checks are green.

for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.

for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@joshp123

joshp123 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final re-review request for current head/body e59514a5bff0 after the last body edit:

  • live redacted tdata and native Postbox proof is in the PR body with actual output;
  • Josh's inline review threads are resolved;
  • Python setup/flag compatibility is intentionally removed per maintainer direction;
  • the dependency section now explains that golang.org/x/tools is Go project tooling and that the remaining gotd/neo warning has no better low-risk alternative than accepting it with current gotd/td.

All pushed-head checks are green.

for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.

for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 7, 2026
@joshp123 joshp123 marked this pull request as ready for review June 7, 2026 22:39
@vincentkoc vincentkoc merged commit 9ef3b11 into openclaw:main Jun 8, 2026
6 checks passed
@joshp123 joshp123 deleted the codex/pure-go-telegram-import branch June 8, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants