refactor: split src/devspark_cli/__init__.py into commands/ sub-package (QUAL1)#35
Merged
Merged
Conversation
6 tasks
- Create _app.py: Typer app, BannerGroup, console, show_banner, callback - Create _github.py: GitHub token helpers, HTTP helpers, ssl_context - Create _utils.py: StepTracker, run_command, check_tool, is_git_repo, select_with_arrows - Create _template.py: download_template_from_github, download_and_extract_template, helpers - Create _upgrade_helpers.py: write_version_stamp, read_version_stamp (shared, avoids circular imports) - Create commands/__init__.py - Create commands/init.py: init() @app.command - Create commands/upgrade.py: upgrade(), render_upgrade_analysis(), helpers - Create commands/lifecycle.py: check(), version(), doctor(), uninstall() - Replace __init__.py with 69-line thin entry point (re-exports public API) - All 124 tests pass, 0 markdownlint errors Agent-Logs-Url: https://github.com/markhazleton/devspark/sessions/19b3aa71-6aaf-4b39-8409-4c9db35ef83b Co-authored-by: markhazleton <223906+markhazleton@users.noreply.github.com>
- Refactor detect_ai_agent() nested ternary into readable if/elif/else - Add comment explaining deferred import in upgrade.py to avoid circular imports - Fix incomplete URL comment in _utils.py check_tool() Agent-Logs-Url: https://github.com/markhazleton/devspark/sessions/19b3aa71-6aaf-4b39-8409-4c9db35ef83b Co-authored-by: markhazleton <223906+markhazleton@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor: Split src/devspark_cli/__init__.py into commands/ sub-package
refactor: split src/devspark_cli/__init__.py into commands/ sub-package (QUAL1)
May 5, 2026
markhazleton
approved these changes
May 5, 2026
…pter in hands-off mode Two bugs fixed: 1. Create .documentation/specs/002-harness-runtime/ fixture stubs so test_hands_off_lifecycle_contract._prepare_repo() can copy them into the temp fixture repo (files were archived to releases/v2.1.0/). 2. In HarnessRunner.execute_step(), replace the silent bypass of manual adapter steps in --hands-off mode with a hard failure that emits reason="write_incompatible_adapter" to events.jsonl, fulfilling the hands-off lifecycle contract that was always asserted by the test. Agent-Logs-Url: https://github.com/markhazleton/devspark/sessions/845d460f-94a3-4ece-9cb9-e8713b879c27 Co-authored-by: markhazleton <223906+markhazleton@users.noreply.github.com>
markhazleton
approved these changes
May 5, 2026
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.
test_hands_off_lifecycle_contract.documentation/specs/002-harness-runtime/files were archived toreleases/v2.1.0/—_prepare_repoFileNotFoundErrorHarnessRunnersilently bypassedmanualadapter steps as "passed" in--hands-offmode instead of failing withwrite_incompatible_adapter.documentation/specs/002-harness-runtime/(spec.md,contracts/cli-commands.md,contracts/harness-spec-yaml.md) satisfying harness regex/contains validationsHarnessRunner.execute_step()to fail withwrite_incompatible_adapterevent whenhands_off=Trueandadapter=manual