Commit graph

294 commits

Author SHA1 Message Date
isaac
3525bcacb2 Add watch profile guard 2026-05-30 22:16:10 +02:00
isaac
0682ac9d57 Update signing 2026-05-27 01:06:41 +02:00
isaac
81d8ae4c67 Update CI 2026-05-26 23:32:44 +02:00
isaac
78267e8902 Vendor tgwatch sources into Telegram/WatchApp; build from in-repo snapshot
Vendor the standalone tgwatch watch-app sources into Telegram/WatchApp/ as a
tracked snapshot and build it from there by default (tracked Bazel inputs).
Make.py drives embedding via --embedWatchApp (--watchAppSourcePath removed);
the filegroup excludes .swiftpm/.build. Documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 23:12:16 +02:00
isaac
64c9e72fad Embed xcodebuild-built tgwatch app into the Bazel Telegram IPA
Add the apple_prebuilt_watchos_application rule (prebuilt_watchos.bzl + its
worker) that runs xcodebuild on the watch app, codesigns the .app and nested
framework, and feeds it to the Telegram ios_application's watch_application
slot, gated on //Telegram:embedWatchApp. Make.py gains device-gated watch
embed flags (--watchApiId/--watchApiHash/--watchSigningIdentity/
--watchProvisioningProfile), and the embedded app's version is matched to the
host (versions.json + buildNumber).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 23:11:36 +02:00
Isaac
8dc06f48ce Merge commit '5b013073bf'
# Conflicts:
#	CLAUDE.md
#	MODULE.bazel.lock
#	submodules/TgVoipWebrtc/tgcalls
#	third-party/td/build-td-bazel.sh
#	third-party/webrtc/webrtc
2026-04-30 22:20:45 +02:00
Isaac
5962a563e4 feat: tgcalls CLI test tool with group SFU, video, and adaptation
Squashed buildout of the tgcalls testbench:

- CLI test tool with --mode p2p/reflector/group/group-churn,
  cross-version interop (--version, --version2), and quiet/summary output
- Linux toolchain + Docker multi-stage build, AWS Fargate mass test harness,
  local parallel mass test harness with signaling loss simulation
- SCTP writable gate, retransmission timer tuning, role-based handshake
- InstanceV2CompatImpl (PeerConnection backend with V2Impl signaling) and
  SignalingTranslator for v14.0.0 interop
- In-process Go/Pion SFU (ICE+DTLS+SRTP+SCTP per participant) with audio
  RTP forwarding, ActiveAudio/VideoSsrcs data channel broadcast, RTCP
  feedback path, and CGo c-archive integration
- GroupInstanceReferenceImpl (PeerConnection group-call) and mixed-impl
  group mode (--reference-participants), with SDP munging for simulcast
- H264 simulcast group video (FakeVideoTrackSource pattern generator,
  FakeVideoSink frame counting, --video flag, two-pass channel setup,
  reactive video setup from ActiveVideoSsrcs)
- Group churn stress mode (--mode group-churn, --churn-cycles)
- SFU stream-quality adaptation: BandwidthEstimator, LayerSelector
  state machine, RtxRingBuffer, simulcast SSRC rewrite
- Transport-cc feedback generation, NetworkSimulator (delay/jitter/loss/
  token-bucket bandwidth), --network-scenario step-down-up
- CLAUDE.md updates throughout

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 18:28:43 +02:00
isaac
90b2ba0bd4 SwiftTL: avoid trap when flags field fails to parse
Generated parse_<ctor>(...) for constructors with conditional fields
used to emit 'if Int(_N!) & Int(1 << K) != 0 { ... }' as the gate,
and 'let _cM = (Int(_N!) & Int(1 << K) == 0) || _M != nil' as the
per-field validation. Both force-unwrap _N (the flags field read)
before the bottom-of-function '_cN = _N != nil' validation runs,
so a buffer short enough to fail the flags read traps
deterministically instead of returning nil.

Replace the force-unwraps with (_N ?? 0). Missing flags then reads
as "all bits off": every gated branch is skipped, each flag-gated
_cM short-circuits to true via the '== 0' clause, and the flags
field's own _cN = _N != nil still fails so the overall constructor
validation falls through to return nil — matching the intended
"return nil on truncated buffer" contract.

