refactor(executors): reimplement the Aider adapter independently - #102
Merged
Conversation
Resolves the provenance question flagged in #99. The version merged in #96 was a port of an unsigned contribution (#55). Without a signed CLA the copyright assignment never happened, so keeping derived code — especially after removing the attribution — was the least defensible combination. This rewrites the adapter from the sibling adapters (codex.py / claude_code.py, both owner-authored) so nothing in the tree derives from an unassigned contribution, and drops the attribution from the module docstring and the v0.7.0 changelog entry. Behaviour is unchanged: all 33 executor tests written against the previous implementation pass without modification, because they assert behaviour rather than structure. Two things the rewrite adds, both from house patterns the port lacked: * --model is validated before use, like the Codex adapter's -m value, so a caller-supplied string cannot smuggle shell metacharacters or extra arguments into the command. The first character must be alphanumeric — my own test caught that a naive character class accepts "--dangerously-x", since "-" is legal inside a model name, and an argument parser may read a leading dash as a new option rather than as --model's value. * The withheld-authority flags are a named constant, so removing one shows up in review instead of disappearing into the command construction. A test asserts the set, not just individual flags. Also logs a non-zero exit like claude_code.py does, which the port did not.
Signetry Reviewer — 🟡 Needs human reviewA human should decide — the required check is pending. Deterministic gates (the authority)
FindingsNo issues found by the deterministic scanners. MergeA human should review and merge.
|
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.
Resolves the provenance question I flagged in #99, and removes the last
@adity982reference from the repo and the v0.7.0 changelog entry.Why
The adapter merged in #96 was a port of an unsigned contribution (#55). Without a signed CLA the copyright assignment never happened — so keeping derived code while removing the attribution was the least defensible of the available options.
This rewrites
aider.pyfrom the sibling adapters (codex.py,claude_code.py— both owner-authored), so nothing in the tree derives from an unassigned contribution.Behaviour is unchanged
All 33 executor tests pass without modification, including the 13 written against the previous implementation — they assert behaviour (fail-closed gating, diff capture, withheld authority, redaction, honest
unavailableon failure, model pass-through), not structure. That's the evidence the rewrite is equivalent rather than merely compiling.Two things it adds
Both are house patterns the port lacked:
1. is validated before use, like the Codex adapter's
-m, so a caller-supplied value can't smuggle shell metacharacters or extra arguments into the command.Worth noting how the boundary got found — my own new test caught it:
-is legal inside a model name, so a naive character class lets a leading-dash value through, and an argument parser may read that as a new option rather than as--model's value. The first character must now be alphanumeric:bad;rm -rf /a b c--dangerously-do-xgpt-5.6-terraopenrouter/anthropic/claude-opus-52. The withheld-authority flags are a named constant (
_WITHHELD_AUTHORITY), so dropping one surfaces in review instead of vanishing into the command construction. A test asserts the whole set as a set.Also logs a non-zero exit the way
claude_code.pydoes, which the port didn't.Verification
280 tests pass,
ruffclean. Zeroadity982references remain anywhere in the repo.After this, #55 can be closed — I'll do that once this lands, with an explanation of the CLA requirement rather than a bare close.