Skip to content

feat(app-kit): let an app's manifest declare its webhook source - #36359

Merged
bolichen97 merged 1 commit into
mainfrom
feat/w5-webhook-source
Nov 14, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/w5-webhook-source

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: An app declares in its manifest that it takes inbound webhooks, and Kiro Crew governs that webhook under the app's own name, so Ops Mission Control no longer needs a core constant and can be adopted from its own repository with no change for its users.

The webhooks governance scope names the sources that may start work from an inbound request. Its only app source was a hard-coded constant, webhook_sources.SOURCE_OPS_MISSION_CONTROL. Adoption's E10 check (builtin_adoption_checks.core_named_apps) refuses any app that a core table names, so that constant kept Ops Mission Control from being adopted onto its own repository (#26967). The owner ruling of 2026-11-13 on #26967 (comment 6841699202, item 2) asks for a generic, app-keyed webhook source seam, declared in the manifest, with the app moved onto it.

Why it matters

Ops Mission Control cannot leave core while core names it as a webhook source. Moving it carelessly would break the webhook for operators whose security policy names ops-mission-control, or let an app pick the source id a policy governs it under.

Not a goal

What changed (motivation → approach → change)

Goal: an app-keyed source, with no app id in core and no choice of id by the app. Approach: the source id is always the name the app is installed under, so existing policies naming ops-mission-control keep working, and the declaration only lets the policy answer for the app. It reaches nothing new (an app's routes could already take a request), so it is disclosed but not a staged grant.

  • Manifest: permissions.webhookSource (literal true only). Validated, kept in to_dict, the built-in snapshot and the signing payload only when true.
  • Answer: webhook_sources.app_source_refusal(name) (src/kiro_crew/webhook_sources.py) refuses a name that is a core source id (CORE_SOURCES, today agent), then an app whose live manifest does not declare the key, then asks the same policy question as the core webhook. SOURCE_OPS_MISSION_CONTROL is deleted, and the webhooks scope comment in platform/governance_parts/catalog.py names app sources generically.
  • Seam: ctx.webhook_source (apps/webhook_source_sdk.py), present only when declared, App Kit seam level 7 (apps/app_sdk_level.py, website/src/app-sdk/sdkLevel.ts, already 7 on main). scripts/adoption_pin.py derives level 7 for the key and the seam.
  • Built-in: Ops Mission Control's wheel copy declares the key and asks app_source_refusal("ops-mission-control").
  • Disclosure: the trust prompt (website/src/components/appstore/TrustAppModal.tsx, types.ts; every entry point that opens it reads the flag through the shared components/appstore/trustGrants.ts helper), the app detail page's permissions card (website/src/pages/AppDetailGrantBoxes.tsx, AppDetailPage.tsx, appDetailPageTypes.ts), the catalog's pre-install projection and kirocrew app install show it with the source id. The wording follows the sibling grant boxes ("This app also accepts requests from outside services"), is the same on the prompt and the detail page, and states the policy name as a condition ("If you set up a security policy, it controls this app under the name ..."), because an install may have no policy; strings in every catalog under website/src/i18n/locales/.
  • Docs: app-kit-platform.md section 42 (after the chat-slot seam's section 41), governance.md, platform-context.md, ops-mission-control.md, App Kit manifest and API references.

Seam level: per the driver decision of 2026-11-13 on #26967, every seam in the open batch shares level 7 (main is already at 7), so this adds its row to the level-7 list and an app feature-detects ctx.webhook_source. The app repository mirror is merged: KiroCrewCaptain/kirocrew-app-ops-mission-control#2.

Backwards compatibility

Compatible: the built-in asks the same policy under the same id, and its recorded app.json is rewritten from the wheel (now carrying the key) at every start; before that copy exists the shipped manifest answers. No policy, setting or route changes shape.

The diff removes one public constant:

Reader: src/kiro_crew/apps/builtins/ops_mission_control/backend/providers/webhook.py:enqueue -- app -- now asks app_source_refusal under its own APP_NAME (test_the_webhook_asks_its_own_source, test_the_manifest_declares_the_webhook_source_under_the_app_name)
Reader: src/kiro_crew/apps/builtin_adoption_checks.py:core_named_apps -- release -- reads SOURCE_* constants generically, now only CORE_SOURCES (test_an_app_keyed_webhook_source_names_no_app_in_core)
Reader: test/test_governance_webhooks_hook_events.py:TestWebhookSources -- release -- uses a fixture id instead of the constant (test_no_policy_refuses_only_in_lts)
Reader: KiroCrewCaptain/kirocrew-app-ops-mission-control:backend/providers/webhook.py -- app -- imported its own APP_NAME, never the constant; now asks ctx.webhook_source first and source_refusal by name on an older host (tests/test_webhook_governance.py)

Tests

  • test/test_app_webhook_source.py: only literal true declares; an undeclared or absent app is refused before the policy is asked; a declared app is asked under its own name; LTS and OSS policy naming the app permits it; an app named like a core source is refused; the context carries the seam only when declared; the seam re-reads the live manifest; the async answer; the install summary line; the shipped-manifest fallback; the built-in record and the catalog projection keep the key.
  • test/test_builtin_adoption_release.py: E10 still refuses a SOURCE_* constant naming an app, and core_named_apps() is exactly CORE_SOURCES.
  • test/test_builtin_adoption_pins.py: the pin tool finds the key and the seam at level 7.
  • apps/builtins/ops_mission_control/tests/test_webhook_governance.py: the wheel manifest declares the key under the app's name.
  • website/src/test/TrustAppModalWebhookSource.test.tsx: the trust prompt box with the source id, the detail-page box, and the Library's trust target from a registry row and an installed app, literal true only.
  • website/src/test/TrustAppModalChatSlots.test.tsx: the shared trustGrants helper's exact output carries webhookSource beside the other flags.

Determinism: the new and changed Python tests passed 20 times at -n0, 10 times at -n 4 --dist loadgroup beside test_governance_webhooks_hook_events.py and test_app_context.py, and in a shuffled order (seed 17604, 96 passed). Local, rebased on origin/main (02bad16, and 92d3216 for the webhook, adoption and chat-slot suites): 3332 related backend tests (every test file naming the catalog, permissions summary, manifest sections, webhook sources, app context or pin tool) and the ops-mission-control suite green; vitest for the trust prompt, detail page and apps pages (41 files, 443 tests) and tsc -p tsconfig.app.json green.

Manual verification

Rendered the real built dashboard with a stubbed app that declares the key (Playwright, dark and light): the trust prompt shows the webhook box with the source id, and the detail page's permissions card shows the box. An app without the key shows neither (unit tests). The screenshots below were taken before the box's text was reworded; placement and styling are unchanged, and the heading now reads "This app also accepts requests from outside services" and the detail line "Policy name: ".

Screenshots / video

Trust prompt, dark:

Trust prompt with the inbound webhooks box, dark

Permissions card on the app detail page, dark:

Detail page permissions card with the webhook source box, dark

Light theme

Trust prompt, light

Detail page permissions card, light

Related Issues

Part of #26967

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 13, 2026 03:31
@bolichen97
bolichen97 enabled auto-merge (squash) November 13, 2026 03:31
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 2824f0733309e0e6bd839b0523c912e90a16f162 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the source id is fixed to the app's install name, policies that name ops-mission-control keep working, and nothing in the tree still reads the deleted SOURCE_OPS_MISSION_CONTROL.

Notes

  • Description truncated; take-away check covered the one removed constant (no remaining readers in src/, test/, website/, docs).

[DESIGN-REVIEWED] 2824f07

Description read

[DESCRIPTION-READ] 0562e495dd63d27aab39ae4b17ec26a48f9f4ce0adef5b2a9e3fa7409009a78b

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 2824f0733309e0e6bd839b0523c912e90a16f162 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: deleting SOURCE_OPS_MISSION_CONTROL is the fix, and the cited owner ruling on #26967 asks for the manifest-declared seam. The declaration only narrows what the policy permits.

Not checked: owner ruling #26967 comment 6841699202 (not readable from the repository)

Notes

  • Item 4 — one consumer, generalized: the only in-tree caller is Ops Mission Control's webhook.py, and it calls app_source_refusal(APP_NAME) directly. ctx.webhook_source (apps/webhook_source_sdk.py) has 0 in-tree consumers (grepped webhook_source\b under src); its only consumer is the external app repository mirror, which falls back to source_refusal by name on older hosts. Subtraction: drop refusal_async and the source property, and keep only refusal().

What this change ships

Inventory (8 items) — 7 justified

Intent: let an app declare that it takes inbound webhooks and be governed under its own name, so Ops Mission Control can leave core. This is an ADDITION.

  1. Manifest key permissions.webhookSource, which only accepts literal true — justified
  2. An app's webhook is refused unless its live manifest declares the key — justified
  3. An app named like a core source (agent) is refused — justified
  4. New hook-context seam ctx.webhook_source at SDK level 7 — one consumer, generalized
  5. The trust prompt and the app detail page show a "accepts requests from outside services" box with the policy name — justified
  6. kirocrew app install and the catalog's pre-install view disclose the key — justified
  7. The SOURCE_OPS_MISSION_CONTROL constant is deleted, which clears E10 for Ops Mission Control — justified
  8. The pin tool requires level 7 for the key and the seam — justified

[FIRST-PRINCIPLES-REVIEWED] 2824f07

Description read

[DESCRIPTION-READ] 4a6e8abfc1ee0746f36c99e31e232433b32bbb99224d51c066fd8b4adb00e555

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 2824f0733309e0e6bd839b0523c912e90a16f162 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the new disclosure boxes appear in all four screenshots, in both themes, and the new wording drops the terms the blind reader stumbled on ("webhook", "route", "delivery").

Notes

  • The screenshots show the old copy, so the shipped strings were never blind-read. Re-shoot shot-01 to shot-04 with the current webhook_source_heading/webhook_source_desc text.
  • The detail-page caption "Policy name" doesn't say what kind of policy it means. Use the modal's wording instead, e.g. "Name in your security policy".
  • On the trust prompt the box sits after "grants all three…", and the reader asked whether it was "a fourth power, an extra I can refuse". Place it before that sentence, or say in the heading that it comes with trusting the app.

[UX-REVIEWED] 2824f07

Description read

[DESCRIPTION-READ] ee360a2a5ef8a02bfa61217966b64d81c210f509da004ced24cda6097a2af508

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 2824f0733309e0e6bd839b0523c912e90a16f162 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 2824f07

Verdict parsed from the review's SHA-scoped output markers for commit 2824f0733309e0e6bd839b0523c912e90a16f162.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 2824f0733309e0e6bd839b0523c912e90a16f162 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 2824f0733309e0e6bd839b0523c912e90a16f162 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 2824f07

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 2824f0733309e0e6bd839b0523c912e90a16f162 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 729 lines, more than the 400 it may approve on its own.

No blocking findings. The PR adds a permissions.webhookSource manifest key, which only a literal true declares. With it, the webhooks policy answers for the app under its own install name. It also deletes the core SOURCE_OPS_MISSION_CONTROL constant and moves Ops Mission Control onto the new app_source_refusal. Nothing breaks for existing users: the source id stays ops-mission-control. Built-ins rewrite their installed app.json from the wheel at every start, and the shipped package answers before that copy exists. The webhook already runs in a worker thread, so the extra file read is fine. Nothing in the tree still reads the removed constant. core_named_apps() now returns only CORE_SOURCES because _BUILTIN_SERVICE_APPS is empty, so adoption check E10 no longer refuses the app. The trust model holds: without the declaration the app is refused, a name that collides with a core source is refused, and the policy stays the real gate. The flag is kept in to_dict, the signing payload (only when true), the built-in record, the catalog projection, the install summary and the trust prompt and detail page. Backend and frontend tests cover each behaviour, and all CI check

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 2824f07333 · 729 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/cli_server.py, src/kiro_crew/cli_server_restart.py, src/kiro_crew/cli_server_stop.py since this head went green (27e9359 -> 510ba1b); CI re-running. The old head 1cc0592 also had two CodeQL Analyze jobs red on an installation API rate limit during SARIF upload (not a finding) and two Windows jobs starved in the queue for over an hour; the new head re-runs both.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 13, 2026
@bolichen97
bolichen97 force-pushed the feat/w5-webhook-source branch from f1b3bac to 1bdec3f Compare November 13, 2026 18:05
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased onto main after #36338 to clear the merge conflict (head 1bdec3fbba0). Per the driver decision of 2026-11-13 on #26967 (comment 6844003956), this seam now shares App Kit seam level 7 with the rest of the open batch instead of taking 8: APP_SDK_LEVEL stays 7, scripts/adoption_pin.py maps permissions.webhookSource and ctx.webhook_source to 7, and the spec section is renumbered to §41 after main's §39/§40. The merge took AppDetailPage.tsx past the 2,000-line cap, so the trust prompt's grants (the six per-site manifest reads, including main's desktop) now come from one helper, components/appstore/trustGrants.ts, at all four call sites. Related backend tests (377), frontend vitest (470), tsc, eslint, docs-lint and the diff-scoped gates are green locally.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 13, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Head 1bdec3fbba0: every lane is green except Coverage Gate, which fails on src/kiro_crew/agent_ipc_client.py (75.7%, 87/115). This PR does not touch that file. Main fails the same way on every PR since #36619, and the fix is #36804 (open, auto-merge armed). I will rebase onto main once #36804 lands. The earlier reds on this head (GPT 6.1 Review, CodeQL actions, Dependency License Gate, PR Policy) were the repo-wide installation API rate limit, and their one rerun passed.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 13, 2026
@bolichen97
bolichen97 force-pushed the feat/w5-webhook-source branch from 1bdec3f to 47f6921 Compare November 13, 2026 22:57
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased onto main 6d61070 for the red Coverage Gate on 1bdec3fb: it flagged src/kiro_crew/agent_ipc_client.py at 75.7%, a file this PR does not touch, and #36804 (merged as af8d570) fixed that on main. The PR's patch is unchanged (git range-diff shows =). The readiness failure on the old head was the installation rate limit (0/15000), not a finding. New head 47f6921; CI is re-running.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 14, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 14, 2026
@bolichen97
bolichen97 force-pushed the feat/w5-webhook-source branch from 6f70c0e to 42e70b5 Compare November 14, 2026 18:59
@bolichen97

Copy link
Copy Markdown
Contributor Author

Conflict rebase onto main 66dc266de3 (head 42e70b5f7f): #36349 added permissions.desktopCapabilities to the same seam lists this PR extends (manifest section, permissions summary, adoption-pin scan, trust prompt, detail page, locales, App Kit docs); both entries are kept side by side, nothing of either dropped. The base also carries #37171, which fixes the test_tracing_otlp.py reds on shard 2 (3.12 and Windows). Related backend tests (1168), frontend tests (177), tsc, eslint, i18n check, mypy, flake8 and docs-lint pass locally. CI re-running.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 14, 2026
@bolichen97
bolichen97 force-pushed the feat/w5-webhook-source branch from 42e70b5 to ea57108 Compare November 14, 2026 19:16
@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The trust prompt's webhook box is unreadable and says something untrue span=33465094d6c6

fixed in ea57108: the trust-prompt heading follows the sibling grant boxes ("This app also accepts requests from outside services"), and the body no longer claims a policy exists: "Other services can send it requests, and a request can start work. If you set up a security policy, it controls this app under the name {{source}}."
Class swept (every surface that words this grant): the detail page now uses the same wording ("Accepts requests from outside services, and a request can start work.") with "Policy name: ", and kirocrew app install prints "accepts requests from outside services, which can start work (security-policy name '')"; "route" and "delivery" are gone from all of them.
Every locale catalog carries the reworded strings (en-XA regenerated); keys are unchanged, so the component tests still pin which box shows when.

@bolichen97
bolichen97 force-pushed the feat/w5-webhook-source branch from ea57108 to cc4b339 Compare November 14, 2026 19:28
@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Two spec cross-references cite app-kit-platform.md section 41 instead of 42 span=ab5b54cffbdb

fixed in cc4b339: governance.md and ops-mission-control.md now point at section 42, the webhook-source contract.
Class swept: every section number this diff adds next to the webhook seam (git diff origin/main...HEAD -- docs | grep -E 'section [0-9]+|§ ?[0-9]+'); the remaining hits name §42 for the webhook seam, and §41 only where they mean chat slots.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 14, 2026
@bolichen97
bolichen97 force-pushed the feat/w5-webhook-source branch from cc4b339 to fdcafe1 Compare November 14, 2026 20:37
@bolichen97

Copy link
Copy Markdown
Contributor Author

Conflict rebase onto main e5d20ea741 (head fdcafe1cc8): #36322 added the SDK project picker to the same level-7 seam lists in api-reference.md and app-kit-platform.md; both entries kept. cc4b3399fa had every lane green (Design, First Principles, UX, GPT, Opus PASS; all test shards green) before the base conflicted. Locales re-validated, i18n check, related backend (522) and frontend (1398) tests and docs-lint pass locally. CI re-running.

An app that takes inbound deliveries on its own routes declares
permissions.webhookSource in app.json. Core then answers the webhooks
governance scope for it under the app's own name
(webhook_sources.app_source_refusal) and hands its hook context
ctx.webhook_source, a level-7 App Kit seam shared with the rest of the
open seam batch (driver decision of 2026-11-13 on #26967), so an app
feature-detects it. The trust prompt, the app detail page and the CLI
install summary show the declaration with the source id.

Ops Mission Control's wheel copy declares the key and asks the seam
under ops-mission-control, the id every existing policy names, so its
behaviour is unchanged. The hard-coded SOURCE_OPS_MISSION_CONTROL
constant is deleted, so adoption's E10 check no longer refuses the app.

The trust prompt's grants are read from a manifest by one helper
(trustGrantsOf), so the detail page stays under the file line cap.

Part of #26967
@bolichen97
bolichen97 force-pushed the feat/w5-webhook-source branch from fdcafe1 to 2824f07 Compare November 14, 2026 21:13
@bolichen97

Copy link
Copy Markdown
Contributor Author

Conflict rebase onto main 6178815a47 (head 2824f07333): #36342 added the host-API box to the trust prompt and permissions.api to the shared trustGrants helper, next to this PR's webhook box and flag; both kept. Locales re-validated; tsc, eslint, i18n check, related frontend (1618) and backend (1827) tests and docs-lint pass locally. CI re-running.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 14, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Green at 2824f07333 (readiness passed, every lane PASS). green_age.py reports the base moved since (6178815a47 -> 46f62deab7); the only same-file overlap is docs/system-specs/modules/governance.md, where main added an unrelated paragraph near line 2021 (kiro-cli permission rule files), far from this PR's line. Proved the merged tree instead of re-pushing, so the green and the remaining re-sync budget are kept for after a human approval: rebased locally onto 46f62deab7 with no conflict, and the related backend tests (2215, every test file naming the webhook seam, manifest, permissions summary, catalog and pin tool) and docs-lint pass on that tree.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review checked head 2824f07 and found nothing that blocks. It traced enqueue in the Ops Mission Control webhook provider to app_source_refusal. That function refuses a core source id first, then refuses an app whose live manifest does not declare webhookSource, and only then asks the policy under the app's installed name. A test turns red for each step: the core-id refusal, the refusal order (the policy is never asked for an undeclared app), the live re-read, the fallback to the shipped manifest, and the built-in record keeping the key. SOURCE_OPS_MISSION_CONTROL has no reader left on this head, and its allowlist row is removed in the same commit. The extra manifest read still runs through asyncio.to_thread, and the new refusals return the same 401 as before.

Done well: the source id always comes from the installed app name, never from the app. Every existing policy that names ops-mission-control keeps working, and an app named agent cannot use the core webhook's permit.

Security: this touches manifest parsing and the webhooks governance answer, but it only adds refusals. An unreadable manifest declares nothing, so the new check fails closed. On every host Ops Mission Control declares the key, because its record is rewritten from the wheel at start and the check falls back to the shipped manifest, so OSS and LTS behave as they do today. The policy is still asked under the same id, so no gate lets through anything main refuses.

Optional:

  • The trust prompt and the detail page word the webhook box differently. The PR body says they match, and the detail page's "Policy name" caption has no condition. Either share the trust prompt's sentence or correct the body.
  • The screenshots were taken before the reword. Re-shooting the trust prompt and detail page in dark and light would show the strings this head ships.
  • The section 42 Writers list in app-kit-platform.md names app_sdk_level.py and sdkLevel.ts, which this diff does not edit. Also, ctx.webhook_source.source has no in-tree reader and could be dropped.

@bolichen97
bolichen97 merged commit b81cf5a into main Nov 14, 2026
99 of 100 checks passed
@bolichen97
bolichen97 deleted the feat/w5-webhook-source branch November 14, 2026 22:41
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants