Repository navigation
refactor(workspace): replace persistent physical workspace and root markers with path-based selection - #6941
Conversation
…arkers with path-based selection Generated-by: Google Antigravity
Astro-Han
left a comment
There was a problem hiding this comment.
I checked the workspace/State Root marker changes, the persisted worktree binding reader, and the offline migration linked by this PR at 96c7ebbb55f14a217b8a4a8213cf2d4ecf167051. I found one P2 migration gap: existing managed worktrees retain owner documents that the new strict Binding reader rejects; details are inline.
I ran the unchanged migration Gist against a controlled temporary database created from the previous production 0001_runtime.sql, with old-schema-valid worktree owner records. The database binding was converted and accepted by the new generated schema, while both owner documents remained unchanged and failed that schema on source_identity. Removing only that field from both documents made them pass. The basic marker/index/checksum conversion and a second migration run also passed in this controlled fixture.
This is a scoped source and migration check, not a complete review of all 67 files. I did not run Rust ownership::verify, a real Host upgrade, checkpoint crash recovery, or native UI tests. The PR's cross-platform results remain the author's results. A static merge with rust-preview@738af1af4fbcadc653e7f1a89da40e41269bac4b succeeds; CI run 43788588992 was still running when checked.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
| source: PathBuf, | ||
| #[schemars(with = "String", regex(pattern = "^sha256:[a-f0-9]{64}$"))] | ||
| source_identity: maka_sandbox::workspace::DirectoryIdentity, | ||
| base_commit: String, |
There was a problem hiding this comment.
[P2] Migrate both persisted owner documents before removing this field
For an existing managed worktree, the linked offline migration removes source_identity from workspace_bindings.workspace_json.worktree, but does not update either <allocation>/maka-owner.json or <common_dir>/worktrees/maka-<id>/maka-owner.json. Both were serialized from the old Binding and still contain this field. Worktrees::inspect verifies both files through ownership::verify, which deserializes them as the new Binding with deny_unknown_fields; inspection and patch capture therefore fail after the documented migration.
In a controlled old-format fixture, the unchanged Gist migrated the database binding but left both owner files byte-for-byte unchanged. The old generated schema accepted them; the new one rejected source_identity. Removing only that field from both files made the new schema accept them. Please migrate the allocation and Git-admin owner records together with the database binding, retaining their ownership identity and retirement state. I have not executed the Rust reader or a real Host upgrade on this machine.
…copy-up Generated-by: Google Antigravity
Astro-Han
left a comment
There was a problem hiding this comment.
I rechecked the migration change at 4fba6193b8b72902cb4909bf395594a938c60e93. The owner-document omission reported in my earlier review is fixed in the current linked migration Gist (SHA-256 7d69201da013857061de151dc039cdd144e24dd114270147c4a4872d03b01bb2). I no longer hold that P2 against this revision.
I ran the unchanged old and current Gist scripts on controlled fixtures using the previous production initial SQL and old-schema-valid owner documents. The current script converted both active owner documents, a managed retired allocation's owner without a database binding, and both documents for a database-referenced external allocation. All five documents passed the current generated Binding schema; the old script left all five rejected on source_identity. The retired marker stayed unchanged, its missing administrative owner was not recreated, fixture worktree contents were preserved, and a second current-script run left the owner bytes and database binding/digest values stable. The generated contract source is byte-identical at this PR head to the source used for that schema extraction.
I also read the added overlayfs observation logic and the strengthened Root relocation/reclone tests: Linux overlayfs now omits birth time from the short-lived directory observation. I did not execute Rust ownership::verify, a real Host upgrade, overlayfs mounts, or the full 67-file behavior. The PR's real-mount and cross-platform test claims remain the author's results. A static merge with rust-preview@d317be2bc541d4cd84b2817e2e0debeb2e35dcdd succeeds; CI run 43811063429 is still pending completion. This follow-up resolves the specific migration finding and does not certify the remaining upgrade, authorization, checkpoint recovery, or filesystem behavior.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
…identity in tests Update `checkpoint_repository` test fixtures after apache#6941 removed `WorkspaceCapture::identity`. Generated-by: Antigravity
Add durable logical Session/agent bindings, pluggable immutable-object and SessionRepository ports, and a durable independent `FileRepository` reference adapter outside worker Roots. - Route checkpoint publication, Head reads, exact checkout, and recovery through the configured `Authority` (`Local` or `Shared`) while keeping Root-private SQL isolated in `root_store::checkpoints::local`. - Preserve local zero-copy `hard_link` staging promotion with a single directory `sync_all()` barrier and carry the capture verification witness through fresh local commits while keeping full verification on recovery and external paths. - Validate `BoundHead` and Manifest provenance on `Storage::checkout_exact`, separate external repository schema (`repository_id`) from Root migration 42, and update test fixtures for #6941. Refs #2370 Co-authored-by: MicroGrey <[email protected]> Generated-by: Codex Generated-by: Antigravity
Summary
Remove persistent physical workspace and State Root identity markers in favor of path-based workspace selection and short-lived live-mount directory observations (follow-up to #6815 (comment)):
WorkspaceIdentity,.maka-workspace.jsonpreparation/publication, Git.git/info/excludeinjection, and related sandbox/checkpoint/file-watch exemptions so selecting a folder is strictly read-only.Workspace(AgentWorkspace) andCatalogSelection::Workspaceto canonicalpath(plus optionalprojectIdandworktree), keeping existing conversations grouped and usable across same-path directory recreation or re-cloning..maka-storage-root.jsonto{"rootId":"..."}and remove.maka-rust-runtime.json,kind,root_identity, and version counter churn; relocated roots keep logical identity and contend on the same account-local lease.source_identity), retaining short-livedObservationchecks (excluding unstable birth time on Linuxoverlayfscopy-up) for live cursors, watches, and single-operation opens so filesystems without stable volume UUIDs work out of the box, while scopingDirectoryIdentitystrictly to checkpoint crash recovery and providerexecution_basis.Refs #6815
Migration
No runtime compatibility branches or incremental pre-release schema migrations are retained. Developers with an existing local
runtime-host-rustState Root can stop any running Maka Host and run the one-shot migration script (updates.maka-storage-root.json,runtime-rust.sqlite, and managed worktreemaka-owner.jsonfiles):Verification
tooling,bridge,packaging,product,native-ubuntu, and fullrootarchive/replay), Windows 11 (native,windows-shell,windows-desktop,windows-skills,desktop,pixels,windows_mxc,maka-fs-tools,root_lease), and macOS (licenses,contracts,native,macos-host,macos-desktop,pixels,bridge,native-build,product,macos-agent-execution, and headlessdesktoptests).observation_and_published_directory_survive_linux_overlayfs_copy_upagainst real Linuxoverlayfsmounts (uuid=onanduuid=off), confirmingObservation,PublishedDirectory, andfiles::Directorysurvive directory copy-up.<allocation>/maka-owner.jsonand<common_dir>/worktrees/maka-<id>/maka-owner.jsonfiles soWorktrees::inspectandWorktrees::capture_patchpreserve uncommitted edits while retired tombstones stay retired.AI use
Google Antigravity implemented and verified the change across Linux, Windows, and macOS.
Checklist
Does this PR entail a change in behavior?