Repository navigation
refactor(python): simplify plugin mechanics with standard idioms - #203
Merged
Merged
Conversation
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.
Why
The Python migrations left manual escaping, argument indexing, and resource cleanup that standard Python operations can express more directly.
What changed
dataclasses.replace()for catalog rows; andCounterfor report totals.contextlib.closing()for SQLite connections and remove a redundant catch-and-reraise without changing explicit transactions or cancellation propagation.docs/specs/python-quality.mdand increment both plugin manifests for discovery, Git, review, decisions, adaptive delivery, and Langfuse observability.Verification
bun run check:python; after correcting one import-order lint issue, completed the remaining gates withbun run check:python --package plugins/capability/darrow-review/backend,bun run check:python --package plugins/orchestration/darrow-adaptive-delivery/backend, andbun run check:python --package plugins/orchestration/darrow-ticket-pipeline/backend.bun run lint,bun run lint:ts,bun run lint:shell,bun run typecheck,bun run check:decisions, andbun run check:docs.backend/tests/fresh_install.pychecks through their frozen runtime-only UV entrypoints. Passed discovery and Langfusetests/fresh-install.test.shwith bothbashand/bin/bash.inspect-skill inspectchecks for the seven affected skill entrypoints.Review notes
Exact serialized bytes, literal flag-looking arguments, error precedence, and SQLite transaction behavior are the key compatibility constraints. Local validation ran on macOS with Python 3.13; native Linux/Windows and the other supported Python versions remain for CI. Live agent evals were not run because skill instructions and workflow behavior are unchanged. The larger typed-record redesign remains a separate follow-up.
Checklist
CONTRIBUTING.md, including the contributionlicensing terms.
this change does not affect a capability invariant.
behavior.
change does not affect plugin content.
bun run check:python, or this change does not affect registeredPython packages or their repository quality infrastructure.