-
Notifications
You must be signed in to change notification settings - Fork 0
Retention recovery, crash-matrix evidence, reader fence, and model-based transitions (item 6) #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d12e5af
48c9998
16f22a9
7e6cf87
3d031b4
7a512c1
4aad28d
c9277ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| use std::path::Path; | ||
|
|
||
| use cap_fs_ext::DirExt; | ||
| #[cfg(test)] | ||
| #[cfg(any(test, feature = "repository-tasks"))] | ||
| use cap_std::ambient_authority; | ||
| use cap_std::fs::Dir; | ||
|
|
||
|
|
@@ -64,6 +64,25 @@ impl FilesystemVersionTwoAdmission { | |
| } | ||
|
|
||
| /// Releases the writer lock and the three pinned retention capabilities. | ||
| /// Reopens a migrated root without platform admission for repository tasks. | ||
| /// | ||
| /// The crash matrix and other repository tools run on hosts outside the | ||
| /// admitted Linux profile; every namespace, record, and identity law still | ||
| /// applies. Production callers use [`Self::reopen`]. | ||
| /// | ||
| /// # Errors | ||
| /// | ||
| /// Returns [`FilesystemPlatformAdmissionError`] exactly as [`Self::reopen`] | ||
| /// does for every boundary after platform admission. | ||
| #[cfg(feature = "repository-tasks")] | ||
| pub fn reopen_unchecked_for_repository_tasks( | ||
| store_root: &Path, | ||
| ) -> Result<Self, FilesystemPlatformAdmissionError> { | ||
| let root = Dir::open_ambient_dir(store_root, ambient_authority()) | ||
| .map_err(|source| FilesystemPlatformAdmissionError::Platform { source })?; | ||
| Self::admit(root) | ||
| } | ||
|
Comment on lines
+78
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
# Description: Find every caller of both unchecked reopen paths and confirm the feature gate.
set -euo pipefail
echo "== reopen_unchecked_for_tests callers =="
rg -nP --type=rust -C3 '\breopen_unchecked_for_tests\s*\('
echo "== reopen_unchecked_for_repository_tasks callers =="
rg -nP --type=rust -C3 '\breopen_unchecked_for_repository_tasks\s*\('
echo "== repository-tasks feature declaration =="
fd -t f 'Cargo.toml' --exec rg -nP -C5 'repository-tasks' {} +
echo "== who enables the feature =="
rg -nP -C3 'repository-tasks' -g 'Cargo.toml' -g '*.yml' -g '*.yaml'Repository: flyingrobots/keep Length of output: 13224 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== reviewed implementation and documentation =="
sed -n '1,115p' src/adapters/filesystem_version_two_admission.rs
echo "== repository conventions and learnings =="Repository: flyingrobots/keep Length of output: 5353 🤖 get_repo_knowledge executed:
Length of output: 4273 Collapse the duplicated unchecked reopen constructors.
Move ♻️ Proposed consolidation- #[cfg(test)]
- pub(super) fn reopen_unchecked_for_tests(
- store_root: &Path,
- ) -> Result<Self, FilesystemPlatformAdmissionError> {
- let root = Dir::open_ambient_dir(store_root, ambient_authority())
- .map_err(|source| FilesystemPlatformAdmissionError::Platform { source })?;
- Self::admit(root)
- }
-
- /// Releases the writer lock and the three pinned retention capabilities.
/// Reopens a migrated root without platform admission for repository tasks.
...
- #[cfg(feature = "repository-tasks")]
+ #[cfg(any(test, feature = "repository-tasks"))]
pub fn reopen_unchecked_for_repository_tasks(
...
+ /// Releases the writer lock and the three pinned retention capabilities.
pub(super) fn into_parts(self) -> (FilesystemWriterLock, Dir, Dir, Dir) {🤖 Prompt for AI Agents |
||
|
|
||
| pub(super) fn into_parts(self) -> (FilesystemWriterLock, Dir, Dir, Dir) { | ||
| (self.lock, self.retention, self.roots, self.manifests) | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update both status statements.
README.mdstill lists retention-publication restart recovery as planned, anddocs/formats/segment-store-v2/README.mdstill says retained-stage recovery is planned. Replace those statements with the remainingKEEP-CRASH-036..052process-death evidence gap and partial-prefix migration recovery gap.🤖 Prompt for AI Agents