Skip to content

feat(pi): session fencing, daemon session leases, diff renderer core - #227

Merged
Patel230 merged 1 commit into
mainfrom
feat/pi-fencing-diff
Aug 22, 2026
Merged

feat(pi): session fencing, daemon session leases, diff renderer core#227
Patel230 merged 1 commit into
mainfrom
feat/pi-fencing-diff

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the Pi adoption P0 PR (#226). Implements the P1 items (and the P2 #6 lease work) from docs/plans/pi-adoption-plan.md:

  • Session writer fencing (internal/session): additive Fence metadata field persisted on save/load, plus FenceOf/SetFence and WAL AppendMetaWithFence. Backward-compatible.
  • Daemon session leases (internal/daemon): POST /v1/sessions/{id}/lease (acquire, returns a fence) and DELETE .../lease?fence= (release, requires the matching fence). Single-owner enforcement with 409 on stale fence. OpenAPI updated (parity test green).
  • Differential renderer core (internal/tui/diff): line-granular diff + synchronized-output emission (mirrors pi-tui), fully unit-tested. The full Bubble Tea render-path swap is a runtime-verified follow-up.
  • Kitty graphics (P2) remains deferred pending the render-path integration.

Test plan

  • Full go test ./... green (via pre-push hook + focused rerun)
  • New tests: daemon lease acquire/release, session fence round-trip, diff renderer range/sync
  • make vet, make lint, hawk verify green
  • Boundary guards, submodule drift, govulncheck passed in pre-push hooks
  • Rebased onto the merged P0 commit; PR diff contains only P1/P2

@Patel230
Patel230 merged commit 555a70b into main Aug 22, 2026
45 of 46 checks passed
@Patel230
Patel230 deleted the feat/pi-fencing-diff branch August 22, 2026 06: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