Skip to content

Task: Publish ordered post-commit catalog notifications #146

Closed

Description

@sfmskywalker

Outcome

Consumers can subscribe to each successfully committed runtime catalog snapshot without polling, while custom IRuntimeFeatureCatalog implementations remain source-compatible.

Contract and scope

Implement an optional IRuntimeFeatureCatalogCommitSource on the stock public accessor, obtained by capability-testing the resolved IRuntimeFeatureCatalog. Do not add mandatory members to IRuntimeFeatureCatalog or a DI alias that could silently observe a different catalog when a host replaces that interface. Expose the exact detailed RuntimeFeatureCatalogSnapshot (including generation) in a documented event; initial discovery counts as a commit. No replay on subscription; callers subscribe before initializing, or combine subscription with reading CurrentSnapshot. Document races when subscribing to an already-active source.

Only successful commits enqueue a notification, after publishing CurrentSnapshot. Serialize queue insertion with commits, then dispatch outside the refresh semaphore. Dispatch preserves commit generation order, isolates/logs each subscriber exception, and permits concurrent/reentrant RefreshAsync without lock deadlock. A small single-drainer queue is appropriate: reentrant/concurrent refresh may return while notifications await the active subscriber; event processing is not an awaited transaction. Callbacks must be quick and enqueue their own expensive work. Avoid arbitrary callbacks under the catalog lock. CurrentSnapshot may advance beyond an event's generation; the payload remains the exact committed snapshot. Do not drop queued commits in dispatcher handoff races. Make lock-free snapshot publication explicit if needed.

Cancellation/failure before commit must leave CurrentSnapshot and notifications unchanged; cancellation after a successful commit cannot undo that commit. Existing catalog refresh semantics otherwise remain intact. Preserve existing typed projection and detailed snapshot API. No Nuplane/EF/Elsa policy in CShells.

Required proof

Initial and subsequent successful refreshes produce one event per commit; repeated reads/EnsureInitialized after initialization produce none. Event payload and CurrentSnapshot are committed before callbacks (CurrentSnapshot may be newer during concurrent refresh). Failed/cancelled discovery produces no event or snapshot replacement. One throwing subscriber cannot fail refresh or suppress later subscribers. Unsubscription stops further delivery. Deterministic reentrant/concurrent refresh tests show no deadlock, monotonically ordered dispatch, and all committed generations delivered exactly once, including a queue handoff race. Existing accessor/current catalog tests remain green; custom legacy catalog compiles/works without the optional contract. Include a meaningful mutation/revert proof for commit timing or failure isolation.

Delivery

Use official Spec Kit specify->plan->tasks->implement with the next script-selected number. Public contract/XML docs in Abstractions, stock implementation/accessor and package docs in existing homes. Claim before edits; check issue comments/competing PRs before commit. Maintainer publication uses organization branches without a selection gate. Root owns design/review/QA, required upstream CI, external current-head review, merge/main/preview qualification. Ownership and catalog now have completed publication/consumer acceptance; generation-build lifetime remains separate.

Parent Feature: #141
Program: elsa-workflows/elsa-foundation#2500
Project: https://github.com/orgs/elsa-workflows/projects/58

Published delivery

Completed at 0.0.30-preview.161, source e172a3ae6a1e8454c813837f5a018e87e49acc7b. Exact-head review/CI, resulting-main publication and actual public-package consumer acceptance are recorded in the final qualification comment. No final release or Foundation adoption is implied.

