Skip to content

fix(examples): indonesia_compliance reads AXONFLOW_USER_TOKEN [skip-runtime-e2e]#215

Open
saurabhjain1592 wants to merge 1 commit into
mainfrom
fix/indonesia-example-user-token
Open

fix(examples): indonesia_compliance reads AXONFLOW_USER_TOKEN [skip-runtime-e2e]#215
saurabhjain1592 wants to merge 1 commit into
mainfrom
fix/indonesia-example-user-token

Conversation

@saurabhjain1592

Copy link
Copy Markdown
Member

Summary

examples/indonesia_compliance.py hardcoded user_token="" — on enterprise stacks (DEPLOYMENT_MODE=enterprise) the governed NIK call 401'd and the generic AxonFlowError catch printed the auth failure as "expected if no LLM configured" with exit 0. This is the swallowed-auth-error class from the #2861 sweep; this file was missed by #213's example fixes.

Changes

Testing (live enterprise stack, axonflow-enterprise main @ 5222c70f0, local editable SDK 8.5.1)

  • With a valid tenant JWT: exit 0, NIK request governed (Response blocked: False), audit-search + PII-Indonesia policy list legs green.
  • With the token unset: loud AuthenticationError: Invalid credentials, exit 1 (previously exit 0 with a success-shaped message).

Skip-runtime-e2e justification

One-hunk example-script fix (env-var read + loud auth failure); no library surface changed. The governed-call path this example exercises is already covered by the repo's runtime-e2e suite; the fix itself was verified end-to-end against a live enterprise stack in both directions (evidence above). Adding a dedicated runtime-e2e harness for a demo script would duplicate existing coverage.

Refs getaxonflow/axonflow-enterprise#2861.

…untime-e2e]

The example hardcoded user_token="" — on enterprise stacks
(DEPLOYMENT_MODE=enterprise) every governed call 401'd and the generic
AxonFlowError catch printed the auth failure as 'expected if no LLM
configured' with exit 0 (the swallowed-auth-error class from the #2861
sweep; this file was missed by #213's example fixes). It now reads
AXONFLOW_USER_TOKEN like the other examples and re-raises
AuthenticationError so a credentials problem fails loudly.

Signed-off-by: Saurabh Jain <saurabh.jain@getaxonflow.com>
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.

1 participant