Skip to content

fix(sandbox): apply initial OCSF JSON setting#1921

Open
TaylorMutch wants to merge 1 commit into
mainfrom
1917-ocsf-jsonl-initial-settings/tmutch
Open

fix(sandbox): apply initial OCSF JSON setting#1921
TaylorMutch wants to merge 1 commit into
mainfrom
1917-ocsf-jsonl-initial-settings/tmutch

Conversation

@TaylorMutch

Copy link
Copy Markdown
Collaborator

Summary

Apply the effective ocsf_json_enabled setting during the sandbox poll loop initial settings fetch. This fixes OCSF JSONL export for sandboxes created after the global setting is already enabled.

Related Issue

Closes #1917

Changes

  • Apply the OCSF JSONL toggle from the initial poll_settings() response.
  • Reuse the same helper for initial and subsequent settings updates.
  • Add regression tests for enabling from the initial settings snapshot and disabling when unset.

Testing

  • mise run pre-commit passes
  • cargo test -p openshell-sandbox
  • cargo clippy -p openshell-sandbox --all-targets -- -D warnings
  • mise run helm:skaffold:run
  • Manual Kubernetes validation: created a sandbox with OCSF JSON disabled, confirmed JSONL stayed empty, enabled OCSF JSON, confirmed JSONL wrote records.
  • Manual Kubernetes regression validation: created a sandbox while global ocsf_json_enabled=true, generated an OCSF event without any settings bump, and confirmed JSONL wrote records.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
@TaylorMutch TaylorMutch requested review from a team, derekwaynecarr and mrunalp as code owners June 15, 2026 23:37
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.

bug: OCSF JSONL remains disabled for sandboxes created after global enablement

2 participants