Skip to content

docs: document Python Guard degraded capture outcomes - #901

Open
davidmytton wants to merge 6 commits into
mainfrom
david/cursor/python-guard-degraded-capture-ff40
Open

docs: document Python Guard degraded capture outcomes#901
davidmytton wants to merge 6 commits into
mainfrom
david/cursor/python-guard-degraded-capture-ff40

Conversation

@davidmytton

@davidmytton davidmytton commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Documents the capture/Sequence outcome added in arcjet-py#225 (c86deb2409deae34c36f5c83214f648819af42f0).

What changed

Python checkpoint helpers record metadata.outcome = "degraded" when an action ran only because on_guard_error="allow" and policy did not judge it fully.

This is capture/Sequence metadata only:

  • conclusion is still ALLOW or DENY
  • The decision has no new field
  • on_guard_error is still "allow" or "deny"
  • Default on_guard_error="deny" still blocks those same conditions and still records unavailable

The existing Capture events page now teaches the five Python outcome values (success, degraded, error, denied, unavailable) and the decision_id discriminator on a degraded event. Short pointers were added on the Python Guard, LangChain, CrewAI, testing, and troubleshooting pages.

Accuracy notes

  • LangChain Python guard_tool / ArcjetMiddleware (and guard_action) go through the checkpoint engine, so they get this.
  • CrewAI guard_tool also goes through the checkpoint engine.
  • CrewAI register_arcjet_hooks records success when the action proceeds and does not record degraded.
  • JavaScript wrappers still record four outcomes (success, denied, error, unavailable) and do not record degraded, verified against arcjet-guard/src/agents/guarded.ts.
  • Go Capture does not write metadata.outcome.
  • No new customer flag. No actor / inputs / remote-policy teaching added.

Merge

Rebased onto current main by merging #900, #902, and #903. Framework-integrations screenshot conflicts were resolved and regenerated. CrewAI hooks are explicitly documented as not recording degraded.

Open in Web Open in Cursor 

Python checkpoint helpers now record metadata.outcome=degraded when an
action ran only because on_guard_error=allow and policy did not judge
it fully. Teach the five outcome values on the existing capture page
and point Python Guard surfaces there.

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arcjet-docs Ready Ready Preview Aug 25, 2026 8:54pm

Request Review

cursoragent and others added 2 commits August 24, 2026 22:06
Match the JavaScript, Python, and Go tab order used on the rest of
the capture page so the synced language switcher stays consistent.

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
@davidmytton
davidmytton marked this pull request as ready for review August 24, 2026 22:07

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Arcjet Review — 🟢 Low Risk

Decision: Approved

Rationale: Documentation-only PR that adds a new 'Capture outcomes' section describing Python checkpoint helper outcome values, plus short cross-reference pointers on related pages. No code changes, no secrets, no security surface. Screenshot baselines were regenerated for the affected pages. Description accurately reflects the diff.

Summary of Changes

Documents the Python Guard metadata.outcome values (success, degraded, error, denied, unavailable) on the Capture events page, with pointers added from the Python reference, LangChain guard, framework-integrations, reference, testing, and troubleshooting pages. Also updates Linux Playwright screenshot baselines for the pages that grew.

Review: c7f8d991 | Model: anthropic/claude-opus-4-7 | Powered by Arcjet Review

Comment thread src/content/docs/guards/capture.mdx
Comment thread src/content/docs/guards/capture.mdx Outdated
cursoragent and others added 2 commits August 25, 2026 20:36
Resolve framework-integrations screenshot conflicts against main's
CrewAI and LangChain JS pages, and keep CrewAI hooks from being
documented as recording degraded.

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
Use the same third-column header on the JavaScript and Python tabs,
and spell out that error is the wrapped action throwing, not a thrown
guard check.

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
@davidmytton
davidmytton added this pull request to the merge queue Aug 25, 2026
@arcjet-review arcjet-review Bot added the ready Ready to merge label Aug 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 25, 2026
@davidmytton
davidmytton added this pull request to the merge queue Aug 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 25, 2026
@arcjet-review arcjet-review Bot removed the ready Ready to merge label Aug 25, 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