Skip to content

feat(agent-memory-sync): carry machine-state toolchain snapshots over the sync channel#64

Merged
LanNguyenSi merged 2 commits into
masterfrom
feat/machine-state-syncpaths
Jul 22, 2026
Merged

feat(agent-memory-sync): carry machine-state toolchain snapshots over the sync channel#64
LanNguyenSi merged 2 commits into
masterfrom
feat/machine-state-syncpaths

Conversation

@LanNguyenSi

Copy link
Copy Markdown
Owner

Transportiert Toolchain-Snapshots über den bestehenden Sync-Kanal: beide Maschinen-Profile bekommen einen zweiten syncPaths-Eintrag (absolute source ~/.harness/machine-state → destination machine-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:

  • Suite 90/90 (Baseline 88/88), typecheck clean.
  • Live-E2E auf dem mini: watch-Service mit neuem Profil neu gestartet, Testdatei in ~/.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 den machine-state/-Baum wieder vom Remote (selbstheilend beim nächsten mini-Push, aber bitte MacBook-Seite zeitnah nachziehen: pull + launchctl kickstart des watch-Jobs).

Refs: agent-tasks toolchain-parity-2026-07-22:task-a (ff75687e), Run pandora/.ai/runs/2026-07-22-toolchain-parity/

Lan Nguyen Si and others added 2 commits July 22, 2026 17:38
… 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>
@LanNguyenSi LanNguyenSi added review:tests-pass merge-approval gate prerequisite review:checklist-complete merge-approval gate prerequisite review:comments-resolved merge-approval gate prerequisite review:scope-matches-task merge-approval gate prerequisite review:evidence-logged merge-approval gate prerequisite labels Jul 22, 2026
@LanNguyenSi
LanNguyenSi merged commit 45b6fc1 into master Jul 22, 2026
5 of 9 checks passed
@LanNguyenSi
LanNguyenSi deleted the feat/machine-state-syncpaths branch July 22, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:checklist-complete merge-approval gate prerequisite review:comments-resolved merge-approval gate prerequisite review:evidence-logged merge-approval gate prerequisite review:scope-matches-task merge-approval gate prerequisite review:tests-pass merge-approval gate prerequisite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant