Sfoglia il codice sorgente

docs: plan order-independent EventPrompt identity test

Problem: the managed/impostor regression covered only one ordering, allowing an incorrect last-signature-wins collector to pass.\n\nRisk: both orderings must preserve ordinary prompt order while selecting by prompt kind.
zhenyu.hu 2 settimane fa
parent
commit
16608fa0ed

+ 19 - 0
docs/plans/todo-53.5-event-prompt-order-independent-identity.md

@@ -0,0 +1,19 @@
+# Todo 53.5: EventPrompt Order-Independent Identity
+
+## Problem
+
+Todo 53.4 distinguishes managed and impostor content, but tests only the ordering where the impostor precedes the managed item. An incorrect collector that keeps the last generated-signature item could still pass.
+
+## Scope
+
+- Change only the EventPrompt payload behavior test.
+- Run the same assertions with managed-before-impostor and managed-after-impostor prompt arrays.
+- In both orderings, `dual_agent` must retain ordinary custom prompts plus the managed content.
+- In both orderings, `chat_agent_tools` must retain ordinary custom prompts only.
+- Do not change production code.
+
+## Verification
+
+- Focused payload test passes for both orderings.
+- Full WebSocket test file, Node syntax, and diff checks pass.
+- Repeat the bounded code-quality review.

+ 1 - 0
docs/plans/todos.md

@@ -119,3 +119,4 @@
 | 53.2 | done | `docs/plans/todo-53.2-console-interaction-state.md` | Make the new collapsible control sections and Audit/Usage drawer operable, persistent, and synchronized with session/mode status. | RED: `6 failed, 9 passed`; GREEN: focused `15 passed`, full WebSocket file `94 passed`; Node/diff checks and independent spec/code-quality reviews pass. |
 | 53.3 | in_progress | `docs/plans/todo-53.3-event-prompt-payload-singleton.md` | Enforce the EventPrompt singleton at the outbound payload boundary in both invocation modes, including stale or user-edited generated-signature custom prompts. | A failing behavior test proves `dual_agent` sends one managed EventPrompt and `chat_agent_tools` sends none; focused/full tests and review gates pass. |
 | 53.4 | in_progress | `docs/plans/todo-53.4-managed-event-prompt-test-identity.md` | Make the payload-singleton regression distinguish the managed EventPrompt from a generated-signature custom impostor. | The test uses different valid generated-signature contents and proves dual mode retains the managed value while direct mode retains neither. |
+| 53.5 | in_progress | `docs/plans/todo-53.5-event-prompt-order-independent-identity.md` | Prove EventPrompt payload selection depends on managed prompt identity rather than whether it appears before or after a generated-signature impostor. | The behavior test runs both managed-before-impostor and managed-after-impostor orderings in both invocation modes. |