Touches both generator emit paths (flat generateImplFile and layered
emitLayeredType). Regenerated Api*/SecretApiLayer*.swift follow in a
separate commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 23:44:26 +04:00
isaac
57bfe559ea SwiftTL: main.swift branches on ParsedSchema
Flat schemas keep the existing generate(...) pipeline. Layered
schemas iterate resolveLayeredTypes and write one
{apiPrefix}Layer{N}.swift per layer via generateLayered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:56:05 +04:00
isaac
803bf23269 SwiftTL: add CodeGenerator.generateLayered for per-layer output
Emits one {apiPrefix}Layer{N}.swift file per layer: file-scope
dispatch table, public struct {apiPrefix}{N} with parse/parseVector/
serializeObject, nested public enums for each sum type using the
inline-args shape. Int256 dispatch entry emitted only when a layer's
constructors reference it. Reuses typeReferenceRepresentation /
generateFieldSerialization / generateFieldParsing unchanged, passing
the struct name as the apiPrefix so nested type refs render correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:54:09 +04:00
isaac
10054efd81 SwiftTL: add Resolver.resolveLayeredTypes
Walks layer sections in order, threads a running constructor-name map
with last-wins semantics, and snapshots [SumType] at each layer
boundary. Constructors appearing only in later layers do not leak into
earlier layers' snapshots.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:46:48 +04:00
isaac
dba8a67bcb SwiftTL: add ParsedSchema + layered schema parsing
DescriptionParser.parse(data:) now returns ParsedSchema (.flat or
.layered) based on the presence of ===N=== markers. Layered schemas
split constructor lines per layer; pre-marker constructors attach to
the lowest-numbered layer; ---functions--- is rejected in layered
mode; non-ascending markers throw.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:36:09 +04:00
isaac
bb29084392 SwiftTL: thread apiPrefix, drop dead CLI flags and LegacyOrderParser
Preparation for layered schema generation. Threads apiPrefix: String
through CodeGenerator.generate / generateMainFile / generateImplFile
/ typeReferenceRepresentation so the output's namespace name can
come from the --api-prefix=<prefix> CLI flag rather than a hard-coded
"Api". Drops the --stub-functions and --print-constructors=N-M flags
(both unused) and the LegacyOrderParser.swift file (obsolete migration
helper that re-parsed hand-emitted Api0.swift).

No behavior change for the flat Api*.swift output when
--api-prefix=Api (the default). Enables the upcoming layered secret-
scheme pipeline to reuse the same generator helpers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:24:14 +04:00
isaac
0fd2765908 DecryptMatch: pure-Python port of fastlane match decrypt.rb
Replace the Ruby decrypt.rb shell-out with a direct Python call to
decrypt_match_data(). The iOS build no longer depends on a Ruby
interpreter. Includes the spec, plan, AES-256 port, tightened error
surfaces for key length and V1 fallback, and the BuildConfiguration
wire-up that drops decrypt.rb.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 18:45:34 +02:00
Isaac
45984d2a12 Update deploy 2026-04-07 20:48:44 +02:00
Isaac
203047a464 Update deploy 2026-04-07 18:50:47 +02:00
Isaac
f3e1795b68 Temp 2026-04-07 08:11:27 +02:00
Isaac
18abe71dca Support Xcode 26.4 2026-03-30 20:44:10 +08:00
Isaac
22e58eb5e4 Add SwiftTL 2026-03-27 19:22:57 +08:00
Isaac
c2cd6478a8 Revert "Temp"
This reverts commit 099267a84a.
2026-03-16 20:49:54 +01:00
Isaac
099267a84a Temp 2026-03-16 20:45:43 +01:00
Isaac
3d3232eedc Temp 2026-03-13 09:00:55 +01:00
Isaac
8605549176 Update submodule 2026-03-10 08:54:54 +01:00
Isaac
45e8661802 Update submodules 2026-02-23 11:17:26 +01:00
Isaac
7171441b96 Update 2026-02-16 21:54:04 +04:00
Isaac
dec912f2db Update 2026-02-15 22:50:18 +04:00
Isaac
45b3705f1f Re-enable incremental build 2026-02-11 22:05:23 +04:00
Isaac
9c4e390f0d Various improvements 2026-01-30 18:50:18 +08:00
Isaac
6558d2e265 Various improvements 2026-01-16 21:23:32 +08:00
Isaac
3a1d85784e Various improvements 2026-01-06 21:20:16 +08:00
Isaac
26d845520b Update rules_apple 2026-01-02 23:15:24 +08:00
Isaac
7ed08c0141 Build system 2025-12-26 19:42:31 +08:00
Isaac
b90e17064e Update build system 2025-12-15 02:37:57 +08:00
Isaac
0c3530d8a8 Glass 2025-12-10 00:16:36 +08:00
Isaac
dca1f06e91 Update 2025-12-06 01:42:16 +08:00
Isaac
1ee7268488 Glass 2025-12-06 01:28:06 +08:00
Isaac
557af859bb build-system 2025-12-01 22:13:16 +08:00
Isaac
0055396d4d Update 2025-11-26 23:05:30 +08:00
Isaac
49ae84062b Update build system 2025-11-17 23:16:39 +08:00
Isaac
481419ced0 Debug 2025-11-06 00:34:55 +04:00
Isaac
feba38c28b Debug 2025-11-06 00:27:05 +04:00
Isaac
5783d24652 Debug 2025-11-06 00:22:48 +04:00
Isaac
9580e43846 Fix 2025-11-06 00:17:49 +04:00
Isaac
4e9f09e2a1 Debug 2025-11-06 00:06:45 +04:00
Isaac
8ff8bd766b Debug 2025-11-06 00:05:31 +04:00
Isaac
fad96534ce Debug 2025-11-06 00:02:06 +04:00
Isaac
5d46a9c219 Debug ip 2025-11-05 23:57:04 +04:00
Ilya Laktyushin
9e7b0efc8b Update 2025-09-23 23:45:49 +04:00
Isaac
1d5de1be39 Update submodules 2025-09-19 15:36:24 +04:00
Isaac
905de7ee78 Update apple_support 2025-09-18 14:25:43 +04:00