Repository navigation
feat(rollup): v0.3.2 Comprehensive Stability Rollup (24 Defect Remediation) - #61
Merged
Merged
Conversation
- Close MediaCodec input image in finally block and query input buffer capacity (BUG-01) - Ensure startForeground is called before service stop/destroy to avoid watchdog timeout (BUG-02) - Handle INFO_OUTPUT_FORMAT_CHANGED in drainOutput to extract SPS/PPS parameter sets (BUG-03) - Respect ByteBuffer position in copyPlane to prevent chroma plane interleaving corruption (BUG-05) - Propagate configuration failures by throwing in VideoEncoder.start() (BUG-06) - Handle smaller resolution camera frames with black centering in toFrameData (BUG-07) - Release MediaCodec output buffer before network transmit to eliminate buffer starvation (BUG-08) - Support ultra-wide lens ranges in ZoomStepper.shouldShow (BUG-18)
…urrency defects - Delegate auto-approval exclusively to control.Server in start.Run to eliminate pairing race (BUG-04) - Wait for receiver process termination with timeout to avoid orphaned gst-launch-1.0 (BUG-12) - Prevent destructive session file deletion on transient probe timeouts in lifecycle.check (BUG-13) - Ensure child processes are drained and reaped on smoke test failures and timeouts (BUG-20) - Handle multi-device exclusive_caps CSV length mismatch in ExclusiveCapsForDevice (BUG-21)
…, and revocation defects - Retain pairing secrets until RTP media starts instead of one-shot destruction on status poll (BUG-09) - Eliminate operator approval blocking by QR expiry and add clock skew tolerance (BUG-10) - Add POST /leave endpoint and client teardown to reset pairing state on leave (BUG-11) - Invalidate active sessions and reset media allow when trusted device is revoked (BUG-19)
…, and package dependencies - Add -sSf flag to curlArgs and error rejection in parsePairing (BUG-14) - Prevent desktop restart into broken state on failed daemon stop in finishStop (BUG-15) - Invalidate and clear stale QR code cache in qrProcess on daemon restarts (BUG-16) - Correct Fedora RPM packaging dependency to akmod-v4l2loopback (BUG-17) - Install MIT license to /usr/share/licenses in AUR PKGBUILD (BUG-22) - Add pre-flight check and error reporting for missing qrencode binary (BUG-23) - Preserve root-cause error line in startProcess.stderr SplitParser (BUG-24)
kvm404
force-pushed
the
fix/v0.3.2-stability-rollup
branch
from
September 3, 2026 13:47
d870ee4 to
3404161
Compare
Require loopback, the paired control IP, QR session+token, resume_token, or pairing_secret before ResetPairing. Random LAN hosts get 403. Keep WaitingApproval polling after QR TTL (BUG-10) but test 120s clock skew. Assert letterbox chroma fill/siting. Drop undeclared QML write.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: feat(rollup): v0.3.2 Comprehensive Stability Rollup (24 Defect Remediation)
Summary
This Pull Request resolves all 24 verified architectural and implementation defects documented during the PhoneCam system audit, encompassing memory leaks, concurrency races, protocol desynchronizations, packaging incompatibilities, and denial-of-service edge cases.
All fixes are implemented on branch
fix/v0.3.2-stability-rollupand organized into 4 logical atomic commits:Commit 1 (
35c5efe) — Android Media Pipeline & Lifecycle (Workstream A):BUG-01: CloseImageProxyinfinallyblock and query input buffer capacity to prevent GraphicBuffer pool exhaustion and color plane truncations.BUG-02: TriggerstartForegroundprior to service teardown inonStartCommandand UI stop flows to eliminate Android OSForegroundServiceDidNotStartInTimeException.BUG-03: InterceptINFO_OUTPUT_FORMAT_CHANGEDduringdrainOutputto cache baseline SPS/PPS parameter sets, ensuring RTP decoders recover from missing keyframe headers.BUG-05: Addsrc.position()buffer offset incopyPlaneto prevent UV chroma plane corruption on devices with interleaved direct byte buffers.BUG-06: Explicitly re-throwIllegalStateExceptionon encoder configuration failure inVideoEncoder.start()instead of swallowing intoonError.BUG-07: Centered letterboxing/pillarboxing with YUV black borders (Y=16, U=V=128) intoFrameDatawhen cameras negotiate resolutions below target, eliminating fatal assertions.BUG-08: Release MediaCodec output buffer before RTP packetization and network transmit, wrapping extraction intry ... finallyto eliminate encoder starvation, frame latency spikes, and buffer leaks on extraction exceptions.BUG-18: ExtendZoomStepper.shouldShow(minRatio, maxRatio)to detect ultra-wide camera lenses (0.5x–1.0x).Commit 2 (
584b80f) — Linux Daemon & Lifecycle Management (Workstream B):BUG-04: Delegate auto-approval exclusively tocontrol.Serverinstart.Runto prevent concurrency races that dropped the trust secret; guard external API log output with!config.AutoApprove.BUG-12: Bounded timeout wait (waitReceiverExit) on all exit/error paths insuperviseReceiver, preventing orphanedgst-launch-1.0processes from locking/dev/video10.BUG-13: IntroducestateUnresponsiveinlifecycle.check()to preservesession.jsonon transient HTTP probe timeouts while the PID is alive.BUG-20: Drain sender and receiver channels on timeout or error paths insmoke.Runto prevent process leaks.BUG-21: Default omitted multi-device slots to disabled (enabled: false, found: true) inExclusiveCapsForDevicewhenexclusive_capsCSV length is shorter than device index.Commit 3 (
15c287a) — Control Protocol, Session & Reconnect (Workstream C):BUG-09: Replace one-shot credential burning (TakeSecrets) withPeekSecrets, retaining standing credentials until RTP media packets are received from the approved peer.BUG-10: Remove QR TTL expiry checks during operator approval insession.approve()and add clock skew tolerance on Android.BUG-11: ImplementPOST /leaveroute incontrol.Serverand dispatch leave requests on Android to reset pairing state (including clearing negotiated video profiles) and permit immediate rescanning without daemon restart.BUG-19: Invalidate active in-memory pairing sessions and clear media allow rules immediately upon deleting a trusted device viaDELETE /trust/{id}, checking both approved and pending devices.Commit 4 (
3404161) — Desktop Plugin & Packaging (Workstream D):BUG-14: Add-sSffail-fast flag tocurlArgsand validate!obj.errorand required fields (v,control,rtp,session,token,expires) inModel.parsePairing.BUG-15: Abort restart loops inService.qml:finishStopon non-zero exit codes to avoid binding crashes.BUG-16: Invalidate and reset_lastQrJsoncache on daemon stop or QR render error inService.qml.BUG-17: Update Fedora RPM dependency toakmod-v4l2loopbackinpackaging/nfpm.yamlandsetup.go.BUG-22: Install MITLICENSEfile into${pkgdir}/usr/share/licenses/${pkgname}/LICENSEin AURPKGBUILD.BUG-23: Add pre-flight check and warning forqrencodeininstall.shand capture stderr inqrProcess.BUG-24: Preserve the first root-cause error line inService.qml:startProcess.stderrby guarding against subsequent line overwrites.Commit History
Verification & Testing Matrix
mise exec go@1.22.12 -- go test -v -race -count=1 ./...control,lifecycle,pairing,rtp,session,setup,smoke,start,trust,v4l2).JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew testDebugUnitTest --rerun-tasksJAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew assembleDebugmise exec node@25.2.1 -- node omarchy-plugin/test/model-test.jsSecurity & Architecture Highlights
Credential Preservation Under Lossy LAN:
The control protocol previously destroyed resume tokens on a single
GET /statusread. In lossy wireless environments, dropped HTTP frames resulted in permanent loss of reconnect ability. Secrets are now safely retained until RTP media packets verify successful end-to-end streaming.Loopback Revocation Isolation:
Revoking a device via
DELETE /trust/{id}now immediately tears down the media firewall rule and resets the active session in memory (for both approved and pending devices), preventing revoked devices from continuing to stream or being approved.Buffer Management & Graphic Memory Stability:
MediaCodec input images and output buffers are guaranteed to be closed/released via
finallyblocks, preventing thread starvation and memory exhaustion in continuous video capture sessions even under buffer underflow/indexing exceptions.Resource Cleanliness:
Supervision loops for
gst-launch-1.0and child smoke-test processes now enforce bounded timeouts to reap child processes, completely preventing orphaned locks on/dev/video10.