Activity

  1. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Implementation started for Program elsa-workflows/elsa-foundation#2500.

    Lead-owned scope: this task's optional post-commit catalog capability, ordered notification dispatch outside refresh locks, precise snapshot payload, subscriber failure isolation, public documentation and deterministic tests. Worker: bounded CShells implementation agent; root retains final integration and QA.

    Exclusive worktree /tmp/hosting-cshells-catalog, baseline 49c912633d968197ddd430c5bd826acd9cfcb15d. Spec Kit will select the branch/number. No Nuplane, Foundation composition, host-singleton ownership or build-lifetime hook edits here.

    CShells #144 is locally complete and in review/release qualification. #146 is the single active implementation leaf. Git/session preference is pending, so no push/PR yet; local implementation proceeds. No gates or release proof claimed.

  2. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Local implementation and root QA checkpoint for Program elsa-workflows/elsa-foundation#2500.

    Branch 017-runtime-catalog-commits, final commit 3318f5b1564a033bc5650641231740541fad80a3, clean worktree /tmp/hosting-cshells-catalog.

    The stock resolved catalog accessor exposes optional IRuntimeFeatureCatalogCommitSource; no mandatory interface member or independent DI alias is added. Exact committed snapshots are dispatched serially in generation order outside refresh/queue locks. Reentrant/concurrent refresh can commit and return while an earlier callback runs. Subscriber and logger failures cannot undo a committed snapshot or stop later delivery. Failed/cancelled discovery before commit emits nothing; cancellation after commit does not undo delivery.

    Root reviewed the final implementation, public XML ordering/timing contract and deterministic tests. Requested improvements include genuinely concurrent drain handoff producers, bounded barriers/finally cleanup, a resolver that ignores cancellation to prove the precommit fence, assertions outside isolated callbacks, custom accessor compatibility and postcommit cancellation.

    Validation:

    • Worker: 20 focused catalog/accessor tests passed; CShells net8/net9/net10 builds passed with zero warnings/errors.
    • Worker mutation: rethrowing a subscriber exception caused the isolation test to fail; restored implementation passed.
    • Root at the final commit: dotnet test tests/CShells.Tests/CShells.Tests.csproj --no-restore --configuration Debug --verbosity minimal rebuilt and passed 664 tests, zero failed/skipped on net10.

    Local review is complete. Push/PR awaits the delivery conversation's repository-required Git/session choice. Remote exact-head CI and independent/current-head bot review, merge, resulting-main gates, preview publication and consumer proof remain pending. No milestone is complete. This leaf moves to In Review while the lead advances #145's approved build-lifetime design.

  3. added
    status:in-reviewImplementation awaiting review and release qualification
    and removed
    status:in-progressWork is actively owned and in progress.
    on Oct 8, 2026
  4. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    PR opened and ready for review: #151, organization branch 017-runtime-catalog-commits, exact submitted head 3318f5b1564a033bc5650641231740541fad80a3. The Git-selection blocker is resolved by the owner’s maintainer organization-branch instruction. This is the unchanged locally qualified candidate; no competing work was found on refresh.

    Fresh independent exact-head source review found no concrete blocker; it ran no new tests. Existing root full affected suites and causal mutation/package evidence remain attributed to this source in the PR body. Copilot review was requested through the CLI (accepted response, without evidence of a queued review); completed Copilot review is not yet evidenced. Greptile started and remains pending.

    Hosted full Release solution CI passed on this exact head; Greptile/Copilot review and resulting-main/package/adoption gates remain outstanding. No merge, release or milestone completion.

  5. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Review follow-up implementation claim: /tmp/hosting-cshells-catalog, branch 017-runtime-catalog-commits, current3318f5b, PR151. Scope: linearize future-only subscription eligibility with snapshot commit, preserve queued unsubscription and normal duplicate/multicast delegate removal, invoke handlers outside refresh/notification locks, and add deterministic concurrency plus throwing-logger regression proof. Root confirmed late-subscription defect against current source and reviewed the refined design; commit-time raw delegate capture alone would regress queued unsubscribe and is not accepted. This is now the only product implementation leaf; ownership44aa162 is in hosted review. Worker Luna High fallback; root integration/QA. No merge/release claimed.

  6. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Review follow-up pushed at 4522596. Both findings have direct replies and resolved original threads. Root and fresh independent pinned source review found no concrete blocker in production fixafa12f2 and final test-fixture cleanup4522596. Catalog-focused25/25, librarynet8/net9/net10 build0warnings/errors, eligibility mutation failed expected[3]/actual[2,3] then restored. Actual future-only add, queued unsubscribe/in-flight stable list, duplicate/multicast removal and throwinglogger semantics are specified and tested. Source/logs retained in cshells-catalog-review-4522596/. New-head hosted CI/Greptile running, Copilot monthly-quota unavailable/not approved. Implementation claim released; no product implementation leaf active while first-wave review converges. No merge/release/adoption/milestone completion.

  7. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Style-only follow-up implementation claim: /tmp/hosting-cshells-catalog, branch 017-runtime-catalog-commits, starting head 45225960b767dddf6b121e5b1fc3832f6c4d1a26. Scope: apply Greptile’s two current-head CShells style findings to introduced catalog code/tests only (collection expressions for new empty lists; var for initialized locals while preserving the interface-cast compatibility test), then run the focused catalog tests and affected production build. No runtime behavior changes, no PR reply/resolution, and no push in this task. This is the sole active implementation leaf.

  8. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Review round2 style-only corrections pushed at 0b63743. Both new comments have direct replies and resolved threads; prior review accepted the behavior fixes. Root reviewed the exact declaration-only delta, including retained IRuntimeFeatureCatalogCommitSource coverage. Library net8/net9/net10 builds passed with0warnings/errors; focused catalog25/25 passed. Fresh independent delta QA is running; new-head hosted CI/Greptile are required. Copilot quota remains unavailable, not approved. Implementation claim released; no product implementation leaf active while review converges. No merge/release/adoption claimed.

  9. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Exact-head merge evidence at 0b63743: CI37780579896 passed Release solution build with0warnings/errors,669 library tests and31 end-to-end tests. Latest Greptile explicitly reviews this commit at5/5; zero unresolved review threads and every handled finding directly replied. Root/fresh independent pinned source QA reviewed the eligibility/unsubscribe/multicast/logger boundaries and final declaration-only delta; no concrete blocker. Catalog-focused25/25, library net8/net9/net10 build0warnings/errors; eligibility mutation failed and was restored. Current main911033d contains the reviewed ownership change; the real three-way merge is conflict-free with expected combined tree 9d2eb538463215e9cd94898a6d3a0e0d0a013032. Copilot monthly quota unavailable, not approved; documented Program Lead source-QA fallback used. Normal authorized squash merge; no policy bypass. Resulting-main Packages full build/test/publish and actual combined package identity/consumer proof remain required before #146 acceptance. No final release/adoption/milestone completion.

  10. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    PR151 merged normally at e172a3ae6a1e8454c813837f5a018e87e49acc7b from reviewed 0b637438c8ea6d9c63e3af8f312c2b743bc85415. Exact-head CI669+31 and Greptile5/5 passed; zero unresolved threads and every handled finding directly replied. Root verified actual combined main tree 9d2eb538463215e9cd94898a6d3a0e0d0a013032 equals the predicted conflict-free merge of reviewed ownership and catalog. Resulting-main Packages37781957221 (preview run161) is active. Prior ownership preview160 successfully published; root independently verified all9 Feedz/pipeline archives, source911033d, synchronized internal dependencies and net8/net9/net10 assets. Issue146 was reopened after merge auto-closure, and144/146 remain In Review/verification Running until combined publication and actual public-package consumer qualification. Copilot quota unavailable, not approved. No final release, Foundation runtime adoption or milestone complete.

  11. sfmskywalker commented on Oct 8, 2026

    @sfmskywalker
    CollaboratorAuthor

    Published-package acceptance for ownership #144/#140 and catalog #146/#141 is complete at 0.0.30-preview.161, main e172a3ae6a1e8454c813837f5a018e87e49acc7b.

    Both normal merges passed exact-head CI, latest Greptile5/5 with zero unresolved threads, direct replies for every finding, and root/fresh independent pinned source QA. Copilot monthly quota was unavailable, not approved. Resulting-main Packages37781957221 passed Release solution build with0warnings/errors,690 library +31 end-to-end tests, packed all9 packages and published to Feedz. NuGet.org deployment correctly skipped for this preview.

    Root independently compared every direct Feedz archive byte-for-byte with the workflow artifact; all package IDs/versions, repository commit, synchronized internal dependency versions and net8/net9/net10 assets matched. SHA256:

    • CShells: e133ba52486fb1f59a6f010c5a82f52856d95f678c3b25e45049d2ca8eb0e95e
    • CShells.Abstractions: 56dc06f38846e7e89d31564825cc505613ee322c24e8eab5db9822c588d2eb06
    • CShells.AspNetCore: 82d618262279a8933392425c3eeb3b41e7803cd9bd37bbb20375345be91aea17
    • CShells.AspNetCore.Abstractions: b4dc5e30004d7ff837178410ce684708956b9654f7597ea5c1e94607145847dc
    • CShells.AspNetCore.Testing: 9bf529a8ce362c715cf0c3b4a43f33277eeb87478dfd6bb7343b47991069e5a1
    • CShells.FastEndpoints: 475a5908fd81ef0bba03c08aede87d5559b1064c6b1358c9e126fe4445f67907
    • CShells.FastEndpoints.Abstractions: b52756e2574010dd2e0fdeadbb35f392635d80560f5cced5b72bd48a42f8fc20
    • CShells.Management.Api: 53fc694b34e0fab82d4cb3fbc049104b3d5915a021e55baec6c64b05d4ef26ad
    • CShells.Providers.FluentStorage: c6ccc1095e506a74cee2f4a209e457f8ba24b5cf7600f2fdc3fc7ec2d336462e

    An outside-checkout PackageReference-only consumer restored CShells + CShells.Abstractions from the actual public Feedz URL into a fresh isolated cache. Actual .NET8.0.10/9.0.9/10.0.8 each passed: ordered multiple root singleton identity/last-wins; separately selected alias identity; same borrowed disposable across held old scope and promoted replacement; distinct unselected provider-local singleton per generation; no disposal during either drain; exactly one root disposal. Catalog proof: exact detailed snapshot object notifications for generations[1,2], visible current generations[1,2], and late subscription receives[2] only. Root reviewed source assertions/cleanup and recomputed cached-vs-downloaded SHA256 plus metadata/assets/archive SHA512; all matched. No project references, mixed versions or alternate private-family source.

    Retained audit/logs/archives: cshells-published-preview-161/; consumer source/log/cache/provenance/results: cshells-published-primitives-consumer/ under the program artifact root. Consumer is bounded API/runtime proof, not Nuplane integration, physical installation/unloading/pruning, final GitHub releases, Foundation runtime adoption or a completed M1. Generation build-lifetime #147 remains outstanding. Closing these two tasks and their two primitive Features as completed, Project Done/Passed; program remains active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions