Repository navigation
Commit 49e33b1
committed
Replay unsaved denials instead of merging, and move approvals to their own file (#31)
The adoption merge (tombstone union, intersection with an unsaved denial,
old-writer receipt guard) kept producing edge cases. It is replaced by two
simpler rules:
- Approvals live in agent-approvals.json. The #13 builds' agent-clients.json
is imported once when the new file does not exist and renamed to
.migrated. No released version ever wrote either file, so earlier builds
running beside this one no longer share a file with it.
- A user's denial (receipt off, one app's receipt off, revoke) that cannot be
saved is kept as a pending operation and replayed on top of whatever the
file holds when it is next read, then written. Only the user's own actions
are replayed, so revocations at the 64 cap and apps approved elsewhere are
kept.
Also:
- needsAdopt flag instead of a nil stamp, so a pending write-back still
notices the file vanishing; a read error after open keeps no stamp.
- Over an unreadable file only the user turning receipt on writes (a new,
empty list); denials there stay pending. The tab notice says so.
- disconnect/forget capture what was clicked before re-reading the file and
record the denial even if the row is not loaded right now.
- Opening the tab checks the file again.
Agent: Claude Code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LJG7KnMPqFcfTZ8A1C2qh1 parent 6603dfe commit 49e33b1
5 files changed
Lines changed: 218 additions & 153 deletions
File tree
- Sources
- App
- Core
- UI
- Tests
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
748 | 749 | | |
749 | 750 | | |
750 | 751 | | |
| 752 | + | |
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
| |||
885 | 887 | | |
886 | 888 | | |
887 | 889 | | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
888 | 893 | | |
889 | | - | |
890 | | - | |
891 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
892 | 897 | | |
893 | | - | |
| 898 | + | |
894 | 899 | | |
895 | 900 | | |
896 | 901 | | |
| |||
949 | 954 | | |
950 | 955 | | |
951 | 956 | | |
952 | | - | |
| 957 | + | |
953 | 958 | | |
954 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
955 | 963 | | |
956 | | - | |
| 964 | + | |
| 965 | + | |
957 | 966 | | |
958 | | - | |
| 967 | + | |
959 | 968 | | |
960 | 969 | | |
961 | 970 | | |
962 | 971 | | |
963 | | - | |
| 972 | + | |
964 | 973 | | |
965 | 974 | | |
966 | 975 | | |
| |||
0 commit comments