Repository navigation
fix(extensions): omit config hint when no scaffolding fails - #5459
Open
dlwlgnsrhy wants to merge 1 commit into
Open
dlwlgnsrhy wants to merge 1 commit into
dlwlgnsrhy wants to merge 1 commit into
Conversation
Show the generic configuration hint only alongside an actual scaffolding failure. Cover undeclared, empty, and missing-template configurations through the CLI. Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes address the misleading configuration hint and add regression coverage for the relevant scaffolding paths, with no active review issues identified.
No open issues 🎉
What changed in this PR
This pull request updates specify extension add so the generic configuration hint is shown only when configuration scaffolding fails, avoiding misleading warnings for extensions without declared configuration.
Changes:
- Added regression coverage for undeclared, empty, and failed configuration scaffolding.
- Restricted the generic configuration hint to the scaffolding-failure path.
- Updated the Rich escaping test to simulate scaffolding failure while preserving its coverage.
| File | Description |
|---|---|
| tests/specify_cli/extensions/test_command_add.py | Adds regression coverage for configuration-warning behavior and updates the escaping test to exercise a scaffolding failure. |
| src/specify_cli/extensions/command_add.py | Emits the generic configuration hint only when configuration scaffolding reports failures. |
Review effort: Lite (adaptive)
This branch has not been deployed
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.
Description
specify extension add --devprints a configuration warning for the bundledbugextension even though its manifest declares no config. The same thing happens whenprovides.configis empty. Show the configuration hint only when scaffolding reports a failure. Failed templates still produce both the specific warning and the generic configuration hint.Testing
.venv/bin/specify --help.LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest --override-ini addopts='' tests/specify_cli/extensions tests/test_extensions.py -q. 752 passed.specify extension addin four temporary projects. No warning for the bundledbugextension, config generated from a template, existing config preserved byte-for-byte, and both warnings retained for a missing declared template.The new parametrized regression test reported 2 failures and 1 pass against upstream
e210504a. The no-config and empty-config cases failed on the unexpected hint. All three cases pass with the fix. The existing Rich escaping test now simulates a scaffolding failure so it still exercises the hint.AI Disclosure
AI disclosure: OpenAI Codex (GPT-6, reasoning effort unavailable, autonomous under contributor direction) reproduced the issue, implemented the patch and regression tests, ran the automated and temporary-project checks, and authored the commit and PR on behalf of @dlwlgnsrhy. These checks were agent-executed.