Skip to content

Comments

gate: harden envelope parsing and wrkr context parsing#57

Merged
davidahmann merged 1 commit intomainfrom
codex/fix-chaos-and-envelope-null-validation
Feb 20, 2026
Merged

gate: harden envelope parsing and wrkr context parsing#57
davidahmann merged 1 commit intomainfrom
codex/fix-chaos-and-envelope-null-validation

Conversation

@davidahmann
Copy link
Collaborator

Problem

Recent gate fixes addressed script-step context leakage and envelope parsing for Wrkr inventory / approved script registries, but null envelope fields ({"items":null} and {"entries":null}) could still be treated as empty slices and bypass fail-closed error handling.

Changes

  • Ensure script-step context in policy evaluation is isolated per step so Wrkr enrichment cannot leak between steps.
  • Accept valid empty envelope forms (items: [], entries: []) while rejecting malformed non-array and null envelope payloads.
  • Add regression tests for:
    • Wrkr and approved-script envelope empty arrays
    • explicit null envelope fields returning parse errors
    • step-level context isolation behavior

Validation

  • make prepush-full
  • ./gait doctor --json
  • pre-push hook: make prepush

@davidahmann davidahmann merged commit 282376d into main Feb 20, 2026
7 checks passed
@davidahmann davidahmann deleted the codex/fix-chaos-and-envelope-null-validation branch February 20, 2026 03:16
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