Commit 0a630d7
committed
fix(spec): ToolExecutionContext fails closed on missing actor — system is an explicit isSystem opt-in (#2991)
The AI tool-execution contract documented system-level (RLS-bypassing)
execution as the default for a missing actor / toolExecutionContext — a
contract-level fall-open across all built-in data tools (ADR-0096 E4,
D1 invariant: no identity is never a grant of authority).
- ChatWithToolsOptions.toolExecutionContext: omission now means an
unauthenticated (RLS-on, sees-nothing) principal; executors MUST NOT
fall back to system-level behaviour.
- ToolExecutionContext: documents the fail-closed identity derivation
(actor → user context; isSystem → system; neither → anonymous) and
adds an explicit isSystem?: boolean opt-in mirroring the IDataEngine /
IKnowledgeService convention, so 'run as system' is a deliberate,
greppable choice — not the consequence of a forgotten field.
- content/docs/ai/actions-as-tools.mdx: docs no longer advertise
omission as the way to keep system-level behaviour for cron/internal
callers; they now point at the explicit isSystem opt-in.
Mirror of the #2981 knowledge/RAG fail-closed fix, applied at the
contract layer. Cloud-side executor work is tracked cross-repo.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019rao3tuTpJ8HPQV5fyxBoz1 parent ca30acd commit 0a630d7
3 files changed
Lines changed: 52 additions & 7 deletions
File tree
- .changeset
- content/docs/ai
- packages/spec/src/contracts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
377 | 383 | | |
378 | 384 | | |
379 | 385 | | |
| |||
383 | 389 | | |
384 | 390 | | |
385 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
386 | 404 | | |
387 | 405 | | |
388 | 406 | | |
389 | 407 | | |
390 | 408 | | |
391 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
392 | 416 | | |
393 | 417 | | |
394 | 418 | | |
395 | 419 | | |
396 | 420 | | |
397 | 421 | | |
398 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
399 | 435 | | |
400 | 436 | | |
401 | 437 | | |
| |||
0 commit comments