Repository navigation
Commit 9e34209
Two computers: continue a moved chat, clean leader quit, removed-device wording (#1967)
* Keep a chat continued at startup owned by the window that took it
A bare start that continued another computer's released chat dropped the
command batch Home returned, which carried the directory ask whose
single-flight guard it had already set. The guard then stayed set, so the
window kept the listing it read before the take: the first message opened
"Continue this chat here?" for a chat this computer held, and choosing
continue here retired this computer's own session and released its own
hold before the conditional take was refused.
Home's commands are now returned on every automatic continuation outcome.
A completed take marks the chat as held here at once and replaces a listing
that was asked before it. A send decides the continuation card from a fresh
ownership read rather than the cached listing, and that read no longer ends
an outstanding listing request. Continuing checks the fresh holder before
retiring anything: a chat this computer already holds stays open as it is,
and a different holder is refused before local work is touched.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Let a coordinating computer's clean quit release its chats, then hand coordination back
A personal computer that led coordination ran its member inside the open
terminal and stopped it when the terminal exited. The engine's closing
release for the chat it held then reached a coordinator that was already
leaving, got 503, and was never tried again, so the chat read as held
offline until its lease ran out and coordination paused until the anchors
elected a new leader.
A coordinating terminal now waits, as it leaves its chats, for each idle
chat's closing release to finish, then transfers leadership to an anchor
and waits for an anchor to answer a fresh majority read before its member
stops. That hand-back is bounded by LeaderQuitWithin (5 seconds); if the
anchors cannot take over, the ordinary fallback applies. The anchors then
restore their own voters as fallback already does, and the computer that
quit does not get leadership back. A terminal that is not coordinating
leaves exactly as before. A closing release that meets a temporary
coordination refusal, including a bare 503, is retried within its existing
close deadline; a definitive refusal is never retried.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Say a removed computer was removed when it asks for cluster status or lead
The cluster control client read every answer other than 200, 404 and 409 as
a coordination outage, including the 401 a removed device receives. So on a
removed computer `codeaf cluster status` said the cluster could not
coordinate and told the person to reconnect voting computers, while
`codeaf devices` correctly said the device was removed.
A 401 carrying the directory's revoked code is now the removed-device error,
and `codeaf cluster status` and `codeaf cluster lead` explain it with the
same sentence `codeaf devices` uses, from one shared definition. Every other
refusal keeps its words.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep continued words, count only real local work, hide empty remote chats, and keep version checks side-effect free
Four small findings from a two-computer run:
- Choosing continue here on the card a send raised replaced the displaced
session with a fresh one and lost the words held behind the card. The
arriving chat's box now receives the same draft, pasted text and
attachments, unsent until the person presses enter again.
- Taking a chat back into a displaced window counted the retired
session's closing save of unchanged bookkeeping as unsent turns, so the
move said edits were kept and Home grew a branch row for turns the relay
already had. A sealed turn is now kept as a branch only when the engine
finds real local work in it, the same rule continuing already uses.
- Every window registers its empty new chat with the directory, and the
other computer listed it as an untitled running chat. A record with no
saved turn is no longer drawn on another computer's Home; it appears
once its first turn is saved. Registration and ownership are unchanged.
- codeaf --version, help and manual requests ran the former-folder
adoption and removed old scheduler timers before parsing anything, so a
version check could move a state folder and recreate the compatibility
link. Those informational requests now skip both; every real start keeps
them.
The footer's fit-by-priority, the engine outliving its window, and /quit
closing the conversation in front are the documented behaviour and are
unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Add the change entry for the two-computer fixes
The entry is numbered when the pull request exists.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep the manual's moving and task questions reaching the pages that answer them
The new paragraphs about a send's ownership check and the words kept after
continue here lengthened the page's first section until "continue on
another computer" no longer reached the section that says where moving
works, and the clean-quit heading competed for the same words. They now
have a section of their own and the clean-quit heading says what it is
about. The version-request note on the help page drew "old version of the
file" away from the task pages; the starting page already says that
version, help and manual requests change nothing.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Number the two-computer change entry.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Name the pull request in the two-computer change entry.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep a displaced window's reply bookkeeping out of kept local work
Taking a chat back into a window another computer had displaced reported
"your unsaved edits here were kept as 1 turn" and left a branch row on both
Homes, in both directions. A real reply appends pace, usage and call
accounting after its shared save, and retiring the displaced session seals
that tail. Both the take's unsaved-work check and the old drive's closing
publish counted it as new work.
Local work is now decided from the journal beyond the shared boundary:
accounting records are not work, while conversation turns, tool results,
unreadable records and workspace changes are still kept. The same decision
guards the unsaved-work check and the closing publish, so neither creates a
branch for what the relay already has.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Carry the words typed in a displaced window into the chat it continues
A send in a displaced window raises Home with the continuation card. The
typed words then live in the conversation's stashed composer, not in the
input Home shows, and retiring the displaced session can clear them before
the moved chat opens. The moved chat opened with an empty box.
The conversation's composer is now taken when the confirmed take starts,
carried with the take's answer and restored into the arrived chat, even
when its transcript or session differs from the displaced one. Nothing is
sent until the person presses enter.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Publish a chat to other computers only after its first conversation turn
A window's launch chat saves a bookkeeping head at start, and that head
was published, so the other computer listed the never-used chat as
"untitled running on <device>". A directory record always has a head, so
the earlier filter on an empty head could never match.
The drive keeps saving startup bookkeeping locally but notes a head for
publication only once its saved journal holds a conversation message,
bounded to that save, so text typed later cannot publish an earlier empty
snapshot. A never-used chat therefore never reaches another computer's
Home; it appears with its first turn and keeps ownership, quit and continue
as before. A keyless end-to-end run covers the displaced take-back in both
directions and both Homes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Say a removed computer was removed when its cluster commands are refused
`codeaf cluster status` and `codeaf cluster lead` start with a control
request whose handler answers an authentication refusal as a plain 403, so
the client still reported the generic coordination failure on a removed
computer.
When a cluster request fails without a typed cause, the command now checks
through the signed directory read whether this device was removed and, if
so, explains it with the `codeaf devices` sentence. An unexplained 403 is
never guessed to be a removal, and other failures keep their words.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Stop a removed computer's sync traffic until it is paired again
After a removal, the open window kept listing chats, sending presence and
heartbeats and running state and member rounds every few seconds, each
answered 401.
The sync HTTP gate now remembers the removed refusal, and so do directory
watches and a committed local removal. A marker bound to this device,
identity and relay shares that fact across windows and restarts, and
blocked requests are answered locally with the same removed refusal. State
and member rounds stand down and open members close. Pairing installs a new
device key, which lifts the marker, and an open Home resumes with the new
device. Local chats keep working throughout.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Read repositories without taking git's optional index lock
Home's repository band ran `git status` without `--no-optional-locks`, so
each refresh could create `.git/index.lock` and rewrite `.git/index`. When
that landed during a move's in-place restore, the restore saw `.git` change
and cancelled, and the take gave the chat back.
Every git command codeaf runs on its own to read a repository now passes
`--no-optional-locks`, so a background read never takes the index lock or
rewrites the index. Commands that deliberately write are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Send only from a chat this window holds, and leave a failed move safe
After a failed take the chat was free, so the window's send door, which
only blocked a chat another computer held, let a turn run on a stale copy
that could never publish.
A send now goes ahead only when this window holds the chat at the fence it
recorded, or the chat was never shared. A free chat whose local head equals
the shared head is taken back quietly with a conditional take, then sent;
otherwise the continuation card or the view-only state appears and the
words stay in the box. A failed take marks the window's copy as one it may
not send on and says why in plain words, and a stale-fence refusal makes
the window view-only. When the ownership check cannot reach the other
computers, a chat this window holds keeps working and its turns wait to be
shared, and anything else stays unsent.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep the whole draft when continuing a chat fails
The draft captured when a take started was restored only on success, so a
lost race, a refused or unreachable take, or a failed in-place restore lost
the words typed behind the card. Every failure path now puts the draft back
in the box, unsent, and the manual says what a failed move leaves behind.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Offer nothing about continuing on a computer that was removed
A removed computer's Home still offered "Continue <device>'s latest chat
here?" with its chord. Once this computer knows it was removed, Home drops
the left-off offer, the continue chord and the continue action on rows,
and keeps the removal sentence.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Explain a removed computer's stopped syncing without the word relay
The device pages keep to the words people use for their computers; the
removal paragraph now says the computer stops asking the other computers
for chats, and that pairing can still reach the service.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Pace the removal traffic test's heartbeats until the removal is known
The test drove the drive's heartbeat every 10 ms from the start, which
queued relay commits ahead of the member's first catch-up. On a slow disk
the member round waited minutes, and the request signed before that wait
was refused as clock skew. The heartbeat now keeps an ordinary pace until
the removal is learned and only then runs fast, so the observation still
spans many heartbeat intervals.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Announce a displaced chat only when another computer took it
After every take the window that took the chat said "<its own device>
continued this chat; this window now only shows it". The take's acquire is
followed by the arrived drive's own acquire, which raises the fence, and the
window compared the listing's fence with the hold it recorded at the take.
The window's recorded hold now follows its own drive's publishing receipt,
so a newer fence held by this computer for this window is still this
window's hold. The notice and the card come only from a hold by another
computer; a stale local receipt still cannot send. The second acquire stays:
it is the boundary that keeps two local drives from publishing under one
fence.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep each chat's draft with that chat when continuing from Home
A take captured whatever the window's main box held and restored it into
the chat that arrived, so an unsent draft typed for another chat appeared
in the moved chat's box and was saved as its draft.
The arrived chat's box now holds only the words typed for it: the draft
held behind the card its own send raised, otherwise its own saved draft,
otherwise nothing. A draft typed for another chat stays with that chat,
including when a take fails.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep the directory's orphaned draft adoption, and limit draft ownership to takes
Keeping each chat's draft with that chat had also stopped an ordinary
opening from adopting the draft a dead window left in its directory, which
is how the words follow the person and the directory. Adoption is restored.
Only a chat arriving through a take now brings just its own saved words and
never adopts another chat's draft.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep "how do I add another computer" reaching the pairing steps
The removal and empty-chat sections spoke of "another computer" and
"adding the computer again", which drew the question away from the section
with the pairing steps once that section's card text changed. They now say
"machine" and "your other devices", and the question reaches the steps
again.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 08b922b commit 9e34209
106 files changed
Lines changed: 4058 additions & 188 deletions
File tree
- cmd
- codeaf-demo-home
- codeaf-release
- codeaf
- docs
- changes/unreleased
- internal
- cellstore
- cellsync
- chatlist
- clusterctl
- directory
- e2e
- gitidentity
- identity
- manual/chat
- praf
- orch
- preflight
- rebuild
- remote
- secaf/diffanalysis
- seniordev
- app
- project
- tool
- util
- session
- shell
- syncsetup
- taskcopy
- tui3
- relay/hosted/test/raft
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
75 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
| 410 | + | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
0 commit comments