Skip to content

docs: add feature flag fail-modes reference and consolidate ADRs#832

Open
maskarb wants to merge 1 commit intomainfrom
docs/feature-flag-fail-modes
Open

docs: add feature flag fail-modes reference and consolidate ADRs#832
maskarb wants to merge 1 commit intomainfrom
docs/feature-flag-fail-modes

Conversation

@maskarb
Copy link
Contributor

@maskarb maskarb commented Mar 6, 2026

  • Add fail-modes.md documenting which evaluation methods fail open vs closed, where each is used, and the full evaluation precedence
  • Move unleash ADR from components/backend/docs/adr/ to docs/internal/adr/ as ADR-0007 (0006 was already taken)
  • Update ADR status from Proposed to Accepted, add sections for fail modes, model/runner feature gates, and flag sync at startup
  • Fix incorrect "all flags disabled" claims in README and unleash guide to distinguish fail-closed (general) vs fail-open (model) behavior
  • Update unleash guide with workspace override docs, full API endpoint list, Unleash server UI access instructions, and correct navigation path for the workspace feature flags panel
  • Fix stale relative links in runner README and ADR

- Add fail-modes.md documenting which evaluation methods fail open vs
  closed, where each is used, and the full evaluation precedence
- Move unleash ADR from components/backend/docs/adr/ to
  docs/internal/adr/ as ADR-0007 (0006 was already taken)
- Update ADR status from Proposed to Accepted, add sections for fail
  modes, model/runner feature gates, and flag sync at startup
- Fix incorrect "all flags disabled" claims in README and unleash guide
  to distinguish fail-closed (general) vs fail-open (model) behavior
- Update unleash guide with workspace override docs, full API endpoint
  list, Unleash server UI access instructions, and correct navigation
  path for the workspace feature flags panel
- Fix stale relative links in runner README and ADR

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Claude Code Review

Summary

This is a docs-only PR that consolidates ADRs into a single canonical location (docs/internal/adr/), renames and renumbers the Unleash ADR from 0006 to 0007 (since ADR-0006 was already taken by the Ambient Runner SDK architecture), promotes it from Proposed to Accepted, and adds a detailed fail-modes.md reference documenting the fail-open vs fail-closed behavior of every feature flag evaluation method. The changes are accurate, well-structured, and close a real documentation gap. No production code is changed.

Issues by Severity

Blocker Issues

None

Critical Issues

None

Major Issues

None

Minor Issues

1. Duplicate step number in feature-flags-unleash.md

File: docs/internal/feature-flags/feature-flags-unleash.md

The "Using the Admin UI" numbered list has two step 4. items. The second 4. should be 5., and the remaining items renumbered to 6. and 7.. Copy-paste formatting slip.


2. Hard-coded line numbers in fail-modes.md will go stale

File: docs/internal/feature-flags/fail-modes.md

The tables reference exact line numbers such as featureflags/featureflags.go:44, handlers/models.go:149, handlers/runner_types.go:204,208,213, etc. These are useful now but will silently mislead future readers as code evolves. Suggested fix: drop line numbers and keep only file + function name, or add a note like "line numbers accurate as of this writing". Function names alone are sufficient for navigability.

Positive Highlights

  • fail-modes.md is an excellent addition. The fail-open vs fail-closed distinction for model flags (IsModelEnabled) vs general flags (IsEnabled) is non-obvious and was previously undocumented. The evaluation precedence table and the Special Cases section (default runner fail-open, default model bypass, manifest unavailable edge case) are particularly thorough.
  • Correction of the inaccurate "all flags disabled" claim. The previous docs incorrectly stated all flags default to false when Unleash is unavailable. The updated wording accurately distinguishes the two fail modes and links to the new reference. This prevents future confusion when a model flag stays active during an Unleash outage.
  • Clean ADR consolidation. Moving the Unleash ADR out of components/backend/docs/adr/ into the canonical docs/internal/adr/ location, renumbering correctly, and promoting status from Proposed to Accepted is good housekeeping. Deleting the now-redundant components/backend/docs/adr/README.md avoids a stale index.
  • Workspace override docs are now complete. The updated unleash guide covers the three-tier evaluation precedence, the new API endpoints (/override PUT/DELETE, /enable, /disable), the workspace-configurable tag system, and the corrected navigation path to the workspace feature flags panel.

Recommendations

  1. (Minor) Fix the duplicate step 4. in the "Using the Admin UI" list in feature-flags-unleash.md.
  2. (Minor) Remove or caveat the hard-coded line numbers in fail-modes.md to prevent silent staleness.
  3. No blocking issues. The PR is otherwise ready to merge.

Reviewed by Claude Code using repository standards from .claude/context/ and .claude/patterns/.


🔍 View AI decision process (logs available for 90 days)

📋 View memory system files loaded (click to expand)

What Amber Loaded for Code Review

Amber automatically loaded these repository standards from the memory system:

  1. CLAUDE.md - Master project instructions, development standards
  2. backend-development.md - Go backend, K8s integration patterns
  3. frontend-development.md - NextJS, Shadcn UI, React Query patterns
  4. security-standards.md - Auth, RBAC, token handling
  5. k8s-client-usage.md - User token vs service account patterns
  6. error-handling.md - Consistent error patterns
  7. react-query-usage.md - Data fetching patterns

Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines.

@ambient-code ambient-code bot modified the milestone: Merge Queue Mar 10, 2026
@ambient-code
Copy link
Contributor

ambient-code bot commented Mar 11, 2026

🚦 Review Queue Status

This PR has 1 blocker(s) preventing merge:

Action Needed

Address minor formatting issues (duplicate step 4, line number staleness caveat) or merge as-is


This comment is posted by the Review Queue workflow. It will update when blockers change.

@ambient-code ambient-code bot modified the milestones: Merge Queue, Review Queue Mar 12, 2026
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