feat(agent-memory-sync): carry machine-state toolchain snapshots over the sync channel#64
Merged
Merged
Conversation
… the sync channel Add a second syncPaths entry (absolute source ~/.harness/machine-state, destination machine-state) to both committed machine profiles, document the payload convention (one file per machine, owner-writes-only, periodic pull freshness) in machine-setup.md section e), and pin the behavior the consumer depends on with integration tests: absolute outside-rootDir sources round-trip through push+pull, a missing source is tolerated, and pull creates the local directory on demand. Refs: agent-tasks toolchain-parity-2026-07-22:task-a (ff75687e) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s (review fix) Review reproduced that watch's push is a whole-subtree mirror (commitAndPushSnapshot): a machine that has not pulled a peer's machine-state snapshot deletes that peer's file from the shared remote on its next watch tick, and differing files are overwritten without a 3-way merge. Section e) previously framed watch as pushing only this machine's own file and the only peer risk as staleness. Also added: no-secrets note (the whole directory is mirrored into a shared committed remote), the first-write edge-detection caveat (parent dir must exist at watch start), and a corrected cross-reference. Refs: agent-tasks toolchain-parity-2026-07-22:task-a (ff75687e), review finding HIGH Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transportiert Toolchain-Snapshots über den bestehenden Sync-Kanal: beide Maschinen-Profile bekommen einen zweiten syncPaths-Eintrag (absolute source
~/.harness/machine-state→ destinationmachine-state), die Payload-Konvention ist in machine-setup.md Abschnitt e) dokumentiert, und die Semantik, auf der der kommende harness-Konsument aufbaut, ist per Integrationstests gepinnt (absolute outside-rootDir source im Round-Trip, Missing-Source-Toleranz, mkdir-p beim Pull).Kontext: Toolchain-Paritäts-Vorhaben nach dem PATH-Shim-Vorfall vom 2026-07-22 (mini lief unbemerkt auf Node 22 statt Node 26). Konsument-Task: harness
session-start toolchain-parity(agent-tasks 5427fe54).Review (Subagent, accept_with_notes): Mutationstests bestätigen, dass die neuen Tests bei allen drei gezielten Verhaltens-Mutationen rot werden. HIGH-Finding gefixt (c0ec0a7): watch-Push ist ein Voll-Spiegel aus den lokalen syncPaths und löscht un-gepullte Peer-Dateien vom Shared Remote (empirisch reproduziert); die Doku hatte das als reines Staleness-Thema dargestellt. Drei LOW-Findings (No-Secrets-Hinweis, Edge-Detection-Grenze bei fehlendem Parent-Verzeichnis, Querverweis) sind mitgefixt. Das vorbestehende Mirror-Verhalten selbst läuft als Follow-up-Task a2bb475d.
Verifikation:
~/.harness/machine-state/→ watch-Push ins Bare-Repo (pandora/machine-state/e2e-test.json), danach Löschung ebenfalls propagiert, Remote und lokal sauber hinterlassen.Rollout-Hinweis (wichtig): Der Spiegel wird pro Maschine aus ihren lokalen syncPaths gebaut (
snapshot.ts:35-62). Bis das MacBook dieses Profil gemergt UND seinen watch-Service neu gestartet hat, löscht ein MacBook-watch-Push denmachine-state/-Baum wieder vom Remote (selbstheilend beim nächsten mini-Push, aber bitte MacBook-Seite zeitnah nachziehen: pull +launchctl kickstartdes watch-Jobs).Refs: agent-tasks toolchain-parity-2026-07-22:task-a (ff75687e), Run pandora/.ai/runs/2026-07-22-toolchain-parity/