Repository navigation
feat(clusters): record run-scoped computed candidate generations - #268
Merged
Merged
Conversation
Every accepted native cluster run now records its complete computed partition as an immutable gitcrawl.cluster-candidates.v3 generation in the same transaction, with each candidate's members, v2 durable status and observed overlaps with active durable groups, and selects it. Durable IDs and the six history tables are untouched and the quarantine postimage is rechecked after the write, so quarantined candidates become visible in an explicit run-scoped domain without asserting identity equivalence. Generations are immutable except for owner removal. Rollback moves the per-repository selection to the previous generation. Portable exports drop the new tables. Add cluster-candidates to the CLI and the native reader.
Key the immutability exception on the thread no longer existing instead of on thread_exclusions, so schema changes to the exclusion tables cannot break the trigger; purge deletes the thread before its member rows.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
…ble scope Resolve each published candidate's durable ID after the v2 write, so identities created by the run are recorded instead of a zero target. Drop the derived candidate tables from a disposable portable snapshot before repository filtering, which would otherwise hit their immutability triggers.
Keep ordinary store opens free of the new DDL; readers, purge and portable shaping already treat absent tables as no generations.
Wrap generation listing, selection lookup and candidate reads in one read transaction so a concurrent rollback or owner purge cannot produce two selected generations or counts that disagree with members.
Member
Author
|
Local ClawSweeper (PR #1756 build) on the final range
Local gates at
The runtime proof will come from the first ordinary native maintenance run after deployment; I will add it here. |
Member
Author
|
Deployed and proven on the live archive. The first ordinary native maintenance run after deployment (producer built from
|
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 native available-subset producer keeps durable cluster IDs stable by quarantining ambiguous candidates: merges, splits and protected targets. On run 888 that was 2,461 of 9,411 selected threads in 86 components. The current computation for those threads is not visible anywhere, and v2 cannot publish them without rewriting identity history (see the identity analysis, option 1).
This adds a versioned, run-scoped computed-candidate domain without touching durable identity.
Writer. In the same native transaction, after v2 publication and scope validation,
NativePublishClustersrecords the quarantine plan's complete candidate partition as an immutablegitcrawl.cluster-candidates.v3generation (SaveClusterCandidateGeneration). It then moves the per-repository selection pointer to the new generation and rechecks the quarantine postimage hash. Each generation records:durable_status(publishedwithdurable_cluster_id, oridentity_quarantined);Blocked-identity runs still record a generation; no-op runs record none. The six history tables (
cluster_groups,cluster_memberships,cluster_overrides,cluster_closures,cluster_aliases,cluster_events), the strict v2 scope and v2 reader semantics are unchanged.Invariants.
GENERATION:ORDINALand never alias durable IDs. Overlaps are lineage observations, not equivalence.RollbackClusterCandidateGenerationselects the previous generation; the next accepted run selects its own.Readers.
gitcrawl cluster-candidates owner/repo [--generation N|--generations] [--limit N] [--members] [--json]reads a generation.--rollbackis available only in the main CLI; the dedicated native cluster reader permits reads.Tests.
The Clawmmunity selection-contract change needed to consume this is specified separately; Claw is owned elsewhere.
Owner decision (Hannes delegated): immutable computed-candidate history and its selection pointer are a supported, versioned source contract. Clawmmunity consumption is specified separately and activated by its owner.