T5-P6-A10-WP1 Unknown-NDJSON-Vocabulary Counters#4120
Merged
Trecek merged 3 commits intoJun 27, 2026
Merged
Conversation
…unters T5-P6-A10-WP1: Surface unknown NDJSON vocabulary occurrences as machine-readable counters instead of relying on log scraping. Counter origin sites (parser layers): - _CodexParseAccumulator: ndjson_unknown_event_count / ndjson_unknown_item_count incremented at CodexEventType.UNKNOWN / CodexItemType.UNKNOWN warning sites. - CodexStreamParser: ndjson_unknown_event_count / ndjson_unknown_item_count init=False fields with public unknown_event_count / unknown_item_count properties, incremented at unknown fallthrough sites. Data flow: - _CodexParseAccumulator fields -> CodexResultParser.parse_stdout raw dict. - CodexResultParser raw dict -> AgentSessionResult.raw (preserved by adapter). - AgentSessionResult.raw -> ClaudeSessionResult via _adapt_agent_result -> seen_ndjson_unknown_event_count / seen_ndjson_unknown_item_count. Defaults are 0, so existing call-sites and ClaudeSessionResult constructors compile without changes. Tests: - TestCodexUnknownCounters: 4 stream/accumulator counter tests. - test_adapt_agent_result: 4 counter round-trip tests + completeness updates. - test_codex_result_parser: 2 raw dict shape tests + completeness updates.
…liases from CodexStreamParser The properties were trivial one-liner aliases for ndjson_unknown_event_count / ndjson_unknown_item_count, creating a naming inconsistency (dropping the ndjson_ prefix). Remove them and update test assertions to use the backing field names directly, unifying the naming convention across the class.
…r test to correct file test_ndjson_unknown_counters_default_zero duplicated assertions already present in test_hardcoded_thinking_defaults (L61-62). Removed to avoid double maintenance. test_scan_codex_ndjson_accumulator_counters_increment_independently tests _scan_codex_ndjson (a batch parser) but was placed in test_codex_stream_parser.py. Moved to TestScanCodexNdjson in test_codex_result_parser.py where all _scan_codex_ndjson tests live.
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
Add
ndjson_unknown_event_countandndjson_unknown_item_countinteger counters to the Codex NDJSON parsing pipeline. The counters originate at two parser layers (_CodexParseAccumulatorfor batch parsing,CodexStreamParserfor streaming), flow throughAgentSessionResult.raw, and land onClaudeSessionResultvia_adapt_agent_result. This makes unknown-vocabulary occurrences machine-readable for downstream WPs (P6-A10-WP2+) without log scraping.Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260626-235325-737964/.autoskillit/temp/make-plan/t5_p6_a10_wp1_unknown_ndjson_counters_plan_2026-06-26_235500.mdCloses #4045
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown