feat: richer block context from platform#15
Merged
saurabhjain1592 merged 3 commits intomainfrom Apr 18, 2026
Merged
Conversation
Codex plugin half of ADR-042 + ADR-043 approval-context enrichment. Hook changes (scripts/pre-tool-check.sh): - Parse four new optional fields from the platform's check_policy response: decision_id, risk_level, override_available, override_existing_id. All are omitempty on older platforms. - When exec_command is blocked (exit 2), the stderr reason now includes bracketed context with decision ID, risk level, and either the active override ID or a pointer to the explain_decision MCP tool. - Absent context falls back to the v0.3.0 message shape. Version: 0.3.0 -> 0.4.0 (.codex-plugin/plugin.json + marketplace.json). Tests: full 52-test suite green. Companion to: - Platform v7.1.0 (axonflow-enterprise PR #1605) - Go v5.4.0, Python v6.4.0, TypeScript v5.4.0, Java v5.4.0 - OpenClaw v1.3.0 (PR #44), Claude Code v0.5.0 (PR #28), Cursor v0.5.0 (PR #16)
Mirrors the fix in claude-plugin + cursor-plugin. setup_telemetry_test() unsets DO_NOT_TRACK so opt-out tests can exercise the ping path, but didn't export AXONFLOW_CHECKPOINT_URL — so the subset of telemetry tests that didn't set the URL themselves fell through to the real production endpoint and fired live pings on every suite run. Fix: export AXONFLOW_CHECKPOINT_URL=http://127.0.0.1:$MOCK_PORT/v1/ping inside setup_telemetry_test(); teardown unsets it. Full 52-test suite green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex plugin half of Plugin Batch 1 (ADR-042 + ADR-043). Pre-tool-check hook's stderr message on block now surfaces decision_id, risk_level, and override availability from platform v7.1.0+.
Version: 0.3.0 → 0.4.0
Tests
Full 52-test suite green.
Companion to: axonflow-enterprise PR #1605, sdk-go PR #122, sdk-python PR #141, sdk-typescript PR #175, sdk-java PR #128, openclaw-plugin PR #44, claude-plugin PR #28, cursor-plugin PR #16.