Skip to content

fix(sources): close four unhandled review findings in parsers - #5654

Merged
Sinity merged 2 commits into
masterfrom
claude/prsurvey-fixes
Sep 27, 2026
Merged

Sinity merged 2 commits into
masterfrom
claude/prsurvey-fixes

Conversation

@Sinity

@Sinity Sinity commented Sep 27, 2026

Copy link
Copy Markdown
Owner

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:

Solution

  • retained_assembly.chatgpt_export_scope finds the archive separator case-insensitively and keeps the path's own spelling.
  • hermes_state.parse_state_db keeps an empty session when a kept session descends from it.
  • ai_parser.parse_project marks documents as CONTEXT/RUNTIME_CONTEXT. UNKNOWN isn't enough, because the chat-export user channel upgrades unknown user messages to human-authored.
  • otel_genai sets model_name from 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

- 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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T19:48:09.350567Z 8971d88 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/sources/retained_assembly.py Resolved
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
@Sinity
Sinity enabled auto-merge (squash) September 27, 2026 19:49
@Sinity
Sinity merged commit 64a479f into master Sep 27, 2026
3 checks passed
@Sinity
Sinity deleted the claude/prsurvey-fixes branch September 27, 2026 19:52
Sinity added a commit that referenced this pull request Sep 28, 2026
## 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]>
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