Skip to content

feat(webhook): shard durable authority pipeline - #97083

Open
andrexibiza wants to merge 2 commits into
NousResearch:mainfrom
andrexibiza:axl/webhook-authority-join-6dcebea
Open

feat(webhook): shard durable authority pipeline#97083
andrexibiza wants to merge 2 commits into
NousResearch:mainfrom
andrexibiza:axl/webhook-authority-join-6dcebea

Conversation

@andrexibiza

@andrexibiza andrexibiza commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Current composition gate — 2026-08-30 09:43 CDT

This is a semantic-owner rule, not only a file-conflict note: event-loop realization, authenticated replay identity, joined route authority, durable execution, and terminal settlement each have one current owner at their mutation boundary.

What lands

This makes webhook execution a sharded, durable authority pipeline instead of one ambient adapter godfile.

The public import remains gateway.platforms.webhook.WebhookAdapter. The current head splits responsibility across the webhook facade plus dedicated authentication, contract, route-authority, intake, delivery, recovery, callback, execution, model, store, and terminal modules. The PR no longer embeds source-line counts here because the head has moved since the first construction receipt; exact source shape is verified from the submitted object, not transferred from an earlier commit.

Invariants

  • Coordinates select a candidate route; immutable proof objects authorize effects.
  • The joined route authority freezes profile generation, authentication keys, toolsets, filters, skills, target, and runtime scope before work begins.
  • One durable operation owns one exact final carrier and one typed settlement.
  • Duplicate, stale-generation, contradictory, failed, timed-out, and indeterminate operations cannot widen authority or silently repeat effects.
  • Dynamic-route replacement revokes stale authority before publishing the replacement.
  • Recovery is bounded, profile-scoped, generation-checked, and fail-closed.
  • Trusted script execution is bounded by regular-file snapshots, interpreter/executable authority, environment reduction, output caps, timeout, and descendant teardown.
  • The shared listener remains the sole multiplex intake owner; profile routes cannot borrow sibling credentials, adapters, sessions, or tool grants.

Operator surface

This also closes the CLI/config/docs side of the contract:

  • provider-aware webhook subscription validation;
  • durable ledger capacity and storage-budget controls;
  • explicit raw-payload, body, prompt, filter, script, and recovery bounds;
  • English and Simplified Chinese webhook/automation/reference documentation;
  • real loopback listener proof covering signature verification, filtering, script execution, durable deduplication, delivery settlement, and disconnect.

Exact evidence

  • Construction base / live merge base: c30ac90a92097058ddd6f9db3fa2e3182a7bfdcc
  • Commit 1: bd3fd0ed75084994fd9662019385bc773c69e097 — tree 82d4764f3b4ac591a8ec0c5e70884c2e2ced6fc5
  • Commit 2 / current head: b77c9125c87017714660aa6918beb642f1c8f1fe — tree b278d09eec288e28da743ac20c719d848e3fe103
  • Every surviving commit on the submitted object has exact hosted green CI/Docker/Nix:
    • bd3fd0ed…: CI 33166146507, Docker 33166145895, Nix 33166145918
    • b77c9125…: CI 33171319783, Docker 33171318964, Nix 33171319049
  • Current-main cross-check: 5cc1369fa298021f8c740de154ff8c37c30bdcc8; live compare reports 399 main commits beyond merge base and GitHub reports this PR non-mergeable. A fresh current-main composition is therefore mandatory before landing.
  • First-commit local evidence at bd3fd0ed…: webhook suite 707 passed, 0 failed, 1 Windows-only skip; multiplex/profile/reconnect/proxy authority suite 188 passed, 0 failed; focused moved-boundary suite 71 passed, 0 failed; Ruff, byte compilation, staged diff integrity, and real listener E2E passed.
  • The first-commit remote tree and all 56 committed blob IDs were verified exact at bd3fd0ed…; that receipt is intentionally not transferred to the later head or to a future recomposition.

Interlocks and merge order

This is the current architecture carrier for the earlier slices #90236, #90995, #90304, and #85638, but it is not a current-main landing object until recomposed and re-proven.

A live FILE-LIST scan also found overlap with the following open work. This is a merge-order declaration, not a false claim that every unique provider feature is semantically absorbed. Each unique remainder must be revalidated against the joined authority and durable-settlement contracts after this change:

No overlapping PR should be merged independently without first proving that it preserves the authority join, single-owner listener, exact carrier, and typed settlement boundaries above.

Split the public WebhookAdapter facade into bounded route-authority, intake, delivery, recovery, and shared-contract modules while preserving the existing import and listener behavior. Add durable authority joins, replay fencing, bounded execution, recovery, CLI contracts, and bilingual operator documentation.
@andrexibiza
andrexibiza force-pushed the axl/webhook-authority-join-6dcebea branch from 751fdd8 to bd3fd0e Compare August 28, 2026 11:10
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard platform/webhook Webhook / API server needs-decision Awaiting maintainer decision before any implementation sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data labels Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head closure receipt for bd3fd0ed75084994fd9662019385bc773c69e097:

  • CI run 13694: success
    • full Python tests: success
    • native Windows-only tests: success
    • Docusaurus build: success
    • Ruff enforcement and Windows-footgun gate: success
    • attribution, unrelated-history, OSV, supply-chain, macOS, and E2E gates: success
  • Docker run 27731: success on amd64 and arm64, including integration tests
  • Nix flake run 71660: success
  • local exact-head webhook suite: 707 passed, 0 failed, 1 platform skip
  • local exact-head multiplex/profile/reconnect/proxy suite: 188 passed, 0 failed
  • remote tree 82d4764f3b4ac591a8ec0c5e70884c2e2ced6fc5 matches the rebased local tree and all 56 committed blob IDs exactly

The PR is mergeable against base c30ac90a92097058ddd6f9db3fa2e3182a7bfdcc.

Copy link
Copy Markdown
Contributor Author

Exact-object verification and landing boundary — 2026-08-28 06:16 CDT

Live object:

  • base: main@c30ac90a92097058ddd6f9db3fa2e3182a7bfdcc
  • head: bd3fd0ed75084994fd9662019385bc773c69e097
  • shape: one commit / 56 files
  • state: open, non-draft, mergeable
  • unresolved inline review threads: zero

Exact hosted execution on that submitted SHA is now complete:

Because the object has one submitted commit, every submitted commit owns executable exact CI/Docker/Nix proof. The cancelled/skipped Label rerun helper runs are not product failures and are not being substituted for the canonical matrix.

This does not self-certify the architecture. The remaining acceptance edge is independent review of the joined route authority, sole multiplex-listener ownership, exact carrier/generation fences, durable replay and typed settlement, followed by one final landing-edge read if main or the head changes.

The declared overlap graph is also a merge-order contract: #90236/#90995/#90304/#85638 now point at this current-main landing object, while every other overlapping webhook PR must prove a genuinely unique provider/event-source remainder that preserves these boundaries. Exact green does not authorize parallel semantic owners.

Copy link
Copy Markdown
Contributor Author

Landing-edge topology reconciliation — 2026-08-28 10:23 CDT

This exact PR is no longer a current-main landing object without recomposition. Live GitHub now reports #97083 at b77c9125c87017714660aa6918beb642f1c8f1fe as conflicted, and two newer objects materially change the webhook seam:

Therefore the next #97083 object must be a subtraction/composition pass, not a blind rebase. Preserve #97204's off-loop liveness; consume or explicitly supersede #97218's authenticated replay/session identity contract without retaining two owners; then re-run the FILE-LIST graph for every remaining webhook slice. The surviving invariant remains one joined route/operation authority, one listener, one replay/ledger owner, one typed settlement path.

All previous #97083 green receipts remain valid for their historical SHAs only. After recomposition, every final commit needs fresh exact-head CI/Docker/Nix. No merge-readiness claim transfers across this conflict.

Copy link
Copy Markdown
Contributor Author

Topology correction against current source-of-truth: the #97218 prerequisite state recorded in this PR body is now stale.

#97218 has been rematerialized as exact head 359bd692ee887fa0562e6d99fd3c0cedccc2ac02, one surviving commit directly on current main@4209d371aa1bb8840ce8447555bdd863a1a96c38, with CI 33271699471, Docker 33271698889, and Nix 33271698947 all green. Its every-commit gate is therefore satisfied; the earlier two-commit 92c7fc1… → f916bde… train is no longer the submitted object.

That changes the composition edge for this carrier: #97218 is now the narrow authenticated replay-identity owner to consume/subtract, while merged #97204 remains the off-loop delivery owner. #97083 itself is still at b77c9125c87017714660aa6918beb642f1c8f1fe, GitHub currently reports it non-mergeable, and its old exact green receipts do not certify a current-main joined object.

So the live merge order is now unambiguous: preserve #97204, consume/subtract #97218 rather than reimplementing its replay law, then reacquire exact CI/Docker/Nix for every surviving commit of the recomposed #97083 object. This comment supersedes only the stale #97218 topology paragraph in the body; it does not transfer acceptance onto #97083.

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

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have platform/webhook Webhook / API server sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants