Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(signals): report the calling scout's effective write eligibility (#98992)

posthog[bot]13b1f08a961f
diff --git a/docs/internal/signals-operational-scouts.md b/docs/internal/signals-operational-scouts.md
index 8107e7cc18c0..e00a67cc4341 100644
--- a/docs/internal/signals-operational-scouts.md
+++ b/docs/internal/signals-operational-scouts.md
@@ -14,3 +14,17 @@ Role reconciliation runs independently of skill content hashes.
Archived canonical skills retain their operational identity in config responses.
The config API refuses to delete their configs.
Set `enabled=false` to stop an operational scout.
+
+## Write eligibility
+
+Operational scouts use the same write gates as other scouts.
+Read `summary.emit_eligibility` from `scout-project-profile-get` to check the calling scout's write eligibility.
+Use `summary_only=true` to omit the full inventory.
+The response includes the calling scout's dry-run setting, but the cached profile keeps only the team-wide gates.
+Outside a scout run, supply `run_id` to check a specific run on the project.
+
+When `blocking_reason` is `scout_emit_disabled`, continue the investigation without emitting findings or reports.
+Keep the findings in the run summary so a person can evaluate the dry run.
+For a team-wide block, refresh the profile once with `force_refresh=true` before stopping the investigation.
+If the block remains, record its reason and remediation in the run summary.
+The write path checks eligibility again, so a successful profile check does not guarantee a later write.
diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.md
index 896f2d8ecc7d..5d0645721af5 100644
--- a/products/signals/backend/scout_harness/AGENTS.md
+++ b/products/signals/backend/scout_harness/AGENTS.md
@@ -61,6 +61,7 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e
- `builders.py` — deterministic builders that compute the inventory payload for `SignalProjectProfile`. Sections fall into three layers: capability / configured (sticky — `products_in_use`, `integrations`, `external_data_sources`, `signal_source_configs`, `scout_fleet`, …), aggregated recency (`recent_activity` — per-scope counts off the activity log, cross-cutting orientation across every entity type), and per-entity recent inventory (`recent_surveys`, `recent_feature_flags`, `recent_experiments`, `recent_alerts`, `recent_hog_functions`, `recent_hog_flows`, `recent_notebooks`, `recent_cohorts`, `recent_actions`, `recent_dashboards`, `business_knowledge`).
Per-entity sections are deliberately light (counts + 5 most-recent items with name, status, timestamp); deep drilldowns go via the per-entity MCP list tools.
See the module docstring at `profile/builders.py` for the authoritative section list — when adding or renaming a section, bump `INVENTORY_SOURCE_VERSION` so the cache invalidates cleanly.
+ One section is not answered from the row: `emit_eligibility` is derived by `tools/emit.py:emit_eligibility`, which the builder calls with no run to get the team-wide floor and `SignalProjectProfileViewSet.current` re-derives for whichever scout is reading (resolved from its sandbox token's task binding, so the scout passes nothing). A profile row is shared by every scout on the team, so it cannot see a single scout's dry-run `emit` toggle — and a scout reading `can_emit=true` that the write path then refuses with `scout_emit_disabled` is exactly the relapse this shared derivation closes. `can_emit` is `blocking_reason is None`, and with a run in hand `blocking_reason` comes straight from `_preflight_emit_gates`, the same call `emit_report` and `edit_report` make at write time.
- `inactivity.py`
The stop switch on the waste axis (the failure breaker below covers the failure axis). `sweep_inactive_scouts()` judges **consumption, not emission**: a scout counts as consumed only when a **person** acted on a report it wrote or edited in the `TOUCHED_REPORT_LOOKBACK` — a log artefact attributed to a user (pipeline writers append log artefacts of their own, so unattributed ones don't count), a `SignalReportAction` row (the light interactions the inbox UI records server-side: opening a report's detail view via the `viewed` endpoint, rating it with the thumbs via `feedback` — reading counts on purpose, since that is how digest-style reports are consumed), or the report recently reaching `resolved`/`deleted` (`resolved` deliberately includes the GitHub webhook's resolve-on-merge, so a PR merged on GitHub with no in-app action still counts; `suppressed` is deliberately excluded because the same webhook suppresses on close-unmerged with no human involved).
The two `pause_reason`s behave differently: `ignored` (the scout holds at least one report older than `ESTABLISHED_REPORT_AGE` and none of its reports show consumption) warns and then pauses after `WARNING_GRACE`; `no_output` (silent, with no judgeable report evidence) only ever warns, because a watch scout's silence can be its job. A scout with output but nothing judgeable on the report side — findings-only, Slack-routed (consumption happens in Slack where no evidence flows back), or every report younger than `ESTABLISHED_REPORT_AGE` — is left alone.
diff --git a/products/signals/backend/scout_harness/profile/builders.py b/products/signals/backend/scout_harness/profile/builders.py
index 87120b1cb82d..e0f8f5ed7ff2 100644
--- a/products/signals/backend/scout_harness/profile/builders.py
+++ b/products/signals/backend/scout_harness/profile/builders.py
@@ -76,7 +76,7 @@ logger = logging.getLogger(__name__)
# (or restructuring an existing one) without bumping the version would silently mix old
# and new shapes in the cache. A redaction change bumps it too, so rows built before the
# redaction stop being served.
-INVENTORY_SOURCE_VERSION = "v13"
+INVENTORY_SOURCE_VERSION = "v14"
# Top-events ClickHouse query bounds. 7d is short enough to spot recent bursts and long
# enough to stabilize counts on low-traffic teams; 50 covers the long tail without
@@ -286,35 +286,20 @@ def _signal_source_configs(team: Team) -> dict[str, list[dict[str, str]]]:
def _emit_eligibility(team: Team) -> dict[str, Any]:
"""Whether scout findings can actually reach the inbox for this team.
- Mirrors the team/org-level half of the shared emit preflight (`_preflight_emit_gates`) so a
- scout can read it at cold start and quick-close before doing throwaway work whose output would
- be silently dropped. Both the signal and report channels gate on the same two conditions: the
- org must have approved AI data processing, and the `signals_scout` source must be enabled.
- `remediation` reuses the emit path's authoritative pointers so the profile and the skip
- response never drift.
+ The profile row is shared by every scout on the team, so this stores the team-wide floor: the
+ two gates that hold for all of them (org AI-processing consent, `signals_scout` source
+ enablement). `emit_eligibility(run=None)` is where those are evaluated, and the profile
+ endpoint re-derives the block for whichever scout is reading. Delegating rather than
+ re-deriving is the point: the value a scout reads while orienting and the gate applied when it
+ writes come out of the same function, so the profile can't promise an emit the write path
+ refuses.
"""
# Deferred to break the profile↔tools import cycle: `tools/__init__` eagerly imports
# `tools.profile`, which imports this `profile` package, so a module-level import here would
# re-enter a half-initialized `profile` package during `tools` package init.
- from products.signals.backend.scout_harness.tools.emit import ( # noqa: PLC0415
- SOURCE_PRODUCT,
- SOURCE_TYPE,
- remediation_for_skip,
- )
+ from products.signals.backend.scout_harness.tools.emit import emit_eligibility # noqa: PLC0415
- ai_processing_approved = bool(team.organization.is_ai_data_processing_approved)
- source_enabled = SignalSourceConfig.is_source_enabled(team.id, SOURCE_PRODUCT, SOURCE_TYPE)
- can_emit = ai_processing_approved and source_enabled
- # Point at the first failing gate, matching the preflight's check order.
- blocking_reason = (
- None if can_emit else ("ai_processing_not_approved" if not ai_processing_approved else "source_disabled")
- )
- return {
- "ai_processing_approved": ai_processing_approved,
- "source_enabled": source_enabled,
- "can_emit": can_emit,
- "remediation": remediation_for_skip(blocking_reason),
- }
+ return emit_eligibility(team=team, run=None)
def _scout_fleet(team: Team) -> dict[str, Any]:
diff --git a/products/signals/backend/scout_harness/profile/schema.py b/products/signals/backend/scout_harness/profile/schema.py
index b57415240bff..aa9d50ab121f 100644
--- a/products/signals/backend/scout_harness/profile/schema.py
+++ b/products/signals/backend/scout_harness/profile/schema.py
@@ -67,20 +67,29 @@ class SignalSourceConfigs(_Section):
class EmitEligibility(_Section):
- """Whether a scout's findings can actually reach the inbox for this team.
-
- Both the signal channel (`emit_signal`) and the report channel (`emit_report`) pass the
- same team/org-level preflight gates: the organization must have approved AI data processing
- and the `signals_scout` signal source must be enabled. When either is off, every emit is
- silently dropped — so a scout can read this at cold start and quick-close instead of doing
- throwaway investigation whose output never surfaces. `remediation` is the one-line next step
- when `can_emit` is False. Per-scout state (the config's dry-run `emit` toggle) is not covered
- here — this is the team-wide floor, not a single scout's config.
+ """Whether a scout's findings and reports can actually reach the inbox.
+
+ `can_emit` is the one value to read, and `blocking_reason` names the gate behind a False: the
+ same reason code `emit_report` returns as `skipped_reason` and `edit_report` refuses with, with
+ `remediation` as the one-line next step. Three gates sit behind it: the organization must have
+ approved AI data processing, the `signals_scout` signal source must be enabled, and the calling
+ scout's own config must not be in dry-run (`emit=False`). When any is off every write is
+ dropped. A dry-run scout continues its investigation without emitting findings or reports.
+ For other blocks, a scout can stop after it checks the reason and remediation.
+
+ As stored on a profile row these are the two team-wide gates only, because the row is shared by
+ every scout on the team: `scout_emit_enabled` is null and `can_emit` is the team-wide floor. The
+ profile endpoint re-derives both for the scout that is reading, which is what makes the value it
+ returns the effective one.
"""
ai_processing_approved: bool
source_enabled: bool
+ # The calling scout's own dry-run toggle. Null on a stored row (no scout in hand) and whenever
+ # the run's dispatch-time config is gone, which fails closed as `scout_config_missing`.
+ scout_emit_enabled: bool | None
can_emit: bool
+ blocking_reason: str | None
remediation: str | None
diff --git a/products/signals/backend/scout_harness/prompt.py b/products/signals/backend/scout_harness/prompt.py
index 16e47c75ff89..bec053ee9579 100644
--- a/products/signals/backend/scout_harness/prompt.py
+++ b/products/signals/backend/scout_harness/prompt.py
@@ -1389,7 +1389,9 @@ Once you've read your skill, call:
That returns a deterministic snapshot of this team, worth 4-5 discovery calls in one: products in use, connected integrations, warehouse sources, signal source configs (split enabled/disabled), the `scout_fleet` roster of which other scouts run here, and counts of existing inbox reports. It's computed from authoritative tables, so treat it as ground truth, as distinct from the scout-inferred notes in `scout-scratchpad-search`.
-Check `summary.emit_eligibility.can_emit` first: if it's `false`, nothing you emit this run can reach the inbox. `summary` is the compact envelope at the top of the response, repeating the gate and the inbox counts that also sit inside `payload.inventory`. Read it there, because the inventory is long enough that the response can be cut off before you reach the copy inside it. If the envelope is missing from what you received, call the tool again with `summary_only=true` rather than assuming you may emit. The profile is cached for up to ~1h and an admin may have just fixed the gate, so re-fetch once with `force_refresh=true` before acting. If it's still `false`, read `summary.emit_eligibility.remediation` for the reason and next step, note it in your run summary, and close out immediately rather than investigating findings that would be silently dropped.
+Check `summary.emit_eligibility.can_emit` first. It includes your scout's dry-run setting and the team-wide write gates that `{emit_tool}` checks. `summary` is the compact envelope at the top of the response. It repeats the gate and inbox counts from `payload.inventory`, which can be cut off in a long response. If the envelope is missing, call the tool again with `summary_only=true`. Do not assume you can emit when the gate is missing.
+
+If `can_emit` is `false`, read `summary.emit_eligibility.blocking_reason` and `summary.emit_eligibility.remediation`. For `scout_emit_disabled`, continue the investigation without emitting findings or reports. Keep the findings in your run summary so a person can evaluate the dry run. Do not close out early because of this dry-run setting. For a team-wide gate (`ai_processing_not_approved` or `source_disabled`), re-fetch once with `force_refresh=true`: the cached profile can be up to ~1h old and an admin may have fixed the gate. If a block other than `scout_emit_disabled` remains, note the reason and remediation in your run summary and close out immediately. The write path checks the gates again when you write, so eligibility can change after this read.
{tail}
diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.py
index a5212eb46e32..c6248d8a99cb 100644
--- a/products/signals/backend/scout_harness/serializers.py
+++ b/products/signals/backend/scout_harness/serializers.py
@@ -1900,7 +1900,7 @@ class SignalSourceConfigsBucketsSerializer(serializers.Serializer):
class EmitEligibilitySerializer(serializers.Serializer):
- """`inventory.emit_eligibility` — whether scout findings can reach the inbox for this team."""
+ """`inventory.emit_eligibility` — whether the calling scout's findings and reports can reach the inbox."""
ai_processing_approved = serializers.BooleanField(
help_text="Whether the organization has approved AI data processing (an org-level gate on all scout emits).",
@@ -1908,17 +1908,34 @@ class EmitEligibilitySerializer(serializers.Serializer):
source_enabled = serializers.BooleanField(
help_text="Whether the `signals_scout` signal source is enabled for this team.",
)
+ scout_emit_enabled = serializers.BooleanField(
+ allow_null=True,
+ help_text=(
+ "Whether the calling scout's own config can write, as opposed to running in dry-run "
+ "(`emit=false`), where it investigates but everything it writes is discarded. Null when the "
+ "read is not from a scout run, so no single scout's config applies."
+ ),
+ )
can_emit = serializers.BooleanField(
help_text=(
- "True only when both team/org-level gates pass, so scout findings (signal and report "
- "channels alike) actually reach the inbox. When False, every emit is silently dropped — "
- "quick-close instead of doing throwaway investigation. Does not account for a scout's "
- "own dry-run `emit` toggle, which is per-config, not team-wide."
+ "True only when every gate passes, so this scout's findings and reports (both channels) "
+ "actually reach the inbox. When False, every write is dropped or refused — quick-close "
+ "instead of doing throwaway investigation. Read this one value: it accounts for the "
+ "calling scout's own dry-run posture as well as the team-wide gates, and it is the same "
+ "gate `emit-report` and `edit-report` apply at write time."
+ ),
+ )
+ blocking_reason = serializers.CharField(
+ allow_null=True,
+ help_text=(
+ "Which gate blocks the write: `scout_emit_disabled`, `scout_config_missing`, "
+ "`ai_processing_not_approved`, or `source_disabled`. Null when `can_emit` is True. Matches "
+ "the `skipped_reason` `emit-report` returns for the same block."
),
)
remediation = serializers.CharField(
allow_null=True,
- help_text="One-line next step to unblock emits when `can_emit` is False; null when emits can flow.",
+ help_text="One-line next step to unblock writes when `can_emit` is False; null when writes can flow.",
)
@@ -2571,6 +2588,17 @@ class ProjectProfileQuerySerializer(serializers.Serializer):
"one extra `build_inventory` per simultaneous request."
),
)
+ run_id = serializers.UUIDField(
+ required=False,
+ allow_null=True,
+ help_text=(
+ "The run whose scout's write posture `emit_eligibility` should answer for. A scout "
+ "sandbox never needs this: its token is bound to the task that dispatched the run, and "
+ "that binding is what the endpoint reads, so it wins over any value passed here. Pass it "
+ "to inspect one scout's effective eligibility from outside a run — a run id from another "
+ "project is ignored."
+ ),
+ )
class ProjectProfileSerializer(serializers.Serializer):
diff --git a/products/signals/backend/scout_harness/tools/emit.py b/products/signals/backend/scout_harness/tools/emit.py
index c755961a8324..3049eb66d3e4 100644
--- a/products/signals/backend/scout_harness/tools/emit.py
+++ b/products/signals/backend/scout_harness/tools/emit.py
@@ -572,3 +572,70 @@ def remediation_for_skip(skipped_reason: str | None) -> str | None:
if skipped_reason is None:
return None
return EMIT_SKIP_REMEDIATION.get(skipped_reason)
+
+
+# What the per-scout `emit` toggle was, given the gate `_preflight_emit_gates` stopped on. That
+# check runs first, so the reason it returns already fixes the toggle's value: only
+# `scout_emit_disabled` means the toggle is off, `scout_config_missing` means there was no config
+# to read it off, and every later reason (or no reason at all) means the toggle was on. Derived
+# rather than re-queried, so the reported value cannot disagree with the gate that produced it.
+_SCOUT_EMIT_ENABLED_BY_REASON: dict[str | None, bool | None] = {
+ "scout_emit_disabled": False,
+ "scout_config_missing": None,
+}
+
+
+def emit_eligibility(*, team: Team, run: SignalScoutRun | None) -> dict[str, Any]:
+ """Whether a scout's findings and reports can actually reach the inbox, as the profile reports it.
+
+ One value, one gate. `can_emit` is `blocking_reason is None`, and with a `run` in hand
+ `blocking_reason` comes straight from `_preflight_emit_gates`, the same call `emit_report` and
+ `edit_report` make at write time. The scout uses this reason to distinguish a dry-run
+ investigation from a team-wide block. A separate derivation could report that writes are
+ allowed when the write path refuses them.
+
+ `run=None` is the team-wide floor the shared cached profile stores. The profile row is per team
+ and every scout on the team reads the same one, so it cannot answer for a particular scout's
+ config: `scout_emit_enabled` is null there, and the endpoint re-derives the block for whichever
+ scout is reading (see `SignalProjectProfileViewSet`). The two team gates are still evaluated in
+ the preflight's order so the floor's `blocking_reason` names the same gate the write would.
+ """
+ ai_processing_approved = bool(team.organization.is_ai_data_processing_approved)
+ source_enabled = SignalSourceConfig.is_source_enabled(team.id, SOURCE_PRODUCT, SOURCE_TYPE)
+ if run is None:
+ blocking_reason = (
+ None
+ if ai_processing_approved and source_enabled
+ else ("ai_processing_not_approved" if not ai_processing_approved else "source_disabled")
+ )
+ scout_emit_enabled: bool | None = None
+ else:
+ blocking_reason = _preflight_emit_gates(team, run)
+ scout_emit_enabled = _SCOUT_EMIT_ENABLED_BY_REASON.get(blocking_reason, True)
+ return {
+ "ai_processing_approved": ai_processing_approved,
+ "source_enabled": source_enabled,
+ "scout_emit_enabled": scout_emit_enabled,
+ "can_emit": blocking_reason is None,
+ "blocking_reason": blocking_reason,
+ "remediation": remediation_for_skip(blocking_reason),
+ }
+
+
+def emit_eligibility_for_run(*, team_id: int, run_id: str | None) -> dict[str, Any] | None:
+ """`emit_eligibility` for the scout executing `run_id`, or None when no run of this team resolves.
+
+ None means there is no scout to answer for, which covers a person reading the profile and a run
+ id belonging to another project, and leaves the cached team-wide floor in place. It never
+ fabricates a block, because the write path still fails closed on its own.
+
+ The run carries its own canonical team, which is the team the gate must be evaluated against
+ (`_preflight_emit_gates` reads the org consent off it), so `select_related` it rather than
+ re-fetching a team the caller resolved separately.
+ """
+ if run_id is None:
+ return None
+ run = SignalScoutRun.all_teams.select_related("team__organization").filter(pk=run_id, team_id=team_id).first()
+ if run is None:
+ return None
+ return emit_eligibility(team=run.team, run=run)
diff --git a/products/signals/backend/scout_harness/tools/report.py b/products/signals/backend/scout_harness/tools/report.py
index e4f94d6632b9..894da33af7ef 100644
--- a/products/signals/backend/scout_harness/tools/report.py
+++ b/products/signals/backend/scout_harness/tools/report.py
@@ -2065,10 +2065,17 @@ def _do_edit_report(
def _assert_edit_gates(team: Team, run: SignalScoutRun, report_id: str, appended_evidence: int = 0) -> None:
"""The emit preflight gates, applied to an edit. Shared by the entrypoints (which must gate
before spending the safety-judge LLM call) and `_do_edit_report` (so a future caller that skips
- the entrypoints still fails closed)."""
+ the entrypoints still fails closed).
+
+ The refusal carries the same remediation `emit_report` returns alongside its `skipped_reason`.
+ An edit blocked by a gate is the identical situation, because the scout has done the work and
+ the write will not land, so a bare reason code here would leave it with no next step on one
+ channel and a fixable one on the other."""
preflight = _preflight_emit_gates(team, run)
if preflight is not None:
- raise InvalidScoutReportError(f"edit_report blocked by preflight gate: {preflight}")
+ remediation = remediation_for_skip(preflight)
+ detail = f"edit_report blocked by preflight gate: {preflight}"
+ raise InvalidScoutReportError(f"{detail}. {remediation}" if remediation else detail)
task_is_in_progress = (
SignalScoutRun.objects.for_team(team.id)
.filter(
diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.py
index ea9379978095..55cfd1d85636 100644
--- a/products/signals/backend/scout_harness/views.py
+++ b/products/signals/backend/scout_harness/views.py
@@ -162,7 +162,12 @@ from products.signals.backend.scout_harness.tools.checks import (
list_report_checks,
record_check_result,
)
-from products.signals.backend.scout_harness.tools.emit import EvidenceEntry, InvalidEmitError, emit_finding_sync
+from products.signals.backend.scout_harness.tools.emit import (
+ EvidenceEntry,
+ InvalidEmitError,
+ emit_eligibility_for_run,
+ emit_finding_sync,
+)
from products.signals.backend.scout_harness.tools.lighthouse import (
MAX_AUDITS_PER_RUN,
RUN_AUDIT_COUNT_KEY,
@@ -2063,6 +2068,40 @@ class SignalScoutNoteViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
return Response(status=status.HTTP_204_NO_CONTENT)
+def _eligibility_run_id(request: Request, *, team_id: int, supplied: uuid.UUID | None) -> str | None:
+ """The run whose scout-level write gate `emit_eligibility` must answer for, or None for no scout.
+
+ Provenance first. A scout sandbox's OAuth token is bound to the task that dispatched its run and
+ the sandbox cannot choose that binding, so it names the calling scout even when the agent passes
+ nothing, which is what makes the returned eligibility the calling scout's own rather than
+ whatever it remembered to ask about. A supplied `run_id` is only a hint, used when there is no
+ binding (a person inspecting one scout's posture), and it is verified against this team, so it
+ can neither reach another project's config nor let a sandbox read a different scout's gate.
+ """
+ bound = run_id_for_sandbox_task(task_id=_sandbox_bound_task_id(request), team_id=team_id)
+ if bound is not None:
+ return bound
+ return str(supplied) if supplied is not None else None
+
+
+def _overlay_effective_emit_eligibility(body: dict[str, Any], *, team_id: int, run_id: str | None) -> None:
+ """Replace the stored team-wide `emit_eligibility` with the calling scout's effective one.
+
+ Updates both response sections, and no-ops when no scout run resolves or the payload predates the
+ section. The profile row is shared per team, so what it stores can only be the team-wide floor;
+ the scout reading it also has its own config's dry-run toggle to clear. Re-deriving here rather
+ than at build time keeps that answer live too, because the row is cached for up to
+ `PROFILE_TTL` while the gate is re-read from the config on every write.
+ """
+ effective = emit_eligibility_for_run(team_id=team_id, run_id=run_id)
+ if effective is None:
+ return
+ inventory = body["payload"].get("inventory")
+ if isinstance(inventory, dict) and "emit_eligibility" in inventory:
+ inventory["emit_eligibility"] = effective
+ body["summary"]["emit_eligibility"] = effective
+
+
class SignalProjectProfileViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
"""Project profile — deterministic snapshot of \"what's true about this project\".
@@ -2154,14 +2193,20 @@ class SignalProjectProfileViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSe
# scout's sandbox token carries `signal_scout_internal:write`, and the Phase-7 Temporal
# workflow builds out-of-band, so the build path stays covered.
force_refresh = bool(validated.get("force_refresh", False)) and caller_is_internal_scout
+ team_id = _canonical_team_id(self)
profile = get_project_profile(
- team_id=_canonical_team_id(self),
+ team_id=team_id,
force_refresh=force_refresh,
lazy_build=caller_is_internal_scout,
)
if profile is None:
raise exceptions.NotFound("No project profile has been built for this team yet.")
body = profile.as_dict()
+ _overlay_effective_emit_eligibility(
+ body,
+ team_id=team_id,
+ run_id=_eligibility_run_id(request, team_id=team_id, supplied=validated.get("run_id")),
+ )
if validated.get("summary_only", False):
# `payload` is `required=False` on the serializer, so dropping the key here omits it
# from the response rather than rendering it null.
diff --git a/products/signals/backend/test/test_scout_harness.py b/products/signals/backend/test/test_scout_harness.py
index 6842dd3223f6..75e773af04e9 100644
--- a/products/signals/backend/test/test_scout_harness.py
+++ b/products/signals/backend/test/test_scout_harness.py
@@ -860,6 +860,9 @@ class TestPromptBuilder(BaseTest):
# scout would otherwise pay on a fresh team.
assert "Then: orient on this project" in prompt
assert "scout-project-profile-get" in prompt
+ assert "summary.emit_eligibility.can_emit" in prompt
+ assert "For `scout_emit_disabled`, continue the investigation without emitting findings or reports." in prompt
+ assert "Do not close out early because of this dry-run setting." in prompt
# The base prompt teaches the agent to call the harness MCP tools by name.
assert "scout-emit-signal" in prompt
assert "scout-scratchpad-search" in prompt
diff --git a/products/signals/backend/test/test_scout_harness_api.py b/products/signals/backend/test/test_scout_harness_api.py
index 5a94dce90ddb..b4ae4516f354 100644
--- a/products/signals/backend/test/test_scout_harness_api.py
+++ b/products/signals/backend/test/test_scout_harness_api.py
@@ -2276,6 +2276,43 @@ class TestAgentHarnessProjectProfileAPI(APIBaseTest):
# No second row written.
assert SignalProjectProfile.objects.filter(team=self.team).count() == 1
+ @parameterized.expand([(False,), (True,)])
+ def test_scout_read_reports_its_own_dry_run_block_though_the_team_can_emit(self, summary_only: bool) -> None:
+ run = _make_run(self.team)
+ assert run.scout_config is not None
+ SignalScoutConfig.objects.filter(pk=run.scout_config.pk).update(emit=False)
+ self._seed_profile()
+ # The sandbox token is bound to the task that dispatched the run, which is how the endpoint
+ # knows which scout is asking — the scout passes nothing.
+ _authenticate_as_scout(self, sandbox_task_id=run.task_run.task_id)
+
+ response = self.client.get(self._list_url(), {"summary_only": str(summary_only).lower()})
+ assert response.status_code == status.HTTP_200_OK
+ body = response.json()
+ eligibility = body["summary"]["emit_eligibility"]
+ if summary_only:
+ assert "payload" not in body
+ else:
+ assert body["payload"]["inventory"]["emit_eligibility"] == eligibility
+
+ assert eligibility["can_emit"] is False
+ assert eligibility["scout_emit_enabled"] is False
+ assert eligibility["blocking_reason"] == "scout_emit_disabled"
+ assert eligibility["remediation"]
+ # The team-wide gates are untouched, so the block really is this scout's own posture.
+ assert eligibility["ai_processing_approved"] is True
+ assert eligibility["source_enabled"] is True
+ stored = SignalProjectProfile.objects.get(team=self.team).payload["inventory"]["emit_eligibility"]
+ assert stored["can_emit"] is True
+ assert stored["scout_emit_enabled"] is None
+
+ def test_read_outside_a_run_keeps_the_team_wide_eligibility(self) -> None:
+ # No scout to answer for, so there is no per-scout toggle to report and the stored floor stands.
+ self._seed_profile()
+ eligibility = self.client.get(self._list_url()).json()["payload"]["inventory"]["emit_eligibility"]
+ assert eligibility["scout_emit_enabled"] is None
+ assert eligibility["can_emit"] is True
+
def test_scout_read_inventory_payload_carries_expected_keys(self) -> None:
_authenticate_as_scout(self)
response = self.client.get(self._list_url())
@@ -2338,7 +2375,9 @@ class TestAgentHarnessProjectProfileAPI(APIBaseTest):
assert set(body["summary"]["emit_eligibility"]) == {
"ai_processing_approved",
"source_enabled",
+ "scout_emit_enabled",
"can_emit",
+ "blocking_reason",
"remediation",
}
assert set(body["summary"]["existing_inbox_reports"]) == {"total", "by_status"}
diff --git a/products/signals/backend/test/test_scout_harness_profile.py b/products/signals/backend/test/test_scout_harness_profile.py
index ff70eca0d509..83c445c572d2 100644
--- a/products/signals/backend/test/test_scout_harness_profile.py
+++ b/products/signals/backend/test/test_scout_harness_profile.py
@@ -74,6 +74,7 @@ from products.signals.backend.scout_harness.profile.builders import (
_top_events,
)
from products.signals.backend.scout_harness.profile.schema import ScoutFleetEntry
+from products.signals.backend.scout_harness.tools.emit import emit_eligibility, emit_eligibility_for_run
from products.signals.backend.scout_harness.tools.profile import (
PROFILE_TTL,
compute_project_profile,
@@ -238,13 +239,80 @@ class TestSignalSourceConfigs(BaseTest):
class TestEmitEligibility(BaseTest):
+ def _scout_run(self, *, emit: bool) -> SignalScoutRun:
+ Task, TaskRun = apps.get_model("tasks", "Task"), apps.get_model("tasks", "TaskRun")
+ task = Task.objects.create(team=self.team, title="scout", description="d")
+ task_run = TaskRun.objects.create(team=self.team, task=task)
+ config = SignalScoutConfig.objects.create(team=self.team, skill_name="signals-scout-general", emit=emit)
+ return SignalScoutRun.objects.create(
+ team=self.team,
+ task_run=task_run,
+ scout_config=config,
+ skill_name="signals-scout-general",
+ skill_version=1,
+ )
+
def test_can_emit_when_ai_approved_and_source_on(self) -> None:
# Default org has AI processing approved; scout source is fail-open (no disabled row).
result = _emit_eligibility(self.team)
assert result["ai_processing_approved"] is True
assert result["source_enabled"] is True
assert result["can_emit"] is True
+ assert result["blocking_reason"] is None
assert result["remediation"] is None
+ # What a profile row stores can't answer for one scout's config — the endpoint re-derives it.
+ assert result["scout_emit_enabled"] is None
+
+ def test_dry_run_scout_cannot_emit_though_the_team_gates_pass(self) -> None:
+ # The relapse this guards: the team gates pass, so the stored profile said `can_emit=true`,
+ # and the scout only learned at write time that its own config discards everything. Asking
+ # with the run in hand has to return the gate the write will actually apply.
+ run = self._scout_run(emit=False)
+ baseline = _emit_eligibility(self.team)
+ assert baseline["can_emit"] is True
+
+ result = emit_eligibility(team=self.team, run=run)
+ assert result["scout_emit_enabled"] is False
+ assert result["can_emit"] is False
+ assert result["blocking_reason"] == "scout_emit_disabled"
+ assert result["remediation"] and "emit" in result["remediation"]
+
+ def test_emitting_scout_reads_the_team_baseline(self) -> None:
+ result = emit_eligibility(team=self.team, run=self._scout_run(emit=True))
+ assert result["scout_emit_enabled"] is True
+ assert result["can_emit"] is True
+ assert result["blocking_reason"] is None
+
+ def test_team_gate_still_blocks_an_emitting_scout(self) -> None:
+ # Gate order matters: the per-scout toggle is checked first, so an emitting scout on a team
+ # without AI consent must still report the team gate rather than a clean pass.
+ run = self._scout_run(emit=True)
+ self.team.organization.is_ai_data_processing_approved = False
+ self.team.organization.save()
+
+ result = emit_eligibility(team=self.team, run=run)
+ assert result["scout_emit_enabled"] is True
+ assert result["can_emit"] is False
+ assert result["blocking_reason"] == "ai_processing_not_approved"
+
+ def test_run_whose_config_is_gone_fails_closed(self) -> None:
+ run = self._scout_run(emit=True)
+ assert run.scout_config is not None
+ run.scout_config.delete()
+
+ result = emit_eligibility(team=self.team, run=run)
+ # Unknown rather than False: there is no config left to read the toggle off.
+ assert result["scout_emit_enabled"] is None
+ assert result["can_emit"] is False
+ assert result["blocking_reason"] == "scout_config_missing"
+
+ def test_eligibility_for_run_ignores_another_teams_run(self) -> None:
+ other = Team.objects.create(organization=self.organization, name="Other")
+ run = self._scout_run(emit=False)
+
+ assert emit_eligibility_for_run(team_id=other.id, run_id=str(run.id)) is None
+ # Resolvable on its own team, so the None above is the team check and not a broken lookup.
+ assert emit_eligibility_for_run(team_id=self.team.id, run_id=str(run.id)) is not None
def test_blocked_with_remediation_when_ai_not_approved(self) -> None:
# Mutate through team.organization — the exact instance the builder reads — so the change is
diff --git a/products/signals/backend/test/test_scout_report_api.py b/products/signals/backend/test/test_scout_report_api.py
index f85907bde39a..9fc43228b0f8 100644
--- a/products/signals/backend/test/test_scout_report_api.py
+++ b/products/signals/backend/test/test_scout_report_api.py
@@ -31,6 +31,7 @@ from products.signals.backend.models import (
)
from products.signals.backend.report_generation.resolve_reviewers import ReviewerIdentitySet
from products.signals.backend.scout_harness.serializers import EditReportRequestSerializer
+from products.signals.backend.scout_harness.tools.emit import remediation_for_skip
from products.signals.backend.scout_harness.tools.report import (
MAX_EVIDENCE_DESCRIPTION_LENGTH,
MAX_REPORT_SIGNALS,
@@ -2293,6 +2294,26 @@ class TestScoutReportAPI(APIBaseTest):
c.kwargs.get("event_name") == "$scout_report_emitted" for c in self.capture_internal_mock.call_args_list
)
+ def test_edit_report_gate_refusal_carries_the_emit_remediation(self) -> None:
+ # Both channels hit the same gate, so a scout blocked on an edit needs the same next step an
+ # emit hands back. A bare reason code leaves it unable to tell a fixable block from a
+ # terminal one, and it has already spent the run by the time it reads this.
+ run = _make_run(self.team)
+ config = run.scout_config
+ assert config is not None
+ config.emit = False
+ config.save(update_fields=["emit"])
+ with _safe_judge(), patch(EMBED_PATH), patch(AUTOSTART_PATH, new=AsyncMock()):
+ response = self.client.post(
+ self._edit_url(str(run.id)),
+ data={"report_id": str(uuid4()), "append_note": "fresh evidence"},
+ format="json",
+ )
+ assert response.status_code == status.HTTP_400_BAD_REQUEST
+ detail = response.json()["detail"]
+ assert "scout_emit_disabled" in detail
+ assert remediation_for_skip("scout_emit_disabled") in detail
+
@parameterized.expand(
[
("invalid_priority", {"priority": "P9", "priority_explanation": "x"}),
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index 6c91f83f5b09..547b7086383f 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -3393,17 +3393,27 @@ export interface ScoutNoteCreateRequestApi {
}
/**
- * `inventory.emit_eligibility` — whether scout findings can reach the inbox for this team.
+ * `inventory.emit_eligibility` — whether the calling scout's findings and reports can reach the inbox.
*/
export interface EmitEligibilityApi {
/** Whether the organization has approved AI data processing (an org-level gate on all scout emits). */
ai_processing_approved: boolean
/** Whether the `signals_scout` signal source is enabled for this team. */
source_enabled: boolean
- /** True only when both team/org-level gates pass, so scout findings (signal and report channels alike) actually reach the inbox. When False, every emit is silently dropped — quick-close instead of doing throwaway investigation. Does not account for a scout's own dry-run `emit` toggle, which is per-config, not team-wide. */
+ /**
+ * Whether the calling scout's own config can write, as opposed to running in dry-run (`emit=false`), where it investigates but everything it writes is discarded. Null when the read is not from a scout run, so no single scout's config applies.
+ * @nullable
+ */
+ scout_emit_enabled: boolean | null
+ /** True only when every gate passes, so this scout's findings and reports (both channels) actually reach the inbox. When False, every write is dropped or refused — quick-close instead of doing throwaway investigation. Read this one value: it accounts for the calling scout's own dry-run posture as well as the team-wide gates, and it is the same gate `emit-report` and `edit-report` apply at write time. */
can_emit: boolean
/**
- * One-line next step to unblock emits when `can_emit` is False; null when emits can flow.
+ * Which gate blocks the write: `scout_emit_disabled`, `scout_config_missing`, `ai_processing_not_approved`, or `source_disabled`. Null when `can_emit` is True. Matches the `skipped_reason` `emit-report` returns for the same block.
+ * @nullable
+ */
+ blocking_reason: string | null
+ /**
+ * One-line next step to unblock writes when `can_emit` is False; null when writes can flow.
* @nullable
*/
remediation: string | null
@@ -5931,6 +5941,11 @@ export type SignalsScoutProjectProfileGetParams = {
* When true, skip the cache and rebuild the profile from authoritative sources before responding. Use after seeding events, importing data, or any other change the caller knows just landed but hasn't surfaced through natural cache expiry yet. Honored only for the internal scout token — public read callers get the cached profile regardless. Concurrent forced rebuilds are serialized by the team-keyed advisory lock — at most one extra `build_inventory` per simultaneous request.
*/
force_refresh?: boolean
+ /**
+ * The run whose scout's write posture `emit_eligibility` should answer for. A scout sandbox never needs this: its token is bound to the task that dispatched the run, and that binding is what the endpoint reads, so it wins over any value passed here. Pass it to inspect one scout's effective eligibility from outside a run — a run id from another project is ignored.
+ * @nullable
+ */
+ run_id?: string | null
/**
* When true, respond with the cache metadata and the `summary` envelope only, and omit `payload` entirely. Use it when you need the emit gate and the inbox counts but not the full inventory. The full profile runs to tens of kilobytes, which a client can truncate. Costs nothing extra: the profile is read or built the same way either way.
*/
diff --git a/products/signals/skills/working-with-scouts/SKILL.md b/products/signals/skills/working-with-scouts/SKILL.md
index f469fd26f622..76da394c23a0 100644
--- a/products/signals/skills/working-with-scouts/SKILL.md
+++ b/products/signals/skills/working-with-scouts/SKILL.md
@@ -43,7 +43,7 @@ One access rule covers everything here: scout rows live on the project's **canon
- **Enrolled, empty roster** — likely newly enrolled and awaiting the first coordinator tick (configs auto-register then); say so instead of re-sending the user through onboarding.
- **Enrolled, rows exist** — note each scout's `enabled`, `emit` (`false` = dry-run: it runs but writes nothing), and `status` / `pause_reason`.
A paused or dry-run scout explains most "scouts aren't doing anything" complaints before any deeper digging.
- Also check `summary.emit_eligibility` on `posthog:scout-project-profile-get` (pass `summary_only=true` when the gate is all you need): when `can_emit` is false (the org hasn't approved AI processing, or the `signals_scout` source is disabled), every scout write is silently dropped even on an enabled `emit: true` scout — surface its `remediation` line before promising coverage.
+ Also check `summary.emit_eligibility` on `posthog:scout-project-profile-get` (pass `summary_only=true` when you only need the gate). When `can_emit` is false, scout writes cannot reach the inbox. Show its `remediation` before promising coverage. `blocking_reason` identifies the gate: `ai_processing_not_approved` or `source_disabled` applies to every scout on the team. `scout_emit_disabled` applies to one scout's dry-run setting. That scout continues its investigation without emitting findings or reports. Outside a run, the tool returns the team-wide answer; pass `run_id` to check one scout's write eligibility.
(For read callers the profile is a cached snapshot built by scout runs, so a 404 means no fresh profile exists — not ineligibility; fall back to checking the `signals_scout` source config via `posthog:inbox-source-configs-list` and treat eligibility as unknown rather than blocking on the profile.)
The `description` on each row says what that scout watches — scan it to answer "which scout covers X?" without loading any skill bodies.
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 9fcf32580fe7..eefaa08cbeb7 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -33001,17 +33001,27 @@ export namespace Schemas {
} as const;
/**
- * `inventory.emit_eligibility` — whether scout findings can reach the inbox for this team.
+ * `inventory.emit_eligibility` — whether the calling scout's findings and reports can reach the inbox.
*/
export interface EmitEligibility {
/** Whether the organization has approved AI data processing (an org-level gate on all scout emits). */
ai_processing_approved: boolean;
/** Whether the `signals_scout` signal source is enabled for this team. */
source_enabled: boolean;
- /** True only when both team/org-level gates pass, so scout findings (signal and report channels alike) actually reach the inbox. When False, every emit is silently dropped — quick-close instead of doing throwaway investigation. Does not account for a scout's own dry-run `emit` toggle, which is per-config, not team-wide. */
+ /**
+ * Whether the calling scout's own config can write, as opposed to running in dry-run (`emit=false`), where it investigates but everything it writes is discarded. Null when the read is not from a scout run, so no single scout's config applies.
+ * @nullable
+ */
+ scout_emit_enabled: boolean | null;
+ /** True only when every gate passes, so this scout's findings and reports (both channels) actually reach the inbox. When False, every write is dropped or refused — quick-close instead of doing throwaway investigation. Read this one value: it accounts for the calling scout's own dry-run posture as well as the team-wide gates, and it is the same gate `emit-report` and `edit-report` apply at write time. */
can_emit: boolean;
/**
- * One-line next step to unblock emits when `can_emit` is False; null when emits can flow.
+ * Which gate blocks the write: `scout_emit_disabled`, `scout_config_missing`, `ai_processing_not_approved`, or `source_disabled`. Null when `can_emit` is True. Matches the `skipped_reason` `emit-report` returns for the same block.
+ * @nullable
+ */
+ blocking_reason: string | null;
+ /**
+ * One-line next step to unblock writes when `can_emit` is False; null when writes can flow.
* @nullable
*/
remediation: string | null;
@@ -108158,6 +108168,11 @@ export namespace Schemas {
* When true, skip the cache and rebuild the profile from authoritative sources before responding. Use after seeding events, importing data, or any other change the caller knows just landed but hasn't surfaced through natural cache expiry yet. Honored only for the internal scout token — public read callers get the cached profile regardless. Concurrent forced rebuilds are serialized by the team-keyed advisory lock — at most one extra `build_inventory` per simultaneous request.
*/
force_refresh?: boolean;
+ /**
+ * The run whose scout's write posture `emit_eligibility` should answer for. A scout sandbox never needs this: its token is bound to the task that dispatched the run, and that binding is what the endpoint reads, so it wins over any value passed here. Pass it to inspect one scout's effective eligibility from outside a run — a run id from another project is ignored.
+ * @nullable
+ */
+ run_id?: string | null;
/**
* When true, respond with the cache metadata and the `summary` envelope only, and omit `payload` entirely. Use it when you need the emit gate and the inbox counts but not the full inventory. The full profile runs to tens of kilobytes, which a client can truncate. Costs nothing extra: the profile is read or built the same way either way.
*/
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 36d4481eec1b..f3420f87b170 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -1488,6 +1488,12 @@ export const SignalsScoutProjectProfileGetQueryParams = () => zod.object({
.describe(
"When true, skip the cache and rebuild the profile from authoritative sources before responding. Use after seeding events, importing data, or any other change the caller knows just landed but hasn't surfaced through natural cache expiry yet. Honored only for the internal scout token — public read callers get the cached profile regardless. Concurrent forced rebuilds are serialized by the team-keyed advisory lock — at most one extra `build_inventory` per simultaneous request."
),
+ run_id: zod
+ .string()
+ .nullish()
+ .describe(
+ "The run whose scout's write posture `emit_eligibility` should answer for. A scout sandbox never needs this: its token is bound to the task that dispatched the run, and that binding is what the endpoint reads, so it wins over any value passed here. Pass it to inspect one scout's effective eligibility from outside a run — a run id from another project is ignored."
+ ),
summary_only: zod
.boolean()
.default(signalsScoutProjectProfileGetQuerySummaryOnlyDefault)
diff --git a/services/mcp/src/tools/generated/signals.ts b/services/mcp/src/tools/generated/signals.ts
index 3c0a4e7f88ea..1cc54645595e 100644
--- a/services/mcp/src/tools/generated/signals.ts
+++ b/services/mcp/src/tools/generated/signals.ts
@@ -1248,6 +1248,7 @@ const scoutProjectProfileGet = (): ToolBase<
path: `/api/projects/${encodeURIComponent(String(projectId))}/signals/scout/project_profile/current/`,
query: {
force_refresh: params.force_refresh,
+ run_id: params.run_id,
summary_only: params.summary_only,
},
})
@@ -2044,6 +2045,7 @@ const signalsScoutProjectProfileGet = (): ToolBase<
path: `/api/projects/${encodeURIComponent(String(projectId))}/signals/scout/project_profile/current/`,
query: {
force_refresh: params.force_refresh,
+ run_id: params.run_id,
summary_only: params.summary_only,
},
})
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-project-profile-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-project-profile-get.json
index 35e58d5fd394..ca424491de24 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-project-profile-get.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-project-profile-get.json
@@ -6,6 +6,17 @@
"description": "When true, skip the cache and rebuild the profile from authoritative sources before responding. Use after seeding events, importing data, or any other change the caller knows just landed but hasn't surfaced through natural cache expiry yet. Honored only for the internal scout token — public read callers get the cached profile regardless. Concurrent forced rebuilds are serialized by the team-keyed advisory lock — at most one extra `build_inventory` per simultaneous request.",
"type": "boolean"
},
+ "run_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The run whose scout's write posture `emit_eligibility` should answer for. A scout sandbox never needs this: its token is bound to the task that dispatched the run, and that binding is what the endpoint reads, so it wins over any value passed here. Pass it to inspect one scout's effective eligibility from outside a run — a run id from another project is ignored."
+ },
"summary_only": {
"default": false,
"description": "When true, respond with the cache metadata and the `summary` envelope only, and omit `payload` entirely. Use it when you need the emit gate and the inbox counts but not the full inventory. The full profile runs to tens of kilobytes, which a client can truncate. Costs nothing extra: the profile is read or built the same way either way.",
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-project-profile-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-project-profile-get.json
index 35e58d5fd394..ca424491de24 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-project-profile-get.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-project-profile-get.json
@@ -6,6 +6,17 @@
"description": "When true, skip the cache and rebuild the profile from authoritative sources before responding. Use after seeding events, importing data, or any other change the caller knows just landed but hasn't surfaced through natural cache expiry yet. Honored only for the internal scout token — public read callers get the cached profile regardless. Concurrent forced rebuilds are serialized by the team-keyed advisory lock — at most one extra `build_inventory` per simultaneous request.",
"type": "boolean"
},
+ "run_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The run whose scout's write posture `emit_eligibility` should answer for. A scout sandbox never needs this: its token is bound to the task that dispatched the run, and that binding is what the endpoint reads, so it wins over any value passed here. Pass it to inspect one scout's effective eligibility from outside a run — a run id from another project is ignored."
+ },
"summary_only": {
"default": false,
"description": "When true, respond with the cache metadata and the `summary` envelope only, and omit `payload` entirely. Use it when you need the emit gate and the inbox counts but not the full inventory. The full profile runs to tens of kilobytes, which a client can truncate. Costs nothing extra: the profile is read or built the same way either way.",