pdombkins makes the K&S sync dependable enough to teach from

This fork fixes the quiet failures that can make a live legal-data integration look healthy while users see stale or missing information.

integrationworkflow

The changes focus on the less glamorous part of a connected legal platform: ensuring that updates, removals and access controls agree with each other. Earlier fixes needed follow-ups, which suggests pdombkins was tracing real edge cases rather than merely tidying the integration.

  • Live updates now listen in the right place, so users can receive changes as they happen.
  • Deleted records are no longer silently missed by the sync.
  • Automated record adjustments no longer risk blocking themselves.
  • Students can view the relevant ledger information and shared teaching matter without broader access controls hiding it.

It is a useful reminder that permissions and realtime data handling are part of product reliability, not back-office details.

So what Legal teams evaluating connected matter or teaching workflows should care because trust disappears quickly when a system shows incomplete live records.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

4 commits from pdombkins/rose_lawyer, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
9e033bb7 fix(ks): realtime schema, delete events, task adjustment trigger, ledger permissions. Realtime subscriptions still targeted schema 'public' after the merge, so no live update fired at all. Replica identity was PK-only, so DELETE events were dropped by the matter_id filter. The adjustment logger ran as a BEFORE trigger and deadlocked against its own recompute. The ledger view joined a table students cannot read. Peter Dombkins 2026-07-30 ↗ GitHub
0493a3f4 fix(ks): realtime schema, delete events, task adjustment trigger, ledger permissions, dead admin persona checks Peter Dombkins 2026-07-30 ↗ GitHub
87ffb94c fix(ks+teaching): realtime schema, ledger permissions, and cohort-visible teaching content Peter Dombkins 2026-07-30 ↗ GitHub
commit body
K&S (from the full system test):
Realtime subscriptions still targeted schema 'public' after the merge, so no
live update ever fired. Replica identity was PK-only, so DELETE events were
dropped by the matter_id filter. The adjustment logger ran as a BEFORE trigger
and deadlocked against its own recompute. The ledger view joined a table
students cannot read. MattersList/Dashboard gated on a synthetic 'admin'
persona the merge had deleted, so instructors saw one persona's matters and
Admin Controls was permanently hidden.

Teaching content visibility:
Everything seeded under the instructor account was unreachable by students,
silently. workflow_shares had zero rows, so no student had ever been able to
see or run any teaching workflow. Playbooks, clauses and the knowledge base
are owner-scoped with no share mechanism at all.

listTeachingOwnerIds() grants READ over the unfiled content of the creators of
the groups a user belongs to - group-derived rather than hardcoded, empty for
everyone else. Write paths are untouched, so students duplicate rather than
edit; responses carry read_only and the UI says so. match_kb_chunks and
match_clauses take a new teaching_owners[] argument (additive overload).

searchClauses now always runs the keyword pass: match_clauses requires a
non-null embedding, and SQL-seeded clauses have none, so every seeded teaching
clause was invisible to search_clauses.

Week 9 teaching build: ten workflows, a 12-rule change-management playbook,
five templates, four reference notes and seven persona documents.
d16e3725 fix(ks): exempt the shared teaching matter from the persona filter Peter Dombkins 2026-07-31 ↗ GitHub
commit body
MattersList filtered on tasks.assigned_to, a single-owner column that is
almost empty on NexaCare: Mia Rossi owns 0 tasks and holds 27 task_assignments,
Aisha Rahman owns 0 and holds 24. Only Bentley and Chen own anything. So
selecting Rossi or Rahman hid the shared case study - the two personas the
Week-9 change impact assessment is written around.

ks.matters.shared_teaching marks NexaCare as the shared case study and exempts
it from the persona filter. RLS is untouched, so this widens nothing: it stops
a UI filter hiding a matter the student can already read.

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-938.md from inside the repo you want the changes in.

⬇ Download capture-thread-938.md