fix: preserve camera permission intent and distinguish unknown reply expression

This commit is contained in:
zenord
2026-10-12 11:33:36 +08:00
parent d43c7d4e80
commit b521d368a5
26 changed files with 544 additions and 101 deletions
+9 -8
View File
@@ -15,10 +15,11 @@ import hashlib,json,runpy
root=Path.cwd();directory=root/'logs/voice-investigation'
load=lambda name:json.loads((directory/name).read_text())
release=load('release-emotion.json');probe=load('probe-emotion.json');deploy=load('gateway-emotion-deploy.json');client=load('client-emotion-tests.json')
assert release['version_name']=='0.5.0' and release['version_code']==8 and release['signature']=='apksigner_verified'
assert release['version_name']=='0.5.1' and release['version_code']==9 and release['signature']=='apksigner_verified'
assert release['download_http_status']==200 and release['download_bytes']==release['bytes']
assert hashlib.sha256((root/release['apk']).read_bytes()).hexdigest()==release['sha256']
assert hashlib.sha256((root/'artifacts/lan-voice-v040-arm64-debug.apk').read_bytes()).hexdigest()=='5a6f88cb2f825dbcd5c7b8c1f212b369534bc53c49533e196fb5e9287902e934'
assert hashlib.sha256((root/'artifacts/lan-voice-v050-arm64-debug.apk').read_bytes()).hexdigest()=='da47f7a08f63a68fbb6dbe7fb3d803ee58b402de393112a32f92a63ad50c1f33'
assert probe['status']=='passed' and probe['downlink_bytes']>0 and probe['llm_chars']>0 and probe['drained_ack']
assert probe['emotion_count']==1 and probe['emotion_before_pcm'] and probe['tts_input_matches_body'] and probe['tts_requests']==1
assert deploy['status']=='deployed' and deploy['applied'] and deploy['health']=='ok' and client['status']=='passed'
@@ -38,18 +39,18 @@ PY
git diff --check
git add -- app/build.gradle app/src/main/java/com/gorios/lanvoice/MainActivity.kt \
app/src/main/java/com/gorios/lanvoice/audio/VoiceSession.kt \
app/src/main/java/com/gorios/lanvoice/dialogue/ReplyEmotion.kt \
app/src/main/java/com/gorios/lanvoice/expression/ExpressionController.kt \
app/src/main/java/com/gorios/lanvoice/dialogue/ReplyEmotion.kt app/src/main/java/com/gorios/lanvoice/diag/DiagnosticReportUpload.kt \
app/src/main/java/com/gorios/lanvoice/expression/ExpressionController.kt app/src/main/java/com/gorios/lanvoice/expression/CameraPermissionGate.kt \
app/src/main/java/com/gorios/lanvoice/expression/ExpressionState.kt \
app/src/main/java/com/gorios/lanvoice/expression/ExpressionUi.kt \
app/src/main/java/com/gorios/lanvoice/net/DialogueProtocol.kt \
gateway/gateway.py gateway/llm_provider.py gateway/reply_emotion.py gateway/SOURCE_MANIFEST.json gateway/README.md gateway/env.example gateway/scripts/check-archive.py \
gateway/tests/test_continuity.py gateway/tests/test_reply_emotion.py gateway/tests/test_gateway_emotion.py gateway/tests/test_llm_provider.py \
gateway/tests/test_debug.py gateway/tests/test_continuity.py gateway/tests/test_reply_emotion.py gateway/tests/test_gateway_emotion.py gateway/tests/test_llm_provider.py \
tests/session/AudioDoubles.kt tests/session/ProtocolEvents.kt tests/session/ConnectionCheck.kt tests/protocol/ProtocolCheck.kt \
scripts/check-reply-regressions.py scripts/check-reply-structure.py scripts/check-emotion-regressions.sh \
scripts/check-expression-rules.sh tests/expression/CameraPermissionCheck.kt scripts/check-reply-regressions.py scripts/check-reply-structure.py scripts/check-emotion-regressions.sh \
scripts/deploy-gateway-source.py scripts/rollback-gateway-source.py scripts/update-gateway-manifest.py scripts/deploy-gateway.py scripts/archive-gateway.py \
scripts/probe-reply-emotion.py scripts/package-emotion-release.sh scripts/finalize-emotion-release.sh \
docs/REPLY_EMOTION_050.md docs/PLAN.md
docs/CAMERA_EMOTION_051.md docs/REPLY_EMOTION_050.md docs/PLAN.md
git diff --cached --check
python3 - <<'PY'
import subprocess
@@ -57,7 +58,7 @@ names=subprocess.check_output(['git','diff','--cached','--name-only'],text=True)
assert names and all(n.startswith(('app/','gateway/','tests/','scripts/','docs/')) for n in names)
assert not any(any(x in n.split('/') for x in ('logs','artifacts','.runtime','__pycache__','models')) or n.endswith(('.pem','.key','.apk','.wav','.pcm','.pyc')) for n in names)
PY
git -c user.name=zenord -c user.email=zenord@email.com commit -m 'feat: merge reply emotions while preserving configurable Qwen/Doubao provider'
git -c user.name=zenord -c user.email=zenord@email.com commit -m 'fix: preserve camera permission intent and distinguish unknown reply expression'
git push origin main
python3 - <<'PY'
import json,subprocess
@@ -65,7 +66,7 @@ from pathlib import Path
commit=subprocess.check_output(['git','rev-parse','HEAD'],text=True).strip()
remote=subprocess.check_output(['git','ls-remote','origin','refs/heads/main'],text=True).split()[0]
assert commit==remote
result={'commit':commit,'branch':'main','push':'verified','archive':'gateway/','version':'0.5.0','archive_baseline':'19a7adccd9322986eb0646b165b9ce1cf2650cf2'}
result={'commit':commit,'branch':'main','push':'verified','archive':'gateway/','version':'0.5.1','archive_baseline':'19a7adccd9322986eb0646b165b9ce1cf2650cf2'}
Path('logs/voice-investigation/git-emotion-release.json').write_text(json.dumps(result,indent=2)+'\n')
print(json.dumps(result,indent=2))
PY