Skip to content

docs(vtex-io-app-settings): cover major-version scoping of saved settings - #89

Open
mateussaggin wants to merge 1 commit into
mainfrom
docs/app-settings-major-version-scoping
Open

docs(vtex-io-app-settings): cover major-version scoping of saved settings#89
mateussaggin wants to merge 1 commit into
mainfrom
docs/app-settings-major-version-scoping

Conversation

@mateussaggin

Copy link
Copy Markdown
Contributor

Summary

The vtex-io-app-settings skill did not mention that saved app settings are scoped to the app's major version range. This gap matters because the failure is silent.

Settings persist across minor and patch releases, but a new major starts from an empty settings object. Nothing errors — the app simply reads settingsSchema defaults — so a flag that gated a behavior reverts to its default and the feature turns off for every merchant with no signal that anything changed. Reading settings at runtime hides the distinction entirely, because getAppSettings(process.env.VTEX_APP_ID) resolves vtex.my-app@3.6.1 to the 3.x scope automatically.

This came out of a real investigation on a B2B app where feature flags gate session-transform behavior, and the question "what happens to merchant config when we release?" had no answer in the skill.

How the scoping was verified

Queried the Apps API for the same installed app with different locators. Only the major range resolves:

Locator Result
vtex.<app>@3.6.1 app_not_found
vtex.<app>@3.0.0 app_not_found
vtex.<app>@3.x returns the saved settings
vtex.<app> (no version) returns the saved settings

What changed

Edited the source at tracks/vtex-io/skills/vtex-io-app-settings/skill.md, then regenerated artifacts with bun run export and replicated the CI sync steps (rules/ from exports/cursor/, skills/ from exports/opencode/).

  • Decision rules — settings are keyed by major; pick defaults that are safe when the value is absent; use version-independent storage for values that must outlive a major; plan a re-apply step into the upgrade runbook.
  • New hard constraint — "Settings must not be assumed to survive a major version bump", with Why / Detection and paired Correct / Wrong examples following the existing section format.
  • Common failure modes — three entries on silent reverts, non-fail-safe defaults, and kill switches living only in settingsSchema.
  • Review checklist — two items on fail-safe defaults and major-bump planning.

No existing guidance was changed or removed; the diff is additive (+742, no deletions).

Test plan

  • bun run validatevtex-io-app-settings passes 13/13 checks
  • bun run export completes; regenerated artifacts committed
  • CI's up-to-date check reproduced locally (rules/*.mdc from exports/cursor/, skills/ from exports/opencode/) so git diff exports/ rules/ skills/ is clean against the committed tree
  • Pre-commit hook validation passed (44 passed, 1 pre-existing warning on faststore-storefront, untouched here)

…ings

Saved app settings are addressed by the app's major version range, so they
persist across minor and patch releases but start empty on a new major. This
was missing from the skill, and it fails quietly: the app just reads schema
defaults, so a flag that gated a behavior reverts and the feature silently
turns off for every merchant with no error to detect.

Verified against the Apps API, where only the major locator resolves:
vtex.<app>@3.x returns the saved settings while @3.6.1 and @3.0.0 both
return app_not_found.

Adds decision rules, a hard constraint with paired examples, failure modes
and checklist items covering fail-safe defaults, re-applying settings during
a major upgrade, and keeping kill switches in version-independent storage.
@vtex-pr-sentinel

Copy link
Copy Markdown

🛡️ SDD Check — action required

I couldn't detect an SDD in this PR. Please check one option below (requires write access to the repo):

  • SDD lives in another PR — paste the SDD PR URL here:
  • This PR doesn't need an SDD
  • SDD applies, but I'm not adopting it in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Validation passed — all checks OK

Full validation output
$ bun run scripts/validate.ts --ci
Validating 45 skill files (9 hard, 4 soft checks)...

✅ tracks/masterdata/skills/masterdata-storage-strategy/skill.md — 13/13 checks passed
✅ tracks/headless/skills/headless-checkout-proxy/skill.md — 13/13 checks passed
✅ tracks/headless/skills/headless-caching-strategy/skill.md — 13/13 checks passed
✅ tracks/headless/skills/headless-intelligent-search/skill.md — 13/13 checks passed
✅ tracks/headless/skills/headless-bff-architecture/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-auth-tokens-and-context/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-react-apps/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-service-configuration-apps/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-graphql-api/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-render-runtime-and-blocks/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-events-and-workers/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-session-apps/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-http-routes/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-service-paths-and-cdn/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-service-runtime/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-observability-and-ops/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-messages-and-i18n/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-masterdata-strategy/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-client-integration/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-rbac/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-service-apps/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-storefront-react/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-app-contract/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-auth-and-policies/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-app-settings/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-admin-react/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-data-access-patterns/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-security-boundaries/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-rootpath/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-storefront-theme-versioning/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-storefront-theme-app/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-application-performance/skill.md — 13/13 checks passed
✅ tracks/vtex-io/skills/vtex-io-masterdata/skill.md — 13/13 checks passed
⚠️  tracks/faststore/skills/faststore-storefront/skill.md — 10/13 checks passed (3 warnings)
   WARN: [required-sections] — Missing required H2 section: "## When this skill applies"
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=required-sections::Missing required H2 section: "## When this skill applies"
   WARN: [required-sections] — Missing required H2 section: "## Decision rules"
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=required-sections::Missing required H2 section: "## Decision rules"
   WARN: [required-sections] — Missing required H2 section: "## Hard constraints"
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=required-sections::Missing required H2 section: "## Hard constraints"
   WARN: [required-sections] — Missing required H2 section: "## Preferred pattern"
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=required-sections::Missing required H2 section: "## Preferred pattern"
   WARN: [required-sections] — Missing required H2 section: "## Common failure modes"
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=required-sections::Missing required H2 section: "## Common failure modes"
   WARN: [required-sections] — Missing required H2 section: "## Review checklist"
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=required-sections::Missing required H2 section: "## Review checklist"
   WARN: [detection-patterns] — No "Detection" or "**Detection**" pattern found in content
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=detection-patterns::No "Detection" or "**Detection**" pattern found in content
   WARN: [paired-examples] — Missing correct example marker (✅ or **Correct**)
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=paired-examples::Missing correct example marker (✅ or **Correct**)
   WARN: [paired-examples] — Missing incorrect example marker (❌ or **Wrong**)
::warning file=tracks/faststore/skills/faststore-storefront/skill.md,title=paired-examples::Missing incorrect example marker (❌ or **Wrong**)
✅ tracks/payment/skills/payment-async-flow/skill.md — 13/13 checks passed
✅ tracks/payment/skills/payment-provider-protocol/skill.md — 13/13 checks passed
✅ tracks/payment/skills/payment-idempotency/skill.md — 13/13 checks passed
✅ tracks/payment/skills/payment-provider-framework/skill.md — 13/13 checks passed
✅ tracks/payment/skills/payment-pci-security/skill.md — 13/13 checks passed
✅ tracks/marketplace/skills/marketplace-fulfillment/skill.md — 13/13 checks passed
✅ tracks/marketplace/skills/marketplace-rate-limiting/skill.md — 13/13 checks passed
✅ tracks/marketplace/skills/marketplace-order-hook/skill.md — 13/13 checks passed
✅ tracks/marketplace/skills/marketplace-catalog-sync/skill.md — 13/13 checks passed
✅ tracks/sales-app/skills/sales-app-extensibility/skill.md — 13/13 checks passed
✅ tracks/architecture/skills/architecture-well-architected-commerce/skill.md — 13/13 checks passed

Summary: 44 passed, 1 warned (45 total)

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.

1 participant