Repository navigation
fix(sources): close four unhandled review findings in parsers - #5654
Conversation
- Scope uppercase .ZIP exports to their own archive, not the directory. - Keep a message-less Hermes continuation that a later child names as its parent, so the child's lineage edge resolves. - Mark Claude project knowledge documents as standing context, not human-authored words. - Put the span's model on the token-bearing OTel GenAI output, so its usage reaches the model rollup. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5576134d32
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Admission and the writer drop message-less sessions, so a child must name a kept ancestor rather than the empty continuation. Match the ZIP separator on the original path so Unicode case folding cannot shift the scope offset. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
## Summary Ports the still-relevant tests from the orphaned custody branch `wip/reindex-readiness-only-20260927` (bead polylogue-gtqzv). Each test was adapted to run against master's current production route. Porting the MCP judge test exposed one defect, fixed here: a daemon-required refusal reached MCP clients under the generic `polylogue_error` code. ## Problem - Master's OTel GenAI parser (#5530, #5537, #5654) has no tests for live acquisition from a configured root, replay-stable identity, duplicate and conflicting span copies, one span id reused across traces, trace-id fallback, explicit-empty attributes over compatibility events, late parents, schema-url status, or redacted/truncated/missing fidelity. - The MCP declaration inventory had no test that makes a new privileged capability fail until someone reviews it. - The MCP `judge` route now writes through the daemon. Without a running daemon it raises `FacadeDaemonRequiredError`, whose code is `daemon_required`, but `mcp_error_payload` reported it as `polylogue_error`. ## Solution - `tests/unit/sources/parsers/test_otel_genai_contract.py`: the nine branch contracts. All pass against master's parser as written. The only changes are fixture typing. - `tests/unit/mcp/test_mcp_writer_boundary.py`: the capability inventory test, plus a judge test on the current route. The real MCP `judge` handler must refuse with `daemon_required` and leave `user.db` byte-identical, with the candidate still unjudged. - `polylogue/mcp/server_support.py`: maps `FacadeDaemonRequiredError` to its own code. Dropped as obsolete, with a reason recorded on the bead: - The requested-fields tests. `test_query_units_selects_message_fields_without_materializing_full_rows` already covers the same route through the facade. - The SLO failed-benchmark test. Master's `test_failed_benchmark_with_valid_json_is_not_scored_and_keeps_diagnostics` covers it. - The Claude artifact observation at raw admission. `archive/artifact_taxonomy/runtime.py` classifies these now. ## Verification - `devtools test tests/unit/sources/parsers/test_otel_genai_contract.py tests/unit/sources/parsers/test_otel_genai.py tests/unit/mcp/test_mcp_writer_boundary.py tests/unit/mcp/test_tool_error_isolation.py`: `PASSED exit=0` - `devtools gate layering`: passed. mypy passes on the changed files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Summary
Fixes four P1 review findings that were left unhandled on merged PRs and still reproduce on master.
Problem
A survey of merged PRs from the last six weeks found Codex review threads with no reply or resolution. These four still produce a wrong outcome at current master:
first.ZIPexport falls back to directory scope, so retained attachment maps can bind across sibling exports (feat: Retain Claude and Codex memory documents as source artifacts #4853).Solution
retained_assembly.chatgpt_export_scopefinds the archive separator case-insensitively and keeps the path's own spelling.hermes_state.parse_state_dbkeeps an empty session when a kept session descends from it.ai_parser.parse_projectmarks documents asCONTEXT/RUNTIME_CONTEXT.UNKNOWNisn't enough, because the chat-export user channel upgrades unknown user messages to human-authored.otel_genaisetsmodel_namefrom the response or request model on assistant outputs.Verification
devtools test tests/unit/sources/parsers/test_otel_genai.py tests/unit/sources/test_assembly_chatgpt.py tests/unit/sources/test_parsers_claude_ai_catalog.py tests/unit/sources/test_parsers_local_agent.py→ 121 passed, 2 failed on the first run. Both failures were in the new or updated tests, and both are fixed. Re-running the two affected files gave 74 passed.devtools verify --quick→ PASSED.devtools schema closure: all four production files are IN, so this moves the derived schema identity and must land before the fresh rebuild.Residuals
The remaining unhandled findings are filed as area-grouped bug beads to verify and fix, not fixed here.
🤖 Generated with Claude Code
https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4