Skip to content

Commit 4903df0

Browse files
Mikarina13claude
andcommitted
docs(phase1-step2): §11 RESOLVED — apply Q1-Q6 with three tightenings (v2)
Reviewer pass on docs/PHASE1-STEP2-DESIGN.md by Mickael + Claude chat 2026-04-30. All 6 questions in §11 closed. Three of the six carried tightenings, all baked into the body of the doc. Q1: APPROVED. Exact list only for v1 PLUGIN_TOOL_FILTER. Q2: APPROVED with tightening — lock `tool_name` in immutable-identity- fields list alongside transport / agent / correlation_id / client_id / operation_id. §6 mutation contract now has an explicit table of immutable fields. A plugin must veto if it wants different routing — silent rewrite would break audit pairing. Two new §9.4 tests cover the filter behaviour. Q3: APPROVED. Defer pre_llm_call / post_llm_call to a later step. Q4: APPROVED with tightening — specify the audit envelope for plugin-raised exceptions. New `hook_error` event in §7.5 with required fields plugin_name, hook_name, error_type, error (truncated to _PREVIEW_MAX = 200 chars), inheriting correlation_id of the wrapping operation. `level: "warning"`, not "error" — operation still succeeded, only the plugin failed; keeps audit_report's error-rate metric meaningful. `hook_fired` and `hook_error` are split events, never both for the same call. §1.1 audit-event column updated for every hook lifecycle. §9.5 added 5 new tests (envelope shape, correlation_id inheritance, level=warning, truncation, no-double-emit). Q5: APPROVED. No cap in hook layer. Q6: APPROVED with rename — on_session_start / on_session_end → on_operation_start / on_operation_end. HookCtx field session_id → operation_id. Reasoning: matches Step 1 §1.4 correlation_id contract vocabulary ("operation"); avoids collision with the existing voice_session_start / voice_session_end Step-1 audit events (those keep their names — narrower scope, literal voice sessions). Mass-rename touched 21 lines across §1.1, §1.4, §2.2, §2.3, §2.5, §5, §6, §7.2, §7.3, §9.2, §9.5, §12, §13. Doc header updated v1 → v2; closing line updated. Section count unchanged (§0–§13). 954 lines total. SOH bytes: 0 (verified post-commit). No code modified. _HTTP_BLOCKED untouched. PM2 untouched. Ready for the implementation prompt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 293a99b commit 4903df0

1 file changed

Lines changed: 135 additions & 61 deletions

File tree

0 commit comments

Comments
 (0)