Repository navigation
refactor(tickets): migrate GitHub mechanics to Python - #195
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
Closes #178. The GitHub Issues facade depended on Bash and Unix utilities for substantial parsing and provider mechanics, preventing native Windows execution.
What changed
Replace
bin/ticketwith a dependency-free, UV-managed Python package and the frozendarrow-ticketentrypoint. Keep all ten operations, compact reports, exit codes, and skill authority while simplifying argument handling, validation, JSON decoding, relation operations, and temporary-file ownership.Preserve origin host/repository binding, exact-label safeguards, foreign-parent refusals, complete dependency pagination, read-before-write checks, and honest partial-write reports. Remove the Bash launcher and replace its regression suite with Python contract/property tests; update all four skills and their provider fixtures, documentation, inventory, and matching manifests to version 0.4.0. Add Python 3.10–3.13 Windows checks and fresh copied-plugin jobs on Linux, macOS, and Windows.
Route Claude ticket requests before prerequisite judgments through a static, nonmutating SessionStart context in the same package. Clarify ambiguous read activation, preserve imperative ticket text as quoted data, and copy compact list records without reformatting them into prose. Fix the shared Claude observer to recognize native plugin-command expansion, bound to the mounted namespace, complete body, arguments, and session, while preserving valid direct Skill-event evidence.
Verification
bun run check:python: passed repository-wide; the ticket package has 144 passing tests and 100% statement / 100% branch coverage, with strict mypy and Ruff complexity gates.uv run --quiet --frozen --no-dev --project plugins/capability/darrow-tickets-github/backend python plugins/capability/darrow-tickets-github/backend/tests/fresh_install.py: passed locally on macOS, withghavailable and provider operations mocked.claude-sonnet-5, medium) and Codex (gpt-5.6-terra, medium): 54 native trials, one trial per case/host, 80% configured threshold. Affected cases were rerun after fixes; all 27 fixtures also passed dry validation.bun run lint,lint:shell,lint:ts,typecheck,check:decisions, andcheck:docs: passed; all four skills passed inspection and the Claude plugin manifest validated.Review notes
The old script path is intentionally removed: callers use
uv run --quiet --frozen --no-dev --project <plugin-root>/backend darrow-ticket. No compatibility shim or shared plugin runtime remains. Tests never mutate live GitHub state. Fresh-copy checks run Git natively, require installedgh, and mock provider operations; they do not certify live GitHub API behavior. Single-trial evals are bounded acceptance evidence, not a reliability estimate.The Windows literal-argument test now emits UTF-8 bytes explicitly. Three list-output assertions normalize only the state/title separator spacing permitted by TM-L3; all visible content and line order remain exact. The explicit incomplete-read failure was an observer defect: Claude had already expanded the plugin command before its first turn. Native-expansion regression tests cover plugin identity and preserve the existing Skill-event path.
The final CI run initially encountered a SQLite database-lock race in an unchanged observability concurrency test on macOS/Python 3.10. A failed-jobs CI rerun passed; this PR does not claim to fix that intermittent race.
The conversation-reference eval previously fabricated
ticket-token: #12; its fixture and expectation now use the documented authoritative numeric token12.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.