Skip to content

Instantly share code, notes, and snippets.

@jordotech
Created February 11, 2026 19:33
Show Gist options
  • Select an option

  • Save jordotech/e3f7ac3f3f101e9e98cc976285781983 to your computer and use it in GitHub Desktop.

Select an option

Save jordotech/e3f7ac3f3f101e9e98cc976285781983 to your computer and use it in GitHub Desktop.

PR #357 Assessment: Feature Flag Registry Improvements

PR: https://github.com/Faction-V/platform-api/pull/357 Author: masha-maltseva (via Cursor) Branch: feat/BE-762-feature-flag-registry-improvementsfeature/BE-762-be-ff-enforce Files changed: 1 (src/feature_flag_registry.py, +13 / -214)


Summary of Changes

  1. Adds internal_only: bool = False field to FeatureFlagDefinition dataclass
  2. Adds 2 new feature flag definitions: composer-dashboard and chat
  3. Sets internal_only=True on sandbox-banner and env-toggle
  4. Deletes 27 composer node-level feature flags (not mentioned in PR description)

Concerns

1. Mass Deletion of 27 Composer Node Flags (Major)

The PR silently removes 27 feature flag definitions while the title and description only mention "adding" two new flags. The diff is net -201 lines. The deleted flags:

Category flags (5):

  • composer-agents, composer-data, composer-governance, composer-outputs, composer-tools

Individual node flags (9):

  • composer-agent, composer-deep-research, composer-structured-data, composer-unstructured-data-search
  • composer-guardrails, composer-evaluations, composer-human-intervention, composer-redaction

Output node flags (10):

  • composer-output-text, composer-output-json, composer-output-markdown, composer-output-powerpoint
  • composer-output-slides, composer-output-spreadsheet, composer-output-word-doc
  • composer-output-video, composer-output-text-to-speech, composer-output-data-visualization

Tool flags (4):

  • composer-tool-composio-search-finance, composer-tool-composio-search-groq-chat
  • composer-tool-composio-search-exa-answer, composer-tool-composio-search-tavily-search

Questions to answer before merging:

  • Does the frontend currently gate any UI elements behind these flags?
  • Are there orgs in DynamoDB with these flags configured? Will removing them from the registry cause startup validation warnings (main.py logs unregistered keys)?
  • If these flags are genuinely unused, the PR description should explicitly state they are being decommissioned and why.

2. internal_only Field Has No Consuming Code (Moderate)

The internal_only: bool = False field is added to the FeatureFlagDefinition dataclass, but no code reads or acts on this field. The consuming locations were checked:

File Uses Registry? Reads internal_only?
main.py (startup validation) Yes — validate_feature_key() No
cli.py (feature flag CLI) Yes — get_all_feature_flags() No
dependencies/feature_flags.py (decorator) No — uses its own FEATURE_FLAG_REGISTRY No
conftest.py (test fixtures) Yes — clears registries No

This means internal_only=True on sandbox-banner and env-toggle currently has zero effect. This is fine if consuming code is planned in a follow-up PR, but that should be noted in the description.

3. PR Description Doesn't Match the Diff (Moderate)

The description says:

  • Added composer-dashboard feature flag definition
  • Added chat feature flag definition
  • Added internal_only: bool = False field

It does not mention:

  • Removed 27 composer node-level feature flags (5 category, 9 node, 10 output, 4 tool)

For a +13/-214 line diff, the description should document the removals.

4. No Test Updates (Low)

The existing registry tests (test_feature_flag_registry.py, test_feature_flag_registry_integration.py) don't reference the deleted flags by name, so they likely still pass. However, if any test validates the total count of registered flags, it will break. Worth verifying.


What Looks Good

  • Adding composer-dashboard and chat flags that the frontend already uses is a valid gap to fill
  • The internal_only concept is sound — having global visibility control on the definition rather than per-org in DynamoDB is architecturally cleaner
  • Setting internal_only=True on sandbox-banner and env-toggle makes sense as these are internal tooling flags

Recommendations

  1. Document the flag deletions in the PR description — explain why these 27 flags are being removed and confirm frontend impact has been assessed
  2. Verify no frontend breakage — confirm the frontend doesn't gate any composer node UI behind the deleted flags
  3. Either add consuming code for internal_only in this PR, or note in the description that it's preparation for a follow-up
  4. Run the registry tests to confirm they pass with the reduced flag set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment