Skip to content

fix: update validation to accept minimal server environment without inference models - #1445

Merged
Teingi merged 1 commit into
oceanbase:masterfrom
jiannnnyyyyy:fix1
Sep 4, 2026
Merged

fix: update validation to accept minimal server environment without inference models#1445
Teingi merged 1 commit into
oceanbase:masterfrom
jiannnnyyyyy:fix1

Conversation

@jiannnnyyyyy

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #1442.

Rationale for this change

powercontext config validate --env-file incorrectly required a complete inference configuration, even when the environment file was only intended to configure a minimal Server.

This made valid configurations accepted by powercontext server run --env-file fail validation because no generation model was configured.

What changes are included in this PR?

  • Allow config validate to validate minimal Server-only environment files without inference models.
  • Keep strict validation for complete configurations generated by config init.
  • Validate provider models only when inference models are configured.
  • Ensure env-file validation ignores stale POWERCONTEXT_SERVER_* values from the shell.
  • Add a regression test covering the seekDB, HTTP, and Dashboard configuration from issue bug: powercontext config validate rejects a server-runnable env file when inference models are not configured #1442.
  • Update English and Chinese configuration documentation.

Are there any user-facing changes?

Yes. powercontext config validate --env-file now accepts valid minimal Server configurations that do not configure inference models.

There are no breaking API changes or persistence format changes.

How was this change tested?

  • pytest -q tests/test_config_cli.py -k 'not init_validate_and_show_round_trip_managed_environment'
    • 22 passed
  • Manual validation using the exact issue scenario:
    • seekDB
    • 127.0.0.1
    • port 8888
    • multiple Dashboard scopes
    • no inference models configured
  • Ruff linting and formatting checks
  • Ty type checking
  • zensical build --strict

The skipped existing test checks Unix file permissions and is not portable on Windows.

AI usage statement

This PR was developed with OpenAI Codex using the GPT-5 model. The AI assisted with repository inspection, implementation, test updates, documentation updates, and validation.

@CLAassistant

CLAassistant commented Sep 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jiannnnyyyyy jiannnnyyyyy changed the title fix: update validation to accept minimal server environment without i… fix: update validation to accept minimal server environment without inference models Sep 3, 2026

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing #1442. I reproduced the minimal success case, but the current head still has runtime-parity gaps and conflicts with the latest master (259bee3).

Comment thread src/powercontext/cli/config.py Outdated
Comment thread src/powercontext/cli/config.py Outdated
Comment thread tests/test_config_cli.py Outdated
@Teingi

Teingi commented Sep 3, 2026

Copy link
Copy Markdown
Member

resolve conflicts

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teingi
Teingi merged commit 0bb4911 into oceanbase:master Sep 4, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: powercontext config validate rejects a server-runnable env file when inference models are not configured

3 participants