feat: sleep-time janitor + scratch tier (items #3 and #5 part 2) - #288
Open
CryptoJones wants to merge 2 commits into
Open
feat: sleep-time janitor + scratch tier (items #3 and #5 part 2)#288CryptoJones wants to merge 2 commits into
CryptoJones wants to merge 2 commits into
Conversation
) One opt-in maintenance pass over a vault, built to the ratified invariants. - Consolidation is propose-only, always — even --apply only proposes; propose-and-review is permanent. - Single janitor per vault: a non-blocking flock mutex (new filelock. try_exclusive) refuses a second concurrent run. - Refuses while a mesh sync (or any vault write) is in flight, via an explicit probe of the vault write-lock — not a guess. - Fail-closed pipeline: a failed step aborts the rest, so the fleet-propagating --sync never runs after an earlier failure. - GC / mesh-sync stays out of the default apply set (opt-in --sync); it is the only irreversible, fleet-wide step. Rollups are opt-in too (--rollup), never default. Safe by default: no flags = dry run, nothing in the vault changes. - Index maintenance uses the live incremental refresh (build-and-swap; never empties the index in place under a concurrent searcher). - No per-run report notes in the vault: the report goes to stdout + the state dir; --report-note is the only way one lands in the vault. 1,037 tests / ruff / mypy strict green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NbCqLsAJaoeCcyqnTs31Vk
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Machine-local, auto-expiring scratch notes, marked by a `.scratch.md` filename suffix (the option chosen for its minimal mesh footprint). - create-note gains `scratch: bool`; a scratch note is written as `<title>.scratch.md`. The suffix IS the mark — no note-body field. - Still a top-level `*.md`, so search and listings find it like any note. - Machine-local by default: mesh gitignores `*.scratch.md`, so it is never committed or replicated (the "ephemeral + committed to permanent history is a contradiction" ruling). Opt-in replicate = create it as a normal note. - TTL expiry is an `omind maintain` step: scratch notes untouched for 7 days (from LAST MODIFICATION — HAL9000's clock refinement) are ARCHIVED, never deleted. Reports on a dry run; archives under --apply. Machine-local, so it runs outside --sync. Completes item #5 (the scoped-write interlock is #287). 1,029 tests / ruff / mypy strict green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NbCqLsAJaoeCcyqnTs31Vk
omind maintain (roundtable-consensed, item #3)
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.
The last two roadmap items from the 2026-08-27 consensus. Item #5's scratch
expiry is a
maintainstep, so the two ship together.Item #3 —
omind maintain(sleep-time janitor)--apply).filelock.try_exclusive).probe.
--syncnever runsafter a failure.
--sync); rollupsopt-in (
--rollup). Safe by default (dry run).--report-noteis opt-in.Item #5 part 2 — scratch tier
create-notegainsscratch: bool; the note is written<title>.scratch.md— the suffix is the mark (no note-body field).
*.md, so search/listings find it.*.scratch.md— never committed orreplicated. Opt-in replicate = create it as a normal note.
maintainstep: scratch notes idle >7 days (by lastmodification) are archived, never deleted; reported on dry run, archived
under
--apply.Verification
New
maintain.py+scope-free;tests/test_maintain.py(9) and scratchcoverage in
test_store.py. 1,029 tests / ruff / mypy --strict greenlocally. Independent of #287.
Note: repo CI has a pre-existing red state on
main(anmcpdependency-driftaffecting
ToolErrortext); this PR does not touch it.Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/
🤖 Generated with Claude Code