Skip to content

test-infra: D-Bus contract tests + faithful FakeMapBackend + DoD rule (tincan-7c5l4/n5wwx/9esdt)#62

Merged
quad341 merged 2 commits into
mainfrom
feature/tincan-test-infra
Jun 6, 2026
Merged

test-infra: D-Bus contract tests + faithful FakeMapBackend + DoD rule (tincan-7c5l4/n5wwx/9esdt)#62
quad341 merged 2 commits into
mainfrom
feature/tincan-test-infra

Conversation

@quad341
Copy link
Copy Markdown
Owner

@quad341 quad341 commented Jun 6, 2026

Lands the durable test infrastructure cleanly on main (it was stranded on the rejected bundled branch docs/bt-headset-relay-limitation).

What

  • D-Bus contract tests (tests/tincand/test_dbus_contract.py, tincan-7c5l4): introspects the daemon's exported interface and asserts every GUI signal-subscription / method-call matches (name + signature). Pure Python introspection, no session bus.
  • FakeMapBackend (tincand/backends/fake_map.py + tests, tincan-n5wwx): iOS-faithful test double (sent-folder=0, MMS/attachments, lazy PBAP contacts, group + send-failure paths) so integration tests can exercise real behavior with no phone.
  • DoD rule (docs/rules/validator-dod.md, tincan-9esdt): demonstrated-behavior definition-of-done.

It already earned its keep

The contract test caught 2 real bugs on main, now strict-xfail'd to their beads:

  • _on_contact_photo_received missing @slot → avatars don't update live (tincan-3vakg)
  • GUI reconnect button calls Daemon.RequestReconnect, which the daemon doesn't export → dead button (tincan-zqtbj/s7569)

strict=True → when each bug is fixed the xfail flips and CI fails until the marker is removed, so the guard can't rot.

64 passed, 1 skipped, 2 xfailed locally. This is the 'durable infra first' foundation; behavioral integration tests (tincan-iplg1) build on the fake backend next.

Jim Wordelman and others added 2 commits June 6, 2026 10:21
…an-7c5l4, tincan-n5wwx, tincan-9esdt

tincan-7c5l4: D-Bus contract tests — introspect TincanService signals/methods,
verify TincandClient subscribes to all exported signals with correct @slot
decorators and calls only methods that exist. Would have caught the silent
_on_contact_photo_received disconnection at 2026-06-06 deploy (missing @slot).

tincan-n5wwx: FakeMapBackend — iOS-faithful test double (BackendInterface).
Reproduces iOS MAP quirks: sent-folder=0, MMS/attachment shapes, lazy PBAP
contact resolution, group send + failure, configurable send failures.
28 behavioral tests covering §1–§7.

tincan-9esdt: docs/rules/validator-dod.md — demonstrated-behavior DoD rule.
Green unit tests alone do NOT close a bead; integration/contract test or
documented manual smoke required. Documents the rule, evidence, gate checklist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r beads land

The D-Bus contract test (tincan-7c5l4) immediately caught two real
GUI<->daemon mismatches on main:
  - _on_contact_photo_received missing @slot(str,QByteArray) -> avatars
    do not update live (tincan-3vakg)
  - GUI reconnect button calls im.tincan.Daemon.RequestReconnect, which the
    daemon does not export on main -> button is a no-op (tincan-zqtbj/s7569)

strict=True so when each bug is fixed the case xpasses and CI fails until the
entry is removed -> the guard cannot silently rot.
@quad341 quad341 merged commit 9772efb into main Jun 6, 2026
1 check passed
@quad341 quad341 deleted the feature/tincan-test-infra branch June 6, 2026 17:27
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.

1 participant