Skip to content

feat(#4976): store mint and inference settings in per-repo config - #5976

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/4976-mint-inference-config
Open

feat(#4976): store mint and inference settings in per-repo config#5976
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/4976-mint-inference-config

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

  • Add mint_url, inference_provider, inference_project, inference_region, and inference_wif_provider fields to per-repo config schema (ADR 0069 Decision 1)
  • Implement accessor methods (ConfigMintURL(), ConfigInferenceProvider(), etc.) on PerRepoConfigReader with layered fallback (overlay → base → code defaults) and corresponding setters on PerRepoConfigWriter
  • Wire fullsend github setup to populate mint/inference values in config: flag values go into config.yaml (no preset) or overlay (with preset), while the base layer stays identical to the fetched preset

Design

Schema fields: Flat YAML keys on perRepoConfig (mint_url, inference_provider, inference_project, inference_region, inference_wif_provider). Field names are prefixed to avoid colliding with the org-mode detection keys in IsPerRepoYAML (dispatch, inference).

Accessor pattern: Follows the existing scalar fallback convention (e.g., ConfigRuntime(), ConfigForge()): local value → parent → empty string. Code defaults in perRepoDefaults return "" for all mint/inference fields — callers that need a fallback (e.g., the CLI) use DefaultMintURL.

Installer wiring: When --config (preset) is provided, flag-specified values go into the overlay; unspecified flags inherit from the base layer via the accessor chain. The changedFlags map records which CLI flags were explicitly set.

Backward compatibility: Existing repo variable/secret writes (FULLSEND_MINT_URL, FULLSEND_GCP_REGION, FULLSEND_GCP_PROJECT_ID, FULLSEND_GCP_WIF_PROVIDER) are preserved so existing workflow templates continue to read from vars/secrets when config fields are absent.

Testing

  • Config accessor fallback: overlay → base → defaults for all 5 new fields
  • Marshal roundtrip: YAML serialize → parse → accessor match
  • Empty overlay omits inherited fields (no leak from base to overlay marshal)
  • IsPerRepoYAML correctly identifies config with new fields as per-repo (not org)
  • buildPresetOverlay correctly writes only flag-changed values
  • Validation rejects invalid inference_provider values
  • Existing tests continue to pass unchanged

Closes #4976

Post-script verification

  • Branch is not main/master (agent/4976-mint-inference-config)
  • Secret scan passed (gitleaks — fac93d227b4e30eaa553b16d059eac6624ec9fc2..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Add mint_url, inference_provider, inference_project, inference_region,
and inference_wif_provider fields to per-repo config (ADR 0069
Decision 1). These fields make the layered config the source of truth
for values previously supplied only via CLI flags and repo
variables/secrets.

Schema: new flat YAML fields on perRepoConfig with omitempty tags.
Field names avoid the org-mode detection keys (dispatch, inference)
in IsPerRepoYAML.

Accessors: ConfigMintURL(), ConfigInferenceProvider(),
ConfigInferenceProject(), ConfigInferenceRegion(),
ConfigInferenceWIFProvider() on PerRepoConfigReader with layered
fallback (overlay -> base -> code defaults). Corresponding setters
on PerRepoConfigWriter.

Installer wiring (fullsend github setup):
- No preset: mint/inference values from flags go into config.yaml.
- With preset: flag-specified values go into the overlay; the base
  layer stays identical to the fetched preset. Unspecified flags
  inherit from the base layer.

Backward compatibility: repo variable/secret writes (FULLSEND_MINT_URL,
FULLSEND_GCP_REGION, FULLSEND_GCP_PROJECT_ID, FULLSEND_GCP_WIF_PROVIDER)
are preserved so existing workflows continue to read from vars/secrets.

Note: pre-commit could not run in the sandbox (network error).
The post-script runs pre-commit authoritatively on the runner.

Closes #4976
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner August 6, 2026 12:11
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Agent PR ready for human review label Aug 6, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 6, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:13 PM UTC · Completed 12:28 PM UTC
Commit: 9492ea9 · View workflow run →

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.55319% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/config/interfaces.go 85.71% 5 Missing ⚠️
internal/cli/github.go 94.44% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

  • [architectural-coherence] internal/cli/github.go:298SetInferenceProvider("vertex") is hard-coded in the non-preset setup path with no corresponding --inference-provider CLI flag. Unlike the other four mint/inference settings, users cannot specify this value via the command line. Functionally correct today (only one valid provider), but creates flag-set asymmetry.
    Remediation: Add --inference-provider flag defaulting to "vertex", and include "inference-provider" in buildPresetOverlay's flagNames.

  • [missing-doc] docs/guides/infrastructure/layered-config-reference.md:71 — The per-field merge rules table and code defaults reference table do not document the five new config fields (mint_url, inference_provider, inference_project, inference_region, inference_wif_provider). This is the canonical layered-config reference.
    Remediation: Add entries for all five fields as scalar-override fields with empty-string code defaults.

  • [stale-doc] docs/cli/github.md:45 — CLI flags table documents --mint-url, --inference-project, etc. but does not mention that values are now persisted to .fullsend/config.yaml fields.
    Remediation: Note that flag values are written to the per-repo config file during setup.

Low

  • [data-exposure] internal/cli/github.go:300 — GCP project ID and WIF provider resource name are now in both .fullsend/config.yaml (plaintext) and GitHub repo secrets. These are resource identifiers (not credentials), and dual storage is likely transitional for backward compatibility.

  • [input-validation] internal/config/config.go:773Validate() checks inference_provider against ValidProviders() but does not validate mint_url (HTTPS), inference_wif_provider (format), or other new fields when loaded from disk. CLI validates at the flag level, but configs loaded via LoadConfig bypass those checks.

  • [design-smell] internal/config/config.go:206 — Comment claims field names are "prefixed to avoid colliding with org-mode detection keys" but names avoid collision by specificity (inference_provider vs inference), not by a shared prefix.

  • [incomplete-doc] docs/ADRs/0069-ready-made-configuration-presets.md:71 — Decision 1 doesn't specify the exact YAML field names implementing the decision.

  • [incomplete-doc] docs/guides/getting-started/configuring-github.md:62 — Setup examples don't explain where config values are stored post-installation.

  • [pattern-inconsistency] internal/config/interfaces.go:375 — Section comment block explaining the fallback pattern is more verbose than equivalent sections for existing scalar getters.

  • [comment-style] internal/config/interfaces.go:346 — ADR reference in interface getter doc comments inconsistent with other getters in the file.

  • [comment-style] internal/config/defaults.go:40 — Default getter comments more verbose than established concise pattern.

  • [incomplete-doc] docs/cli/github.md:56--config flag description doesn't explain how flag-specified mint/inference values interact with presets (overlay behavior).


Labels: PR modifies per-repo config schema and CLI setup for mint/inference settings

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.


Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • internal/cli/github.go:298: [medium] architectural-coherence

SetInferenceProvider("vertex") is hard-coded in the non-preset setup path with no corresponding --inference-provider CLI flag. Unlike the other four mint/inference settings, users cannot specify this value via the command line. Functionally correct today (only one valid provider), but creates flag-set asymmetry and prevents users from selecting a different provider if one is added to ValidProviders().

Suggested fix: Add --inference-provider flag defaulting to "vertex", and include "inference-provider" in buildPresetOverlay's flagNames list.

  • internal/cli/github.go:300: [low] data-exposure

GCP project ID and WIF provider resource name are now written to both .fullsend/config.yaml (plaintext) and GitHub repo secrets. These are resource identifiers (not credentials), and dual storage is likely transitional for backward compatibility, but the authoritative source should be clarified.

  • internal/config/config.go:773: [low] input-validation

Validate() checks inference_provider against ValidProviders() but does not validate mint_url (HTTPS), inference_wif_provider (format), or other new fields when loaded from disk. CLI validates at the flag level, but configs loaded via LoadConfig bypass those checks.

Suggested fix: Consider adding HTTPS validation for mint_url and pattern validation for inference_wif_provider in Validate().

  • internal/config/config.go (file-level): Line 206 · [low] design-smell

Comment claims field names are 'prefixed to avoid colliding with org-mode detection keys' but names avoid collision by specificity (inference_provider vs inference), not by a shared prefix.

Suggested fix: Update comment to accurately reflect the naming convention.

  • internal/config/interfaces.go (file-level): Line 375 · [low] pattern-inconsistency

Section comment block explaining the fallback pattern is more verbose than equivalent sections for existing scalar getters.

  • internal/config/interfaces.go (file-level): Line 346 · [low] comment-style

ADR reference in interface getter doc comments inconsistent with other getters in the file which don't include ADR references.

  • internal/config/defaults.go:40: [low] comment-style

Default getter comments more verbose than established concise pattern used by other default methods.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment component/install CLI install and app setup labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/install CLI install and app setup ready-for-review Agent PR ready for human review requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(config): store mint and inference settings in layered config by default (ADR 0069)

1 participant