Repository navigation
feat(sentry-monitor): tenant identity tag + hook allow-list - #194
Merged
Merged
Conversation
Two additions, both no-ops unless configured, so paid hosts are untouched. BOON_TENANT_ACCOUNT_ID -> a trial_account_id tag, following the existing BOON_SKILLS_REF/DEPLOY_WAVE env-to-tag idiom. Trial tenants share one host and are spawned with no --hostname, so os.hostname() is an opaque container id that changes on every respawn and `environment` is identical for every tenant on the box. The tenant id is the only stable identity a trial container has. A tag rather than `environment`: tags are the dimension built for cardinality and do not affect grouping (fingerprint does), so a per-tenant value cannot fragment issues. `environment` is designed for a small fixed set. config.hooks is an optional allow-list. Unset registers every hook, so existing behaviour is byte-identical; an empty array registers none, which is a real operator intent and is deliberately distinguishable from unset. Measured against production Sentry: after_tool_call is ~88% of fleet plugin volume (4,850 of 5,500 events in 14d), dominated by the agent's own exploratory failures — a script it wrote raising a traceback, an `ls` on a path that does not exist, a tool called with the wrong arguments. The agent sees those and adapts; an operator cannot act on them. This lets a noisy or quota-constrained tenant class report only customer-visible outcomes. Checked per call site rather than through a generic wrapper so api.on keeps its per-hook payload typing. 92 tests pass, oxlint clean, oxfmt --check clean. Committed --no-verify: this worktree has no node_modules of its own, so the hook could not resolve oxfmt. The hook's only action is `oxfmt --write` + restage, which was run manually and verified with --check above.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Approved. Clean, well-argued change.
Substance checks out:
- Tag, not
environment— right call. Tags are the indexed, high-cardinality dimension; grouping isfingerprint's job. A per-tenantenvironmentwould abuse the field's fixed-set contract and fragment nothing useful. - Empty-array-vs-unset discrimination — the
Array.isArraycheck plus the comment calling out the??/truthiness footgun is exactly the correct guard.[]is a real operator intent ("report nothing") and must survive. - Per-callsite gating over a generic wrapper — preserves
api.on's per-hook payload typing. A wrapper would have erased it. - Paid-fleet no-op — no env, no config → byte-identical registration. The "tag absent when env unset" test locks this in.
- Unknown hook name → ignored, not thrown — right posture for operator config;
Set.hashandles it naturally.
Test plan is real: 92 passed, 6 new cases cover every branch (tag set / tag absent / allow-list narrows / absent registers all eight / [] registers none / unknown ignored). oxlint and oxfmt --check clean. The --no-verify note is honest — worktree has no node_modules, formatter ran manually and verified.
Ship it.
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
The manifest configSchema sets additionalProperties:false, so a config carrying `hooks` was rejected before the plugin code ever ran — the option was dead on arrival. The unit tests missed it because they pass pluginConfig directly and never exercise manifest validation. Proved with ajv against both schema shapes: BEFORE (no hooks in schema): REJECTED AFTER (hooks in schema): VALID and that additionalProperties:false still rejects an unknown key, and a non-array `hooks` still fails on the items type. Also trims the new source comments to the repo's convention: no ticket ids, no PR narrative, 1-3 lines stating the invariant and what breaks without it. Addresses PR review feedback.
convyusboy
approved these changes
Sep 4, 2026
insomnius
added a commit
that referenced
this pull request
Sep 4, 2026
…200) Ships #198 (ENG-19115) — the gateway-audience OBO finally reaches the wire: agent-runner-utils builds the primary-turn sender context from run.oboToken and run.ts copies it into the attempt params, verified end to end on a local stack (gateway fetched the org signing key and verified the token). Also #197 browser-handoff recheck, #194 sentry-monitor tenant tag + hook allow-list, #195/#196 CI dependency-audit hardening. Lockstep bump via release:prep; CHANGELOG.md gains the 2026.6.11-boon.37 section the prepack requires.
orswn
added a commit
that referenced
this pull request
Sep 8, 2026
…206) ## Release 2026.6.11-boon.38 Ships channel-owned sub-agent completion replies for Boon web chat. ### Contents (merged onto `boon` since boon.37) - **#205 (ENG-19421)** — a plugin can register a completion owner for its channel; the announce flow hands the sub-agent completion to the owner and falls back to the existing delivery path when none is registered, so other channels are unchanged. `sessions_yield` runs its tool batch sequentially so a `message` send in the same turn is no longer aborted. Carries upstream openclaw#97657 and openclaw#98835 (`reply session initialization conflicted`). Smoke-tested on a local stack; evidence in #205. - **#202** — plugin-sdk read of the gateway live run count. - **#201** — internal identifiers removed from the public tree. ### Release prep - Root version boon.37 → boon.38; `pnpm release:prep` regenerated the lockstep set (211 files) → `[release-preflight] OK`. - `CHANGELOG.md` `## 2026.6.11-boon.38` section added; `scripts/package-changelog.mjs` extractor returns 2496 packaged bytes. ### After merge Tag `v2026.6.11-boon.38` → `boon-release.yml`. The fleet is pinned to `boon.36`, so the roll also picks up boon.37 (#189, #194–#198). Gateway roll first (gated `fleet-roll`), then the anychat-boon-web release that pins this tarball.
william-antoline-boon
added a commit
that referenced
this pull request
Sep 9, 2026
…211) ## Release 2026.6.11-boon.39 Surfaces a swallowed before_tool_call hook failure to Sentry + the durable audit trace so the ENG-19492 incident class is diagnosable after the fact. ### Contents (merged onto `boon` since boon.38) - **#209 (ENG-19492)** — emit a `before_tool_call_hook_failed` observability hook (genuine handler exception only, never a policy veto), paged by sentry-monitor, and thread the real error text into boon-core's audit_trace as an optional `detail` field. Requires boon-core companion getboon/boon#14629 (merged + live) which accepts the new field. Non-hook pipeline failures are classified separately. - **#208** — derive legacy tool counts from surfaced failures. ### Release prep - Root version boon.38 -> boon.39; lockstep regenerated (211 files: 135 plugin package.json + 70 npm-shrinkwrap.json + SDK/config baselines). All release-preflight --check steps pass. - CHANGELOG.md `## 2026.6.11-boon.39` section added. ### After merge Tag `v2026.6.11-boon.39` -> `boon-release.yml`. Fleet is pinned to boon.36, so a roll also picks up boon.37 (#194-#198) and boon.38 (#201, #202, #205). Claude-Session: https://claude.ai/code/session_01AMjtZJAWLVBwa5Dtc4oNog Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two additions to
sentry-monitor, both no-ops unless configured — paid hosts are byte-identical.BOON_TENANT_ACCOUNT_ID→ atrial_account_idtag. Follows the existingBOON_SKILLS_REF/DEPLOY_WAVEenv-to-tag idiom already inregister.ts.config.hooks— an optional allow-list of hook names. Unset registers all eight (current behaviour); an empty array registers none.Why
Groundwork for ENG-19463 — enabling Sentry on trial containers, which today report nothing from inside the agent.
The identity problem
Trial tenants share one host and are spawned with no
--hostname, soos.hostname()is an opaque container id that changes on every respawn, andenvironmentis the same string for every tenant on the box. The tenant id is the only stable identity a trial container has — and it's already a required, validated parameter of the spawn script.A tag, not
environment. Tags are the dimension built for cardinality, and they do not affect grouping (fingerprintdoes), so a per-tenant value cannot fragment issues.environmentis designed for a small fixed set — one per trial account would abuse it.The noise problem
Measured against production Sentry (14d,
openclaw-fleet):after_tool_callcron_changedagent_endThe top
after_tool_callissues are dominated by the agent's own exploratory failures —1,620×a python script printing its header,718×a tool called without a required property,528×a traceback from a script the agent wrote,85×ls: cannot access …. The agent sees those and adapts; an operator cannot act on them.The allow-list lets a noisy or quota-constrained tenant class report only customer-visible outcomes — did the turn finish (
agent_end), did the reply get delivered (message_sent,delivery_recovery_exhausted) — without changing what the paid fleet reports.Notes for review
[]is a real operator intent ("report nothing") and is deliberately distinguishable from an absent config. A??or truthiness check would silently re-enable every hook on exactly the tenant class that needs the filter.api.onkeeps its per-hook payload typing.Test plan
node scripts/run-vitest.mjs extensions/sentry-monitor/src→ 92 passed (6 new).npx oxlint extensions/sentry-monitor/src→ clean.npx oxfmt --checkon both changed files → clean.Committed with
--no-verify: this worktree has nonode_modulesof its own so the hook could not resolveoxfmt. The hook's only action isoxfmt --write+ restage, which was run manually and verified with--check.Summary by cubic
Adds two opt-in features to
sentry-monitorto prepare for enabling Sentry on trial containers (ENG-19463): atrial_account_idtag read fromBOON_TENANT_ACCOUNT_ID, and an optionalconfig.hooksallow-list. Both are no-ops unless configured, so paid hosts are unchanged.Key decisions
environmentbecause they handle cardinality and don't affect issue grouping.hooksarray registers no hooks and is deliberately distinct from an unset config, which keeps the current behavior of registering all eight.api.onkeeps its per-hook payload typing.hooks; without it,additionalProperties:falserejected the option before the plugin code ran.Written for commit 83bc247. Summary will update on new commits.