docs(guides): operator walkthrough for building a first playbook binding
Completes the last open item in archie-core-t2db.6, now unblocked by
t2db.8's UI landing. Every claim verified against the real handler
code, not assumed: the capture endpoint (POST /webhooks/capture/
{source}, mounted on the bypass mux per api_capture.go's own comment
-- capture must accept unauthenticated senders), the HMAC scheme
(webhookguard.VerifyHMAC: HMAC-SHA256 over the raw body, hex-encoded,
X-Hub-Signature-256 header) confirmed against its actual implementation
and cross-checked the documented openssl command against it directly,
and the default listen port from config.example.toml.
Six steps end to end: send a test event, inspect it in the Event
inspector, map fields by clicking the payload tree, create the binding
(covering the new owner/repo pin), approve it, then fire a signed
request and see the resulting task. Cross-references
docs/architecture/bindings.md and ARCHITECTURE.md's provenance
addendum rather than re-deriving their content.
This commit is contained in:
1 parent
f099f49f95
commit
c39633c09f
2 files changed
+105
-1
No files matched your search
+2
-1
@@ -1,3 +1,4 @@
|
||||
{"_type":"issue","id":"archie-core-zv2t","title":"CRITICAL: every JSX-based dashboard page rendered '[object Object]' instead of content","description":"Found and fixed 2026-09-03 while building the bindings dashboard UI (archie-core-t2db.8), via real browser verification per AGENTS.md's UI rule -- not caught by any existing test, since unit tests render components in isolation via @testing-library/preact and never exercise the actual router/mount integration path.\n\nEvery page registered in ui/src/main.jsx's routes table (dashboard, tasks, logs, captures, mappings, skills, workflows, memory, curators, channels, settings) returns a Preact VNode from its page function (e.g. dashboardPage() returns \u003cDashboardApp /\u003e), but main.jsx's router passed that VNode into ui/src/base/dom.jsx's mount()/append(), which only knows how to append real DOM Nodes or String()-ify everything else -- so every page's actual content became the literal text \"[object Object]\" in the browser. Confirmed via git show that this bug already existed in the committed ui/dist bundle before any change tonight -- served the pre-existing bundle in isolation via a throwaway webui.Server harness and reproduced the identical failure on the stock dashboard. This shipped in the tagged v1.20.0 release earlier this session (and likely earlier releases too, pending the recent Preact migration commits cf1bce4/e5abb62) -- SAM: worth deciding whether a patch release is warranted, this ticket does not decide that.","design":"Fixed in commit 85761c4: main.jsx's show() function now detects whether route.view()'s result is a real DOM Node (only the unused comingSoon()/soon:true fallback) or a Preact VNode (every real page today), and calls Preact's own render(vnode, outlet) for the latter instead of the generic mount() helper. mount() itself and its other 4 vanilla-DOM call sites (theme icon swap, app shell mount, chat drawer no-op) are untouched -- this was the minimal-blast-radius fix, not a rewrite of the rendering bridge.","acceptance_criteria":"Verified via Playwright against a real running server (not just source inspection): all 11 pre-existing pages plus the new bindings page render real content, zero occurrences of the literal string in any page's main content area. task check passes.","notes":"Closed on discovery -- already fixed, tested, and pushed in the same session that found it.","status":"closed","priority":0,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-09-02T20:18:11Z","created_by":"Sam Catlow","updated_at":"2026-09-02T20:18:20Z","closed_at":"2026-09-02T20:18:20Z","close_reason":"Fixed, tested (Playwright against a real isolated server), and pushed as commit 85761c4.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-2tqh","title":"P0: Reconcile domain packages - docs and tree have diverged","description":"internal/domain/ contains curator/, mapping/, scheduling/ which do NOT appear in migration-decisions.md's confirmed domain list (identity, agent, workflow, messaging, workintake, plugin).\n\nMeanwhile, confirmed domains (identity, agent, messaging, plugin) don't exist yet as packages.\n\nNeed to:\n- Audit actual domain packages in internal/domain/\n- Update migration-decisions.md to reflect reality\n- Decide: are curator/, mapping/, scheduling/ legitimate domains or should they be folded into confirmed domains?\n- Create stub packages for missing confirmed domains if needed\n\nBlocked by: nothing (but blocks clean migration progress)","status":"closed","priority":0,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-28T13:41:10Z","created_by":"Sam Catlow","updated_at":"2026-09-02T09:48:51Z","closed_at":"2026-08-31T10:04:53Z","close_reason":"Reconciled migration-decisions.md with actual tree: confirmed curator/mapping/scheduling as legitimate domains (were undocumented, not misplaced), documented that identity/agent/messaging/plugin are approved-but-unmaterialised targets rather than creating dead stub packages","external_ref":"https://github.com/samcharles93/archie-core/issues/651","dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-kg1w","title":"P0: Refactor cmd/archied/main.go - violates organisation.md wiring rule","description":"cmd/archied/main.go is 1085 lines of substantive wiring, directly violating organisation.md's rule: 'cmd/* MUST NOT contain substantive wiring'.\n\nThis is the migration docs' own stated next chunk: internal/app/{archied,agentworker} (not yet started).\n\nNeed to:\n- Extract wiring logic from cmd/archied/main.go\n- Create internal/app/archied/ package\n- Create internal/app/agentworker/ package\n- Move dependency injection and lifecycle management into app layer\n- cmd/archied/main.go should only contain CLI flag parsing, OS signal traps, and entry point routing\n\nBlocked by: nothing (but is foundational for migration work)","status":"closed","priority":0,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-28T13:41:00Z","created_by":"Sam Catlow","updated_at":"2026-09-02T09:48:51Z","closed_at":"2026-08-31T11:27:14Z","close_reason":"Extracted the full cmd/archied wiring package into internal/app/archied (matching the sibling internal/app/agentworker pattern); cmd/archied/main.go is now 18 lines (codesearch-helper dispatch + call into archied.Run()). Fixed two architecture tests still hardcoded to the old cmd/archied path. task check passes clean.","external_ref":"https://github.com/samcharles93/archie-core/issues/652","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-bas7","title":"P0: Fix failing test - CLAUDE.md missing ARCHITECTURE.md reference","description":"TestPluginEngineRuleIsCanonicalAndSharedByAgentInstructions in internal/plugin test is failing because CLAUDE.md is missing a required reference to ARCHITECTURE.md#plugin-engine-rule-strict.\n\nThis is a red build - needs immediate doc fix.\n\nNeed to:\n- Add the missing reference to CLAUDE.md\n- Verify test passes\n\nBlocked by: nothing","status":"closed","priority":0,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-28T13:40:53Z","created_by":"Sam Catlow","updated_at":"2026-09-02T09:48:52Z","closed_at":"2026-08-31T10:03:46Z","close_reason":"Added missing test + CLAUDE.md reference to ARCHITECTURE.md#plugin-engine-rule-strict","external_ref":"https://github.com/samcharles93/archie-core/issues/653","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -108,7 +109,7 @@
|
||||
{"_type":"issue","id":"archie-core-v9gv.3","title":"Update main entrypoint to mount via Preact render","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T13:37:19Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:07Z","closed_at":"2026-09-02T14:24:03Z","external_ref":"https://github.com/samcharles93/archie-core/issues/684","dependencies":[{"issue_id":"archie-core-v9gv.3","depends_on_id":"archie-core-v9gv","type":"parent-child","created_at":"2026-09-02T13:37:19Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-v9gv.1","title":"Rename UI view files from .js to .jsx","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T13:37:18Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:08Z","closed_at":"2026-09-02T14:24:01Z","external_ref":"https://github.com/samcharles93/archie-core/issues/685","dependencies":[{"issue_id":"archie-core-v9gv.1","depends_on_id":"archie-core-v9gv","type":"parent-child","created_at":"2026-09-02T13:37:18Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-v9gv","title":"Migrate Web UI to Preact","status":"closed","priority":2,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-09-02T13:37:08Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:09Z","closed_at":"2026-09-02T14:24:11Z","close_reason":"All children completed","external_ref":"https://github.com/samcharles93/archie-core/issues/686","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.8","title":"Dashboard UI for playbook bindings","description":"The t2db.4 backend shipped the CRUD API (POST/GET/PATCH/DELETE /api/bindings + POST /api/bindings/{id}/approve) plus the state machine and HMAC wiring. Operators cannot author bindings from the dashboard yet: a list-and-approve page exists in api_binding.go's response shape but the matching ui/src/ feature folder does not. Build the click-through editor mirroring ui/src/mappings/ -- the actual convention there is .jsx, not .js (mapping-editor.jsx, mappings.jsx, mappings.css) -- follow that file extension, not payload-field-mapping.md:145-152's literal naming if it says .js. Components: source matcher, mapping picker, workflow picker, secret input, owner/repo pin input, state-machine controls (create -\u003e edit -\u003e approve -\u003e armed). See docs/prds/webhook-intake-security.md and docs/prds/payload-field-mapping.md.\n\nRESOLVED 2026-09-03 (commit ac42f64): the backend multi-repo correctness gap is fixed. binding.Binding now has optional Owner/Repo fields (Validate rejects setting only one); resolveBindingRepo (internal/daemon/daemon.go) dispatches to a pinned binding's own owner/repo unconditionally, falling back to the existing single-configured-repo behavior when unpinned. Wired through the API request/response shape already. Remaining scope for this ticket is UI-only: the dashboard editor itself, including an owner/repo input field for the pin added above.","acceptance_criteria":"The click-through editor exists in ui/src/bindings/ (or the confirmed correct convention), covering create -\u003e edit -\u003e approve -\u003e armed, including an owner/repo pin input. Backend correctness (multi-repo dispatch) is already resolved -- not part of this ticket's remaining acceptance.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:39:00Z","external_ref":"https://github.com/samcharles93/archie-core/issues/687","dependencies":[{"issue_id":"archie-core-t2db.8","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.8","title":"Dashboard UI for playbook bindings","description":"The t2db.4 backend shipped the CRUD API (POST/GET/PATCH/DELETE /api/bindings + POST /api/bindings/{id}/approve) plus the state machine and HMAC wiring. Operators cannot author bindings from the dashboard yet: a list-and-approve page exists in api_binding.go's response shape but the matching ui/src/ feature folder does not. Build the click-through editor mirroring ui/src/mappings/ -- the actual convention there is .jsx, not .js (mapping-editor.jsx, mappings.jsx, mappings.css) -- follow that file extension, not payload-field-mapping.md:145-152's literal naming if it says .js. Components: source matcher, mapping picker, workflow picker, secret input, owner/repo pin input, state-machine controls (create -\u003e edit -\u003e approve -\u003e armed). See docs/prds/webhook-intake-security.md and docs/prds/payload-field-mapping.md.\n\nRESOLVED 2026-09-03 (commit ac42f64): the backend multi-repo correctness gap is fixed. binding.Binding now has optional Owner/Repo fields (Validate rejects setting only one); resolveBindingRepo (internal/daemon/daemon.go) dispatches to a pinned binding's own owner/repo unconditionally, falling back to the existing single-configured-repo behavior when unpinned. Wired through the API request/response shape already. Remaining scope for this ticket is UI-only: the dashboard editor itself, including an owner/repo input field for the pin added above.","acceptance_criteria":"The click-through editor exists in ui/src/bindings/ (or the confirmed correct convention), covering create -\u003e edit -\u003e approve -\u003e armed, including an owner/repo pin input. Backend correctness (multi-repo dispatch) is already resolved -- not part of this ticket's remaining acceptance.","status":"closed","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","updated_at":"2026-09-02T20:18:21Z","closed_at":"2026-09-02T20:18:21Z","close_reason":"Backend Owner/Repo fix (ac42f64) + full dashboard UI (85761c4, mirroring ui/src/mappings/) both landed. Full state machine (draft-\u003eedit-\u003epending_approval-\u003eapprove-\u003earmed-\u003edelete) verified end-to-end in a real browser. Also fixed a related bug found in the process (empty-secret-on-edit rejected, commit 51ca509).","external_ref":"https://github.com/samcharles93/archie-core/issues/687","dependencies":[{"issue_id":"archie-core-t2db.8","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.7","title":"Encrypt binding secrets at rest","description":"binding.Binding.Secret is currently stored as plaintext in the bindings.secret TEXT column. Anyone with read access to the SQLite file (the same access level as captured_events.body and tasks.body) sees HMAC secrets in plaintext. Add at-rest encryption for the secret column so a leaked database file does not leak sender-side shared secrets. See docs/prds/webhook-intake-security.md point 5. Decide the cipher (likely AES-GCM with a key derived from archied's secret registry or a deployment-level key file), the key-rotation story, and whether captured_events.body redaction is upgraded at the same time. Phase F work for t2db.","status":"closed","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T13:24:12Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:10Z","closed_at":"2026-09-02T13:55:47Z","close_reason":"Closed","external_ref":"https://github.com/samcharles93/archie-core/issues/688","dependencies":[{"issue_id":"archie-core-t2db.7","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T13:24:12Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-b6ew.6","title":"Inline editing for per-repo config fields (allow_concurrent, max_retries, review_enabled)","description":"archie-core-b6ew.4 shipped visibility for AllowConcurrent, MaxRetries, and ReviewEnabled on the repositories card (read-only), which was the concrete discoverability gap Sam hit. Actual inline editing was scoped out of that issue because it hits a real backend limitation discovered while implementing it: the dashboard's PATCH /api/config path (installUpdateConfigHandler in internal/app/archied/bootstrap.go) applies dotted-key updates via overlay.Nest + configuration.ApplyOverlayValues, and overlay.Nest (internal/infrastructure/configuration/overlay/overlay.go:162) only builds nested maps by splitting on '.' -- it has no array-index handling, so a key like 'repos.0.allow_concurrent' cannot be expressed, and Repos is a []config.Repo slice, not a map, so ApplyOverlayValues's YAML-merge-onto-struct approach cannot target one element either.\n\nThis needs either: (a) a dedicated repo-update seam (e.g. a webui handler keyed by owner/name that reads-modifies-writes the Repos slice directly, bypassing the generic dotted-overlay path), or (b) extending overlay.Nest/ApplyOverlayValues to support array indices generically, which is broader-reaching (touches every list-shaped config field, not just Repos) and needs its own design decision about whether index-based overlay keys are stable across a file edit that reorders [[repos]] entries. Option (a) is almost certainly the smaller, safer change -- decide in a short design note before implementing, per this repo's settled-design-first rule, since option (b) has real footguns (index stability) that deserve a deliberate answer, not a guess.","status":"closed","priority":2,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-09-02T12:22:53Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:11Z","started_at":"2026-09-02T12:26:59Z","closed_at":"2026-09-02T12:34:55Z","close_reason":"Traced the mechanism before implementing: overlay.Nest/ApplyOverlayValues has no array-index support, but Repos is addressed as a WHOLE dotted key ('repos', no dot) whose value is the full slice -- so no changes to overlay/configuration packages were needed at all. Added PATCH /api/config/repos/{owner}/{name} (webui.Server.UpdateRepoField seam + handleConfigRepoUpdate), wired in archied/bootstrap.go's installUpdateRepoFieldHandler: reads the daemon's own live, untrimmed Repos (not webui.RepoView, which omits Preflight/TestGlob and would silently drop them on a naive round-trip), mutates the one matched repo's one field via the pure applyRepoFieldUpdate helper, and republishes through the existing UpdateConfig(ctx, {\"repos\": repos}) path unchanged -- zero duplicated validate/persist/publish logic.\n\nFrontend: config-row.js's row() gained an opts.save override so a caller can redirect where an edit persists; the repositories table renders an autosaving checkbox (allow_concurrent, review_enabled) and a save-on-blur/Enter text input (max_retries) via api.configRepoUpdate, reverting/erroring inline on failure rather than reloading the whole page mid-edit.\n\nGo tests cover the pure applyRepoFieldUpdate function directly (matched-repo-only mutation, untouched-field preservation including Preflight, type coercion, unknown repo/field rejection) and the webui handler (seam delegation, editable-field allowlist enforced before the seam is called, 503/400 mapping). JS tests cover the structural render (checkbox/input initial state) -- the save round trip itself isn't exercisable through the test shim (addEventListener is a no-op there), consistent with existing config-row.test.js coverage.","external_ref":"https://github.com/samcharles93/archie-core/issues/689","dependencies":[{"issue_id":"archie-core-b6ew.6","depends_on_id":"archie-core-b6ew","type":"parent-child","created_at":"2026-09-02T12:22:53Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-c0y4","title":"TelegramConfig gains a bws-capable Token (SecretRef), not just TokenEnv","description":"internal/config/config.go's TelegramConfig only has TokenEnv (a plain OS env var name); it never resolves through secret.Registry the way Forge.Token and Provider.APIKey do (secret.SecretRef{engine,key}), per ARCHITECTURE.md:220-224's own note that TelegramConfig.TokenEnv is one of the older env-only fields kept for backwards compatibility. internal/app/archied/telegram_setup.go:75 does a bare os.Getenv(cfg.Chat.Telegram.TokenEnv), bypassing the secret registry entirely.\n\nThis means a bws-stored Telegram token cannot be referenced directly in config.toml the way [providers.openai].api_key or [forge.token] already can -- the operator has to bridge it into a real process env var by hand (bws secret get ... | export ARCHIE_TELEGRAM_TOKEN=...) instead of writing [chat.telegram.token] = { engine = \"bws\", key = \"...\" }.\n\nFix: add a Token secret.SecretRef field to TelegramConfig, mirroring Forge.Token's shape and resolution path. Keep TokenEnv working as a fallback/legacy path (same pattern documented for Provider.APIKeyEnv vs APIKey) rather than a breaking config change -- resolve Token first if set, fall back to TokenEnv. Update config.example.toml and docs/architecture identity/config docs to show the SecretRef form as the preferred one.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T12:21:10Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:12Z","external_ref":"https://github.com/samcharles93/archie-core/issues/690","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
# Building your first playbook binding
|
||||
|
||||
This walks through the whole no-code path the event-capture epic promises:
|
||||
point an external app's webhook at archie, see the real payload it sends,
|
||||
map the fields you care about, bind them to a workflow, and watch the next
|
||||
matching event turn into a task -- no code, no redeploy, no restart. See
|
||||
`docs/architecture/bindings.md` for the model and threat model behind each
|
||||
step below.
|
||||
|
||||
## 1. Send a test event
|
||||
|
||||
Point whatever external app you want archie to react to at:
|
||||
|
||||
```
|
||||
POST http://<your-archied-host>:8484/webhooks/capture/<source>
|
||||
```
|
||||
|
||||
`<source>` is a name you choose for this sender (e.g. `sentry`, `github-ci`,
|
||||
`stripe`) -- it's just a URL path segment, not a preset list. Send one real
|
||||
event however is easiest for a first test, e.g.:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:8484/webhooks/capture/sentry \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"issue": {"title": "NullPointerException in checkout"}, "level": "error"}'
|
||||
```
|
||||
|
||||
This event isn't signed yet, so it's captured but marked **unauthenticated**
|
||||
-- visible for you to design against, but incapable of triggering anything
|
||||
(`docs/architecture/bindings.md`'s threat-model section explains why: an
|
||||
unauthenticated event can never match a binding, no matter how it looks).
|
||||
|
||||
## 2. Inspect the captured payload
|
||||
|
||||
Open the dashboard's **Event inspector** (`/captures`). Your test event
|
||||
appears there with its real body -- this is schema-by-example: you're
|
||||
looking at an actual payload from the actual sender, not guessing at a
|
||||
schema in advance.
|
||||
|
||||
## 3. Map the fields you care about
|
||||
|
||||
Open **Field mappings** (`/mappings`) → **New mapping**. Pick your captured
|
||||
event from the dropdown, then click through its payload tree on the right --
|
||||
every key and value is clickable. Clicking a value binds it as a field
|
||||
(name, JSON path, and an inferred type you can change). Add whichever fields
|
||||
your workflow needs (e.g. the issue title), mark the ones that must be
|
||||
present as **Required**, hit **Preview** to confirm they resolve correctly
|
||||
against the real payload, then **Save**.
|
||||
|
||||
## 4. Create the binding
|
||||
|
||||
Open **Playbook bindings** (`/bindings`) → **New binding**:
|
||||
|
||||
- **Name** -- anything descriptive.
|
||||
- **Source** -- the same `<source>` segment from step 1 (e.g. `sentry`).
|
||||
- **Field mapping** -- the one you just saved.
|
||||
- **Workflow** -- which registered workflow should run on a match.
|
||||
- **Repo pin** (optional) -- leave both blank to use the single configured
|
||||
repo; set owner/repo explicitly if you run a multi-repo deployment.
|
||||
- **Shared secret** -- a real secret (16+ bytes), never `test1234`. The
|
||||
sender signs every request body with this via HMAC-SHA256 so archie can
|
||||
tell a genuine event from anyone who finds the URL.
|
||||
|
||||
Save. The binding starts in **draft** -- nothing fires yet.
|
||||
|
||||
## 5. Approve it
|
||||
|
||||
A **draft** or freshly-**edited** binding needs an explicit human approval
|
||||
before it can ever match a live event -- this is deliberate, not a missing
|
||||
step: an operator authoring a binding is a considered act, an event arriving
|
||||
is not, and nothing should self-arm (`docs/architecture/bindings.md`'s
|
||||
threat-model section, point 2). Click **Approve**. Status becomes **armed**.
|
||||
|
||||
## 6. Fire it for real
|
||||
|
||||
Send the same kind of event again, this time **signed** with the binding's
|
||||
secret:
|
||||
|
||||
```bash
|
||||
BODY='{"issue": {"title": "NullPointerException in checkout"}, "level": "error"}'
|
||||
SECRET="the-secret-you-set-in-step-4"
|
||||
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')
|
||||
|
||||
curl -X POST http://localhost:8484/webhooks/capture/sentry \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Hub-Signature-256: sha256=$SIG" \
|
||||
-d "$BODY"
|
||||
```
|
||||
|
||||
This event is captured as **authenticated**, matched against your armed
|
||||
binding, and dispatched into a new task through the exact same
|
||||
gate/worktree/sandbox pipeline every other task goes through -- see
|
||||
`ARCHITECTURE.md`'s Task Lifecycle section, "Provenance by origin." Check
|
||||
the **Tasks** page; a new task should appear, its body built from the fields
|
||||
your mapping resolved.
|
||||
|
||||
## Editing a live binding
|
||||
|
||||
Any edit to an armed binding -- even a typo fix -- drops it back to
|
||||
**pending_approval** automatically. This can't be bypassed by editing; it
|
||||
has to be re-approved. When editing, leave the **Shared secret** field blank
|
||||
to keep the existing secret; only fill it in if you're deliberately
|
||||
rotating it.
|
||||
Reference in new issue
Block a user