Skip to content

Unify controller transports and preserve both histories for the future repository merger #41

Open

Description

@atomicdeploy

Goal and boundaries

Coordinate atomicdeploy/PakarController and atomicdeploy/PCController toward one repository and one production firmware source tree, without losing either unrelated Git history, useful implementation, tests, licenses, settings or host work. Pealayer remains a coordinated consumer where its contract is affected. Do not perform an unrelated-history merge merely to close this issue.

This pass

  • Inventory every implemented framing, carrier, envelope, request/result/event contract, transfer path, client and build profile; distinguish source, fixture, build, runtime and hardware proof.
  • Preserve USB/UART/CDC recovery and specialized bootloader protocols. COBS is framing, not a competing USB transport. Existing raw opcode namespaces collide (Pakar0x11 audio versus PC0x11 PWM); never remove their admission boundary blindly.
  • Share malformed/golden/maximum-size fixtures and harden parsers without changing valid wire bytes. Keep CRC corruption detection separate from authentication.
  • Measure feature/resource deltas and expose real build-selected limits/capabilities; slim builds must explicitly reject unavailable operations, never silently acknowledge no-ops.

Next pass: shared semantics and parity

  • Select one source owner for portable framing, typed operation registry, identity/boot/session fencing, correlation, cancellation, deadlines, errors and events. Reuse superior existing implementations rather than creating another protocol.
  • Use additive optional fields/capability discovery, stable numeric IDs and bounded unknown-field handling. Do not use exact release equality, schema generations, version-selected adapters or silently reinterpret ambiguous old opcodes.
  • Define and test stream/datagram differences: reliable control/maintenance versus lossy frame streaming, fragmentation/reassembly, replay protection, leases, subscriptions, backpressure and state resynchronization. Never retry an outcome-unknown mutation.
  • Complete advertised API/command/event/firmware/file capabilities consistently across enabled USB/UART/OTG, TCP/HTTP/WebSocket, MQTT, UDP and BLE adapters; explicitly advertise exclusions, authentication and real size limits.

Following pass: MCU portability and merger

  • Retain the one production AVR source tree, shared with native conformance targets. Existing ATmega328P and Mega2560 are separate pin/timer/storage/toolchain profiles, not copied firmwares. Coordinate PCController#103/#227/Bump the cargo-dependencies group in /desktop with 3 updates #18/#125/#375 and PakarController#3/Complete PCController current-hardware contracts and gated future hardware #6/Apply the living unversioned API policy across firmware and all clients #16.
  • Isolate MCU HAL seams (GPIO, UART/USB, clocks/timers, storage, interrupts, buses, reboot/watchdog, LED drivers). Add actual STM32/ESP implementations only for selected chips/pinouts/toolchains and verified budgets; no unsupported target is advertised as functional.
  • Preserve EEPROM/LittleFS/settings backups and define guarded semantic imports; raw PC/Pakar EEPROM layouts are incompatible.
  • Inventory and reconcile worktrees, branches, stashes, PR conversations, failing checks and owner drafts in both repositories before merger; no force/reset/wholesale uncertain merges or check bypass.
  • Capture immutable refs/tags and source manifests; stage a reviewed git merge --allow-unrelated-histories that retains both graphs and original commit IDs. Compare EVERY overlapping and unique file using the existing donor ledger: owner, hashes, retained behavior, tests, licenses, omissions and remaining acceptance. No copy-flattening or silent deletion.
  • Consolidate duplicate code only after behavior/tests have a named canonical owner. Retain boards/business roles as build-selected profiles and clients as targets of the same living contract.
  • Gate the final default branch on full CI, cross-language/device interoperability, queue/loss/reconnect/soak tests, slim/full flash/RAM/stack budgets and commissioning/rollback evidence. Publish clean exact refs and remaining hardware gates; source tests alone do not establish production completion.

Acceptance

No partial transport is advertised as complete. Both repositories benefit before the eventual merger; all useful donor behavior is retained or explicitly tracked. Clients discover capabilities and limits, optional additions remain tolerant, and unsupported safety-critical semantics fail closed. Hardware and deployment require their own authorization and evidence.

Shared contract/core implementation owners and carrier completion

The current requirement is one shared semantic command/event contract and portable core, with complete enabled adapters, not a single oversized wire envelope.

Evidence already available, not full completion

PCController#704 is merged at 8b0ea74a347f656640cfda244582802ac0d09517: canonical native/Pakar allocation ownership, generated consumer views, published-ID stability and strict namespace checks. Pakar#43 and Pealayer#223 are related consumer checkpoints, not proof of complete payload, carrier, client or deployment parity. Earlier strict COBS/fragment fixtures also remain useful. Do not tick the full semantic/core/adapter requirements solely from those tests.

The future unrelated-history/source-tree merger, full MCU HAL work, preserved settings/rollback and real-device/LAN/soak gates above remain open. This issue update does not flash, reset, actuate or reconfigure production.

Activity

  1. atomicdeploy commented on Oct 30, 2026

    @atomicdeploy
    OwnerAuthor

    Cross-repository owner: atomicdeploy/PCController#702 . Initial source work targets strict shared COBS validation, packet-fragment symmetry, compatibility fixtures and truthful MCU inventory. Actual merger, full carrier/API parity and physical acceptance remain later gated steps.

  2. atomicdeploy commented on Oct 30, 2026

    @atomicdeploy
    OwnerAuthor

    Paired source checkpoints are pushed: Pakar4ca490c and PCController f122ccdf (PR703). The actual COBS cores/adapters agree on strict malformed-data rejection; valid encodings are unchanged, shared fixtures match, and PC UDP encoding/decoding fragment rules now agree. Pakar Rust shared-vector test passes, mobile analysis is clean and all13 USB tests pass; PC C++/Go/MCU-inventory tests pass. Full protocol wrapper/CI, complete service/carrier parity and hardware budgets/LAN/physical acceptance remain separate. New transport-convergence lookup exposes12 inventoried sources, nine still pending comparison; no blanket parity promotion. See docs/TRANSPORT-CONVERGENCE.md for the concrete matrix and next passes. Both repositories retain prior stashes/owner work; open failing/draft PRs are not blindly closed.

  3. atomicdeploy commented on Oct 30, 2026

    @atomicdeploy
    OwnerAuthor

    Checkpoint bd1f0f9 is pushed in PR42, currently dependent on PR40. The isolated LLDP fixture failure was fixed by reusing test-ethernet BoardCore include ownership, and that fixture now passes. Shared codec/USB/Rust tests and comparison checks pass; full exact-head CI and broad transport/hardware parity remain independent gates. The human renewed the clean-working-directory request: the one generated pyc was successfully removed by the normal native Remove-Item operation; no bypass/ignore/stash deletion was used. Both primary working trees are now clean and source-pushed; this supersedes the old generated-file cleanup blocker, not any open PR/review/CI blocker. Preserved owner worktrees and stashes are unchanged.

  4. atomicdeploy commented on Oct 30, 2026

    @atomicdeploy
    OwnerAuthor

    First slice merged: Pakar PR40 -> d5008bd and transport PR42 -> e2913e2 (reviewed source head 5e52e15); paired PCController PR703 -> 3d2d573d. Both canonical working directories are clean and this pass is on main. Shared codec/UDP/native/mobile fixtures and the complete local quality runner pass. IMPORTANT: GitHub completed PR42 through the normal auto-merge request before its final remote suite finished. Remote Build41068225231 and post-merge CI remain separate pending acceptance; no all-green, complete-parity, MCU-port or physical claim. Future merges must explicitly verify every applicable check rather than assume --auto waits. The PR40 and PC703 exact-head suites passed before their merges. PC cleanup is still incomplete: ready PR689/690/693 received normal expected-head branch updates and now require fresh CI; other drafts/failed PRs, archive tips and 22 stashes are preserved. Epics41/702 retain the next shared-contract and subsequent HAL/history-merger passes. No board/client/network actuation occurred.

  5. atomicdeploy commented on Oct 30, 2026

    @atomicdeploy
    OwnerAuthor

    Opcode-safety implementation is published in PR43 at 6309dab, paired with atomicdeploy/PCController#704 and ToghrolTP/pealayer#223. One canonical allocation registry generates firmware/Rust/Dart/PowerShell/Go views; immutable consumer pins, independent published fixtures and protected-base evolution checks reject drift or renumbering. Fixed Pakar A5/0 vs native A5/1 admission prevents the 0x11 audio/PWM collision; no dialect/unknown-ACK fallback. Local evidence: Flutter analysis +14 USB tests, Pakar native namespace2 +USB49, Pealayer protocol11, PC build-tool96 plus C++ UART/trace and native/UDP conformance. All255 foreign markers reject and the next valid packet recovers. Quality prefix and repaired report/suffix checks pass as separately executed segments. Broader exact-head GitHub builds remain in progress; no board/app deployment or full service parity is claimed. Unrelated PRs, stashes, settings and worktrees remain preserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions