Skip to content

fix(env): add app config summary to env info [DEVEX-715] - #185

Merged
jpage-godaddy merged 1 commit into
mainfrom
DEVEX-715
Aug 4, 2026
Merged

fix(env): add app config summary to env info [DEVEX-715]#185
jpage-godaddy merged 1 commit into
mainfrom
DEVEX-715

Conversation

@qcai-godaddy

@qcai-godaddy qcai-godaddy commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Enrich env info for the active environment with always-present configFile (expected godaddy.toml / godaddy.<env>.toml path) and configSummary (object when the manifest validates, otherwise null)
  • Leave env get / env list shapes unchanged; unknown --env hard-fail and old GODADDY_* overrides already fixed
  • Skip TS display (color/label) and optional env info [environment]: display is unused noise, and a positional inspect switch duplicates/confuses global --env while env * already reports persisted active (~/.gdenv)

Test plan

  • cargo build / cargo fmt --check/ cargo clippy -- -D warnings / cargo test
  • gddy env info --output json returns env, apiUrl, graphqlUrl, configFile, configSummary
  • gddy env info ote is rejected (no positional)
  • With a valid godaddy.toml in cwd, configSummary is populated; without it, configFile is still set and configSummary is null

Copilot AI lite review requested due to automatic review settings August 4, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the env info command to support inspecting a specific environment without changing persisted state, and enriches the JSON output with local app manifest (godaddy*.toml) context for tooling.

Changes:

  • Extend EnvInfo output to include configFile and configSummary derived from the local manifest when present/valid.
  • Add an environment selector argument to gddy env info (defaulting to the active environment).
  • Add tests covering the new env info output fields and argument behavior, plus unit tests for manifest summarization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rust/src/env/mod.rs Outdated
Comment thread rust/src/env/mod.rs Outdated
Comment thread rust/src/env/mod.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

rust/src/env/mod.rs:40

  • The doc comment for config_context says godaddy[.env].toml, which reads like it refers to a .env file rather than the intended optional .<env> suffix. This could mislead readers about which manifest file is being summarized.
/// Path to the env's `godaddy[.env].toml` (absolute when possible), plus an
/// optional summary when the file exists and validates. Missing/invalid
/// configs yield `configSummary: null`.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

rust/src/env/mod.rs:481

  • config_summary_for_path is documented/used to treat missing and invalid manifests as a soft failure (configSummary: null), but the unit tests only cover the missing-file case. Adding a test that exercises the invalid/parse-failure path would lock in the behavior.
    #[test]
    fn config_summary_for_path_returns_none_when_missing() {
        let dir = tempfile::tempdir().expect("tempdir");
        let path = dir.path().join("godaddy.toml");
        assert!(super::config_summary_for_path(&path).is_none());
    }

rust/src/env/mod.rs:35

  • The PR description says both configFile and configSummary should be null when the local manifest is missing/invalid, but EnvInfo defines configFile as a required string and the implementation always returns a path even when the summary is null. Please align the description and implementation (either make configFile nullable/conditional, or update the description/help text to reflect that configFile is always populated with the expected manifest path).

This issue also appears on line 476 of the same file.

    "env": "string";
    "apiUrl": "string";
    "graphqlUrl": "string";
    "configFile": "string";
    "configSummary": "object|null";

@qcai-godaddy
qcai-godaddy requested a lite review from Copilot August 4, 2026 21:23
@qcai-godaddy qcai-godaddy changed the title fix(env): restore env info inspect arg and app config summary [DEVEX-715] fix(env): add app config summary to env info [DEVEX-715] Aug 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@jpage-godaddy
jpage-godaddy merged commit 9f85943 into main Aug 4, 2026
7 checks passed
@jpage-godaddy
jpage-godaddy deleted the DEVEX-715 branch August 4, 2026 22:35
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.

3 participants