Repository navigation
Hash the capability classes that produce bus projections - #2773
Conversation
The projection digest from #2760 hashed only the record family and the table classes, so editing Message.projections or Claimed.project_into left every stored projection marked fresh. Each producer family now declares the capability whose declarations produce its rows, and the digest covers that capability's classes in the producers' MRO. ClaimOwner no longer re-encodes its fields on construction: its only builder, Acquisition.claimed, passes a validated acquisition's fields and one of its own claims. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2e4c481 narrowed ClaimProjection's codec check to last_seq, so ClaimProjection(1, []) now fails with AttributeError instead of MalformedRecord and test_exact_incarnation_and_generation_fence_releases went red on main. Every builder in src passes a dict; the assertion pinned a check that no longer exists, and the field comment claiming the codec checks the container is corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Rebuild on a copy of the live bus (19,503 records,
Median 17.44 s → 15.35 s (−2.1 s), from dropping ClaimOwner's per-owner FieldCodec round trip. Projection rows: sorted dump of all 11 projection tables (164,897 lines) has sha256 The 47.6 s figure from the earlier profile was inflated by cProfile; this rebuild costs about 17 s unprofiled. It is triggered only when a producing class changes, which happened 14 times in 481 merges since 10-20. The second commit fixes main's red |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
debt-src at 5f50a12, every finding: |
The producing capability's classes (Message, Claimed, BusCapability) are not DeclaredFamily members, so the owner set holds plain classes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bus projection digest from #2760 missed the classes that produce the rows. Editing
Message.projectionsorClaimed.project_intoleftMessageIdentitySource.producer_digest()unchanged (5d6fc04d49a36cb0 before and after the edit), so an install kept stale projections as fresh.ProducedRow.producer_capabilitiesdeclares each record family with the capability that produces its rows;BusProjectionTables.producer_classesderives from it._producer_digesthashes the producers' MRO classes under the family, the table, or that capability: Message, Claimed, Addressed, ClaimMessage and BusCapability join; infrastructure (field_codec, typed_table, declared_family) stays out.ClaimOwner.__post_init__no longer round-trips every field through FieldCodec; its only builderAcquisition.claimedpasses a validated acquisition's fields.test_projection_digest_tracks_producing_sourcegains the two edits that slipped through.Rebuild timings and the projection row comparison are in the comments.
🤖 Generated with Claude Code