Last updated: 2026-03-18
This handoff captures only what is explicitly recoverable from the repository at /home/qingke/AstraStorage.
There is no Git history available in this workspace, so prior agent intent, commit history, and PR context are not treated as facts here.
Verified facts:
AstraStorageis intended to be a distributed cloud storage system for Kubernetes-oriented environments.- The current implementation focus is the metadata control plane, especially MDS.
- MDS is responsible for inode tree metadata, file metadata, chunk metadata, replica/node metadata, and upload session state.
Primary references:
docs/architecture/system-overview.mddocs/architecture/mds-overview.md
Verified facts:
- The active executable is
cmd/mds. cmd/mds/app.goassemblesmemory repository -> service -> handler -> in-process rpc router.- The repository implementation in active use is the in-memory store.
- The current MDS supports these in-process flows:
CreateDirectoryCreateFileStartUploadCommitChunkCompleteUploadVerifyUploadFailUploadVerificationRetryUploadRenameInodeMoveInodeDeleteFileDeleteDirectoryGetInodeGetFileGetUploadSessionListChildrenListFileChunksBuildDownloadPlan
Verified code references:
cmd/mds/app.gointernal/mds/service_upload.gointernal/mds/service_mutation.gointernal/mds/handler.gointernal/mds/rpc/types.gointernal/mds/rpc/router.go
Verified facts:
StartUploadrejects concurrent non-terminal sessions for the same file.CompleteUploadmoves file/session/chunks intoverifying.VerifyUploadrequires verified file checksum, verified chunk checksums, and minimum readable replicas before promoting toavailable.FailUploadVerificationrecords verification failure and pushes the session tofailedorretrying.RetryUploadreopens the upload window from the last failed offset and clears stale verified checksum state.
Primary reference:
internal/mds/service_upload.go
Verified facts:
- File rename and move synchronize inode and file metadata.
- Directory rename and move update subtree paths.
- File deletion cascades into chunk and upload-session cleanup.
- Recursive directory deletion cascades through nested children.
Primary reference:
internal/mds/service_mutation.go
Verified facts:
go test ./...currently passes usingGOCACHE=/tmp/astra-go-build-cache.- Tests cover upload lifecycle, verification failure and retry lifecycle, rename/move/delete flows, and download plan generation.
Observed latest test result:
ok AstraStorage/cmd/mds (cached)
ok AstraStorage/internal/mds (cached)
? AstraStorage/internal/mds/config [no test files]
? AstraStorage/internal/mds/coordinator [no test files]
? AstraStorage/internal/mds/discovery [no test files]
? AstraStorage/internal/mds/metadata [no test files]
? AstraStorage/internal/mds/placement [no test files]
ok AstraStorage/internal/mds/rpc (cached)
ok AstraStorage/internal/mds/store (cached)
Primary references:
internal/mds/service_test.gointernal/mds/rpc/router_test.go
Verified facts:
inodeandfile/chunkresponsibilities are separated.Pathis treated as cached metadata, not the source of truth.- Chunk size is fixed at
4 MiB. - Upload process state is modeled separately in
UploadSession. - The current rpc layer is intentionally in-process to stabilize method contracts before adding HTTP/gRPC.
- The memory store is a development/test substrate, not a production backend.
Primary references:
docs/architecture/mds-overview.mddocs/architecture/mds-rpc.mddocs/architecture/mds-memory-store.md
Verified facts:
- The memory transaction model is snapshot-copy plus whole-state replace, with no real concurrency conflict detection.
- There is no real network server yet.
- There is no PostgreSQL or other persistent backend yet.
placement,discovery, andcoordinatorremain placeholders.- Async verifier jobs, background retry scheduling, and health aggregation loops are not implemented.
Inference based on current docs and code:
- The upload semantics are far enough along that async verifier/retry orchestration is the next logical step before network/server or PostgreSQL work.
Primary references:
internal/mds/store/memory_tx.godocs/architecture/mds-implementation.mddocs/architecture/mds-overview.md
Facts:
- Everything listed above under "Verified facts".
Inference:
- The likely next implementation priority is:
- async verifier execution
- background retry scheduling
- health writeback
- persistent backend
- external transport layer
Reason:
- This ordering is stated in architecture docs, but there is no active task tracker or commit history confirming that work has already started.
Recommended next implementation step:
- Add an explicit async verification workflow with TDD first.
Suggested scope:
- Introduce a verifier-facing service boundary that processes
verifyingsessions asynchronously. - Add retry scheduling semantics around
NextRetryAt. - Preserve the current synchronous service API until async orchestration is stable.
Suggested files to inspect first:
internal/mds/service_upload.gointernal/mds/store/store.gointernal/mds/store/memory_upload.gointernal/mds/service_test.gointernal/mds/rpc/router_test.go
Verified facts:
- This workspace is not a Git repository.
- No
README.md,DECISIONS.md,TASKS.md,KNOWN_ISSUES.md, or priorAGENT_HANDOFF.mdwere present at handoff time. - No
TODO,FIXME,XXX, orHACKmarkers were found in the repository during handoff review.