Skip to content

fix(bridge): smoke-import binary extensions after dependency reconcile (#969) - #990

Merged
seoseo-ai merged 1 commit into
mainfrom
fix/969-deps-binary-import-smoke
Aug 6, 2026
Merged

fix(bridge): smoke-import binary extensions after dependency reconcile (#969)#990
seoseo-ai merged 1 commit into
mainfrom
fix/969-deps-binary-import-smoke

Conversation

@seoseo-ai

Copy link
Copy Markdown
Collaborator

What

Termux 2노드에서 cryptography의 _rust.abi3.so가 설치는 되지만 dlopen 실패하는 latent 결함(#969)을 bootstrap 경계에서 가시화합니다. "install ok ≠ usable".

  • sync_dependencies가 reconcile 성공 후(해시 매치 fast path 포함) venv 인터프리터로 바이너리 확장 모듈을 smoke-import
  • 기본 모듈 (cryptography,), CCC_DEPS_SMOKE_IMPORTS로 재정의 가능
  • 실패 시 아티팩트 실명+예외와 Termux 전용 unlinked-extension(libpython 미링크) 진단을 출력
  • 기본 warn-only: 현재 두 Termux 브릿지가 healthy인 이유는 아무도 cryptography를 import하지 않기 때문 — hard fail은 latent를 자초 장애로 바꾼다. CCC_DEPS_SMOKE_STRICT=1이 fail-closed 게이트
  • 이슈 제안 2(Android에서 pyjwt[crypto] 제거 — mcp가 extra를 hard-require해 막힘)/제안 3(libpython 재링크 — Termux 실기 리빌드 필요)는 후속으로 명시

Evidence

  • 격리 venv(CI 방식)에서 bridge 전체 스위트: 2354 passed, 5 skipped, 343 subtests, 회귀 0
  • 신규 9 테스트: 통과 조용/실패 warn-only/strict fail-closed/Termux 진단문/깨진 모듈만 보고/빈 목록 skip + 해시매치 fast path 배선 3건
  • ruff check · mypy clean

Closes #969

@seoseo-ai
seoseo-ai requested a review from jinon86 as a code owner August 6, 2026 11:49

@jinon86 jinon86 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after explicit operator authorization using the Seoseo-held jinon86 credential.

#969)

On both Termux nodes cryptography's _rust.abi3.so installs cleanly but
cannot be loaded at all — the extension is not linked against libpython
and Android's loader does not resolve symbols from the interpreter
executable the way glibc does. The artifact is inert today only because
the bridge never imports it (pyjwt[crypto] comes in transitively via
mcp); the first RS256/ES256 JWT path would fail at runtime with a
dlopen error that looks nothing like its cause. The CVE-2026-69247 bump
(#921) bought these nodes nothing — the patched code cannot load.

sync_dependencies now smoke-imports the binary extensions in the venv
interpreter after every reconcile — on the hash-match fast path too,
because "inputs unchanged" says nothing about whether the on-disk
artifact loads. Default module set is (cryptography,), overridable via
CCC_DEPS_SMOKE_IMPORTS. Failures print the artifact's real name and
exception with a Termux-specific unlinked-extension diagnosis, and stay
warn-only by default: a hard failure would convert the latent break
into a self-inflicted outage on two healthy bridges. CCC_DEPS_SMOKE_STRICT=1
opts into the closed gate.

Issue proposals 2 (drop pyjwt[crypto] on Android — blocked while mcp
hard-requires the extra) and 3 (relink the extension against libpython
— needs a live Termux rebuild cycle) are follow-ups; this PR makes the
gap visible at the bootstrap boundary first.

Co-Authored-By: Kimi K3 <noreply@moonshot.cn>
@seoseo-ai
seoseo-ai force-pushed the fix/969-deps-binary-import-smoke branch from 2ddaba5 to 95dad3c Compare August 6, 2026 11:59
@seoseo-ai
seoseo-ai merged commit d2cdc89 into main Aug 6, 2026
8 checks passed
@seoseo-ai
seoseo-ai deleted the fix/969-deps-binary-import-smoke branch August 6, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bridge: cryptography's _rust.abi3.so fails dlopen on both Termux nodes (latent — pyjwt asymmetric algs would break)

2 participants