Skip to content

Commit 5b038a1

Browse files
github-actions[bot]DevForge EngineerCoding-Dev-Tools
authored
cowork-bot: automated improvements (cowork/improve-devforge-cli) (#13)
* cowork-bot: fix dispatch silent-failure + install-all extra + remove builtins alias - dispatch: add _is_tool_installed() pre-flight check (importlib.util.find_spec) so 'devforge guard ...' on an uninstalled tool shows a clear 'not installed — run pip install devforge[guard]' message instead of silently exiting 1 with a raw Python ModuleNotFoundError trace. The previous except FileNotFoundError was dead code: the error occurs inside the subprocess, not at Popen launch time. - install all: use canonical devforge[all] extra instead of joining all tool keys into a comma-separated extras string (fragile; diverges if TOOLS and pyproject.toml [all] ever drift). - Remove 'import builtins as _builtins' workaround; no builtin shadowing exists, so list() is fine throughout. - Remove unused ctx: typer.Context parameter from dispatch inner function. - Tests: 17/17 green; new TestIsToolInstalled + dispatch install-hint + install-all-extra assertion tests cover the fixed paths. * cowork-bot: seed cowork-auto-pr workflow for automated PR creation * cowork-bot: merge origin/main into cowork/improve-devforge-cli; resolve cli.py merge conflicts keeping the install-all + dispatch improvements * fix(install): replace broken bare 'pip install devforge-tools[...]' with verified-working git+ form devforge-tools is NOT on public PyPI (verified 404 on pypi.org), so the previous bare 'pip install devforge-tools[all/guard/...]' commands failed for every user. README + AGENTS now lead with the git+ GitHub-source form and an honest 'not on public PyPI' note; the 'devforge install <tool>' command and the not-installed dispatch hint now build git+ URLs from each tool's repo URL; false PyPI badges removed from README. Tests updated to assert the corrected hint. Marketing-growth-agent run — conversion-surface repair (highest-ROI rung). NOT pushed (W's call per OPS_CONTRACT). * cowork-bot: forward tool flags in dispatch subcommands (fix silent-failure trap) The per-tool subcommands (guard, sql, deploy, ...) used a typer Argument for args, which made typer reject any token beginning with `-` as an unknown option BEFORE the underlying tool ever ran. So `devforge guard --config x.yaml` failed with "No such option" and the tool silently never executed — the hub's known silent-failure/observability trap. Register each dispatch command with ignore_unknown_options + allow_extra_args and forward ctx.args to the underlying `python -m <pkg>` invocation. Positional args and flags now reach the tool. Added a regression test (test_dispatch_forwards_tool_flags) and the cowork-auto-pr workflow so the improvement is delivered as a PR. * ci: add CODEOWNERS, dependabot, CI/CD workflows (auto-PR, publish) * fix(cli): use consistent devforge-cli.git URL in dispatch install hint + prevent rich line-wrap breaking the URL * fix(tests): resolve merge conflict in test_cli.py (keep upstream test_dispatch_forwards_tool_flags) * style(tests): fix E501 line-too-long in test_cli.py assertion (ruff lint) * security(ci): pin all GitHub Actions to commit SHAs (supply-chain hardening) Mutable tag/branch refs (@v6, @release/v1) in workflows with id-token:write (OIDC trusted publishing) are a supply-chain risk: a compromised or moved ref could intercept the OIDC token and publish malicious packages to PyPI. Pinned: - actions/checkout@v6 -> d23441a (v6) - actions/setup-python@v6 -> ece7cb0 (v6) - pypa/gh-action-pypi-publish@release/v1 -> ba38be9 (v1.14.1) - actions/checkout@v4 -> 11d5960 (v4) Aligns with engraphis build-compiled-wheels.yml which already pins SHAs. All YAML validated, ruff clean, 19/19 tests pass. * style: apply ruff format to cli.py and test_cli.py (CI lint fix) * chore: remove accidentally committed scratch files (_audit_reqs.txt, parse_prs.py) --------- Co-authored-by: DevForge Engineer <engineer@devforge.dev> Co-authored-by: Jaixii <algorithmictradingsolutions@gmail.com>
1 parent 8b5e6f2 commit 5b038a1

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
lint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v6
16+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
1717
with:
1818
python-version: "3.12"
1919

@@ -33,10 +33,10 @@ jobs:
3333
python-version: ["3.10", "3.11", "3.12", "3.13"]
3434

3535
steps:
36-
- uses: actions/checkout@v6
36+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
3737

3838
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v6
39+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242

.github/workflows/cowork-auto-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# without this step every run failed with "not a git repository" and no
1717
# PR was ever opened (fleet-wide defect: 11/11 seeded copies lacked it).
1818
- name: Check out the pushed branch
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
2020
with:
2121
ref: ${{ github.ref_name }}
2222
fetch-depth: 0

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
id-token: write
1414

1515
steps:
16-
- uses: actions/checkout@v6
16+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
1717

1818
- name: Set up Python
19-
uses: actions/setup-python@v6
19+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
2020
with:
2121
python-version: '3.12'
2222

@@ -32,4 +32,4 @@ jobs:
3232
run: twine check dist/*
3333

3434
- name: Publish to PyPI
35-
uses: pypa/gh-action-pypi-publish@release/v1
35+
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1

.github/workflows/release-audit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
audit:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v6
14+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
1515

1616
- name: Set up Python
17-
uses: actions/setup-python@v6
17+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
1818
with:
1919
python-version: "3.11"
2020

0 commit comments

Comments
 (0)