Skip to content

iBridge: opt-in phone text edits to copied notes, and a status-report test matrix - #14

Merged
TheLinuxGuy merged 3 commits into
mainfrom
feat/ibridge-note-edits
Oct 26, 2026
Merged

TheLinuxGuy merged 3 commits into
mainfrom
feat/ibridge-note-edits

Conversation

@TheLinuxGuy

@TheLinuxGuy TheLinuxGuy commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Based on current origin/main (9e617fd, includes #11 and #12).

Summary

  • Opt-in phone text edits (fast-forward only). Off twice over: icloud_bridge.py configure --text-edits on and a per-project folderwise-ibridgeedit list of path patterns in .docs.yaml. A phone edit waits for a quiet period (edit_settle_seconds, default 120; unchanged across two runs), then applies in an isolated clone: stamped human, linted, run through the project's hooks and committed locally (Bridge-Ops: … text-edit=N, counts only). Front matter values and every generated block (byline, change log, tables, task blocks) are protected; size/line/shrink limits apply; a note also changed on the Mac pauses that project (resolve keeps the Mac version). Stale copies from an older export are refused because their change log differs.
  • Status report additions. Phone edits waiting and an Edited count under Recent imports; adapter/lint failures now show their output; edits to the generated dashboard are a bridge-wide freeze rather than a "paused project".
  • Status report as source of truth, tested. New ibridge_status self-test section drives a mocked transport (plain file copies standing in for iCloud) through ~50 scenarios and judges each by the status report, the CLI output, last-run.json, alert counts and report privacy (phone-typed text, source and state paths never appear in the report): clean export and idempotence, lean/image omissions, toggle/rename/note-edit imports, every rejection type, dirty tree, hook, adapter list/apply/validate failures, copied-note edits, Mac conflicts, dashboard edits, unowned collisions, interrupted export journal, symlinks, directory-as-file, conflict copies, edited/legacy reports, disabled project with pending edits, unavailable source, invalid config, doctor. ibridge_transient exercises the real EDEADLK retry path (3rd failure reports).
  • Docs: docs/obsidian.md, docs/guide.md, README.

What cannot be tested in CI (by design: iCloud transport is assumed reliable and is mocked)

  • Real iCloud delivery time, ordering, eviction (.icloud placeholders) and real conflict-copy naming (mocked as name 2.md / (conflicted copy)).
  • Real macOS notification banner visibility (Focus / screen-sharing suppression); CI asserts the notification request and its content-free text.
  • Real launchd scheduling and Login Items (fake launchctl/open binaries in the sandbox).
  • Obsidian/Tasks plugin behavior on iPhone (edit dialog, popups, Properties editor rewrites; mocked as file edits) and iPhone Mirroring input.
  • Concurrent phone/Mac races inside a single run (covered only by deterministic ordering tests).
  • Bridge-level config errors cannot be written to the status report (reported on the CLI/doctor instead).

Test plan

  • uv run _tools/selftest.py (630/630)
  • uv run .github/scripts/test_public_docs.py (242/242)
  • uv run .github/scripts/ci_coverage.py: 93.5% overall, 100% of changed icloud_bridge.py lines
  • ruff
  • Rebased on main with Document iCloud bridge test cases; keep them in step with the self-tests #13 merged; docs/ibridge-testing.md now covers ibridge_notes, ibridge_transient and ibridge_status, adds checklist step 9, a "What CI cannot test" section and traceability rows E1-E8 and S1-S12 (public docs check 244/244, the earlier Gap row I1 is closed).
  • Real-iPhone acceptance of a note edit.

No workflow, .github/scripts, .coveragerc, codecov.yml, ruff.toml, .gitignore or framework_guard.py changes.

Copilot AI balanced review requested due to automatic review settings October 26, 2026 06:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.80%. Comparing base (e5e4ef8) to head (db15c10).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   92.20%   92.80%   +0.59%     
==========================================
  Files          17       17              
  Lines        3143     3264     +121     
==========================================
+ Hits         2898     3029     +131     
+ Misses        245      235      -10     
Files with missing lines Coverage Δ
_tools/icloud_bridge.py 94.72% <100.00%> (+1.38%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…t, status-report test matrix

- Two-switch opt-in for editing copied Markdown notes from the phone: bridge `text_edits`
  (configure --text-edits on) plus per-project `folderwise-ibridgeedit` path patterns.
- A phone edit waits for a quiet period (edit_settle_seconds, default 120, unchanged across two
  runs), then applies fast-forward-only in an isolated clone: stamped as human, linted, hooked
  and committed locally with counts-only provenance. Front matter (values) and every generated
  block are protected; size/line/shrink limits apply; Mac-side drift pauses the project.
- Status report gains "Phone edits waiting" and an Edited count in Recent imports; failures from
  adapters and lint now include their stdout detail.
- Dashboard edits are bridge-wide freezes instead of a "None" paused project.
- New self-test sections: ibridge_notes, ibridge_transient (real EDEADLK retry path) and
  ibridge_status, which drives mocked iCloud transport through ~50 scenarios and judges each by
  the status report, CLI output, last-run record and privacy of the report.
- Docs updated.
@TheLinuxGuy
TheLinuxGuy force-pushed the feat/ibridge-note-edits branch from 2942b93 to db15c10 Compare October 26, 2026 06:56
@TheLinuxGuy
TheLinuxGuy merged commit bccc560 into main Oct 26, 2026
13 checks passed
@TheLinuxGuy
TheLinuxGuy deleted the feat/ibridge-note-edits branch October 26, 2026 07:05
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.

2 participants