diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-23 15:41:32 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-23 15:41:32 +0000 |
| commit | c54ce061d6d278cce8362d5af085808ca60c239b (patch) | |
| tree | ec967d6195d9f7ec4f061449596611afe3a0950f /grasp-audit/src/specs/grasp01/mod.rs | |
| parent | e0ad39a489b3398f8208713bf728db0cb11475b0 (diff) | |
| parent | 113928aa84894ea8f65c247d9987527e792b32a9 (diff) | |
feat: announcement purgatory
Extends purgatory to hold repository announcements until git data arrives,
preventing empty repositories from being served to clients.
When an announcement is received, a bare repo is created immediately and the
announcement is held in purgatory. It is only promoted and served once a git
push confirms real content exists. If no push arrives before expiry, the bare
repo is deleted and the announcement is silently discarded.
Key behaviours:
- Soft expiry: announcements are hidden from clients but kept alive while git
pushes are in progress, reviving on successful push
- Expiry is extended when a matching state event or git push is observed
- NIP-09 deletion events remove announcements from purgatory
- Purgatory state (announcements, state events, PR events, expired set) is
persisted to disk on graceful shutdown and restored on startup, with elapsed
downtime subtracted from expiry deadlines
- Purgatory announcements drive StateOnly sync in the sync system so state
events are fetched from listed relays before promotion
- SyncLevel added to RepoSyncIndex to distinguish purgatory repos (StateOnly)
from promoted repos (Full L2+L3 sync)
Diffstat (limited to 'grasp-audit/src/specs/grasp01/mod.rs')
| -rw-r--r-- | grasp-audit/src/specs/grasp01/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grasp-audit/src/specs/grasp01/mod.rs b/grasp-audit/src/specs/grasp01/mod.rs index 0a819ee..1694f58 100644 --- a/grasp-audit/src/specs/grasp01/mod.rs +++ b/grasp-audit/src/specs/grasp01/mod.rs | |||
| @@ -19,6 +19,7 @@ pub mod git_clone; | |||
| 19 | pub mod git_filter; | 19 | pub mod git_filter; |
| 20 | pub mod nip01_smoke; | 20 | pub mod nip01_smoke; |
| 21 | pub mod nip11_document; | 21 | pub mod nip11_document; |
| 22 | pub mod purgatory; | ||
| 22 | pub mod push_authorization; | 23 | pub mod push_authorization; |
| 23 | pub mod repository_creation; | 24 | pub mod repository_creation; |
| 24 | pub mod spec_requirements; | 25 | pub mod spec_requirements; |
| @@ -29,9 +30,10 @@ pub use git_clone::GitCloneTests; | |||
| 29 | pub use git_filter::GitFilterTests; | 30 | pub use git_filter::GitFilterTests; |
| 30 | pub use nip01_smoke::Nip01SmokeTests; | 31 | pub use nip01_smoke::Nip01SmokeTests; |
| 31 | pub use nip11_document::Nip11DocumentTests; | 32 | pub use nip11_document::Nip11DocumentTests; |
| 33 | pub use purgatory::PurgatoryTests; | ||
| 32 | pub use push_authorization::PushAuthorizationTests; | 34 | pub use push_authorization::PushAuthorizationTests; |
| 33 | pub use repository_creation::RepositoryCreationTests; | 35 | pub use repository_creation::RepositoryCreationTests; |
| 34 | pub use spec_requirements::{ | 36 | pub use spec_requirements::{ |
| 35 | get_requirement, get_requirements_for_section, get_sections, RequirementLevel, SpecRequirement, | 37 | get_requirement, get_requirement_by_ref, get_requirements_for_section, get_sections, |
| 36 | GRASP_01_REQUIREMENTS, GRASP_COMMIT_ID, | 38 | RequirementLevel, SpecRef, SpecRequirement, GRASP_01_REQUIREMENTS, GRASP_COMMIT_ID, |
| 37 | }; | 39 | }; |