Skip to content

T5-P4-A2-WP1 — Eliminate noqa:F841 Silent Parameter Discards in CodexBackend#4141

Merged
Trecek merged 4 commits into
developfrom
t5-p4-a2-wp1-eliminate-all-8-noqa-f841-silent-parameter-disc/4016
Jun 28, 2026
Merged

T5-P4-A2-WP1 — Eliminate noqa:F841 Silent Parameter Discards in CodexBackend#4141
Trecek merged 4 commits into
developfrom
t5-p4-a2-wp1-eliminate-all-8-noqa-f841-silent-parameter-disc/4016

Conversation

@Trecek

@Trecek Trecek commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remove all 6 noqa:F841 silent parameter discards across build_skill_session_cmd and build_food_truck_cmd in codex.py. Each discarded parameter gets an explicit disposition: plugin_source and output_format emit structlog warnings when non-default values are passed, and exit_after_stop_delay_ms (plus stream_idle_timeout_ms) inject AUTOSKILLIT_IDLE_OUTPUT_TIMEOUT into env extras via setdefault. Replace the old test and rewrite the TestCodexDiscardDispositions class to assert the new behavioral contracts.

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260628-060859-170393/.autoskillit/temp/make-plan/t5_p4_a2_wp1_eliminate_noqa_f841_discards_plan_2026-06-28_061300.md

Closes #4016

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 2.0k 18.0k 1.2M 84.8k 45 89.9k 11m 47s
verify* sonnet 1 68 9.4k 335.3k 54.9k 21 36.5k 4m 12s
implement* MiniMax-M3 1 74.7k 12.0k 1.8M 0 73 0 10m 28s
fix* sonnet 1 248 16.6k 2.0M 91.2k 77 72.6k 6m 59s
audit_impl* sonnet 1 62 22.1k 286.2k 67.5k 21 53.3k 9m 5s
prepare_pr* MiniMax-M3 1 41.9k 1.9k 111.0k 0 11 0 30s
compose_pr* MiniMax-M3 1 35.9k 1.1k 175.8k 0 12 0 35s
review_pr* sonnet 1 134 26.9k 886.9k 77.2k 36 59.7k 6m 52s
resolve_review* sonnet 1 197 17.7k 1.5M 83.4k 53 65.7k 7m 5s
Total 155.1k 125.8k 8.5M 91.2k 377.8k 57m 35s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 206 8946.3 0.0 58.4
fix 17 119658.8 4273.5 976.4
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 0
Total 223 37902.8 1694.3 564.2

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 2.0k 18.0k 1.2M 89.9k 11m 47s
sonnet 5 709 92.7k 5.1M 287.9k 34m 15s
MiniMax-M3 3 152.5k 15.1k 2.1M 0 11m 32s

claude and others added 4 commits June 28, 2026 06:31
…ded params

Replace 6 silent noqa:F841 parameter discards in build_skill_session_cmd and
build_food_truck_cmd with explicit behavioral dispositions:

- plugin_source and output_format now emit structlog warnings when non-default
  values are passed (codex_plugin_source_discarded, codex_output_format_coerced).
- exit_after_stop_delay_ms and stream_idle_timeout_ms inject
  AUTOSKILLIT_IDLE_OUTPUT_TIMEOUT into env extras via setdefault (existing
  provider_extras/env_extras values win via CodexEnvPolicy extras precedence).

Part of T5-P4-A2-WP1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… test

test_claude_only_params_accepted_but_ignored asserted the silent-discard
behavior; replace it with test_default_params_emit_no_warnings which uses
structlog.testing.capture_logs() to assert the new behavioral contract:
no codex_plugin_source_discarded or codex_output_format_coerced events fire
on default params, and CLAUDE_* Claude env vars remain absent.

Part of T5-P4-A2-WP1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ions

Replace the silent-discard documentation tests with 15 behavioral contract
tests covering both build_skill_session_cmd and build_food_truck_cmd:

- plugin_source -> captures codex_plugin_source_discarded warning event.
- output_format -> captures codex_output_format_coerced warning event when
  non-default (JSON for skill, STREAM_JSON for food_truck).
- exit_after_stop_delay_ms -> asserts AUTOSKILLIT_IDLE_OUTPUT_TIMEOUT env
  injection via setdefault.
- stream_idle_timeout_ms -> asserts both env injection and
  CmdSpec.process_idle_timeout_ms routing.
- Defaults -> asserts no warning events and no env injection.

Also updates the class docstring to describe active dispositions instead of
the old noqa:F841 discard picture.

Part of T5-P4-A2-WP1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…test isolation

build_food_truck_cmd's warning compared against JSON instead of STREAM_JSON
(the food truck default), so passing JSON triggered no warning; fix by
comparing against STREAM_JSON.

test_zero_ms_no_idle_timeout_{skill,food_truck}_builder now use monkeypatch
to remove AUTOSKILLIT_IDLE_OUTPUT_TIMEOUT from ambient env before asserting
absence in spec.env (ambient pipeline env leaked through filtered_base).

Raise codex.py line-limit exemption from 1125 to 1150 to cover the +18 net
lines added by T5-P4-A2-WP1 explicit parameter dispositions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Trecek Trecek added this pull request to the merge queue Jun 28, 2026
Merged via the queue into develop with commit 3039333 Jun 28, 2026
3 checks passed
@Trecek Trecek deleted the t5-p4-a2-wp1-eliminate-all-8-noqa-f841-silent-parameter-disc/4016 branch June 28, 2026 14:14
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.

2 participants