Skip to content

[codex] fix: remove shadowed _generated_sibling_path overload breaking smoke test#1

Draft
markoblogo wants to merge 1 commit into
mainfrom
codex/fix-generated-sibling-path-shadowing
Draft

[codex] fix: remove shadowed _generated_sibling_path overload breaking smoke test#1
markoblogo wants to merge 1 commit into
mainfrom
codex/fix-generated-sibling-path-shadowing

Conversation

@markoblogo
Copy link
Copy Markdown
Owner

Problem

The feat(status) commit (36d0b93) introduced a new _generated_sibling_path(path, generated_suffix) function at the bottom of actions.py for the new status command. However, a legacy _generated_sibling_path(path) definition (single argument, no suffix) already existed earlier in the same file.

Python resolved this to the last definition, so when _handle_file called _generated_sibling_path(path) (single-arg form) it hit the new two-arg signature — causing:

FAIL test3_no_markers_creates_generated_files: _generated_sibling_path() missing 1 required positional argument: 'generated_suffix'

Both Python 3.11 and 3.12 CI jobs failed on test3_no_markers_creates_generated_files.

Root cause

Duplicate function definition: the old one-arg version at line 245 was silently shadowed by the new two-arg version added for the status command.

Fix

  • Removed the now-dead one-arg _generated_sibling_path definition (lines 245–250).
  • Updated the single call site in _handle_file (line 208) to pass ".generated" as the suffix, matching the previous default behaviour exactly (AGENTS.mdAGENTS.generated.md, RUNBOOK.mdRUNBOOK.generated.md).

Verification

All three smoke tests pass locally:

PASS test1_init_creates_files_and_config
PASS test2_update_preserves_outside_markers
PASS test3_no_markers_creates_generated_files

Run: python -m agentsgen._smoke

…test

The feat(status) commit added a second _generated_sibling_path(path, generated_suffix)
definition that shadowed the original single-argument version. The call site in
_handle_file still used the old one-argument form, causing:

  _generated_sibling_path() missing 1 required positional argument: 'generated_suffix'

Fix: remove the now-dead first definition and update the call to pass the default
'.generated' suffix, preserving identical behaviour for AGENTS.md and RUNBOOK.md.

Co-Authored-By: Oz <oz-agent@warp.dev>
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