Skip to content

[docs] : docs for source of truth - #4499

Merged
akshaydeo merged 1 commit into
devfrom
06-17-_docs_docs_for_source_of_truth
Jun 18, 2026
Merged

[docs] : docs for source of truth#4499
akshaydeo merged 1 commit into
devfrom
06-17-_docs_docs_for_source_of_truth

Conversation

@Madhuvod

Copy link
Copy Markdown
Contributor

Summary

Briefly explain the purpose of this PR and the problem it solves.

Changes

  • What was changed and why
  • Any notable design decisions or trade-offs

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

Describe the steps to validate this change. Include commands and expected outcomes.

# Core/Transports
go version
go test ./...

# UI
cd ui
pnpm i || npm i
pnpm test || npm test
pnpm build || npm run build

If adding new configs or environment variables, document them here.

Screenshots/Recordings

If UI changes, add before/after screenshots or short clips.

Breaking changes

  • Yes
  • No

If yes, describe impact and migration instructions.

Related issues

Link related issues and discussions. Example: Closes #123

Security considerations

Note any security implications (auth, secrets, PII, sandboxing, etc.).

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@Madhuvod
Madhuvod marked this pull request as ready for review June 17, 2026 14:03

Madhuvod commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4066ffd0-9808-4bf8-8b47-cb3950479400

📥 Commits

Reviewing files that changed from the base of the PR and between 8ae4dae and 437c624.

📒 Files selected for processing (10)
  • docs/deployment-guides/config-json.mdx
  • docs/deployment-guides/config-json/governance.mdx
  • docs/deployment-guides/config-json/plugins.mdx
  • docs/deployment-guides/config-json/providers.mdx
  • docs/deployment-guides/config-json/schema-reference.mdx
  • docs/deployment-guides/config-json/source-of-truth.mdx
  • docs/deployment-guides/config-json/storage.mdx
  • docs/deployment-guides/helm/governance.mdx
  • docs/docs.json
  • docs/quickstart/gateway/setting-up.mdx
✅ Files skipped from review due to trivial changes (10)
  • docs/docs.json
  • docs/deployment-guides/config-json/governance.mdx
  • docs/deployment-guides/helm/governance.mdx
  • docs/deployment-guides/config-json/providers.mdx
  • docs/deployment-guides/config-json/storage.mdx
  • docs/deployment-guides/config-json.mdx
  • docs/deployment-guides/config-json/plugins.mdx
  • docs/deployment-guides/config-json/source-of-truth.mdx
  • docs/quickstart/gateway/setting-up.mdx
  • docs/deployment-guides/config-json/schema-reference.mdx

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated configuration management guidance to clarify three setup scenarios: web UI with database, DB-backed config.json, and file-only config.json.
    • Added/expanded “Source of Truth” and reconciliation notes, including default reconciliation behavior and the effects of missing vs empty sections.
    • Enhanced deployment guides for governance, plugins, providers, and storage configuration.
    • Updated Helm and quickstart guides with clearer configuration-mode explanations and corrected setting references.
    • Extended the schema reference to document version and source_of_truth, including current empty-array semantics and reconciliation notes.
    • Added a new navigation entry for the “source-of-truth” config.json guide.

Walkthrough

Adds a new source-of-truth.mdx deployment guide page explaining config.json reconciliation with the config store via split and config.json modes and config_hash behavior. Updates overview, quickstart, schema reference, storage, Helm governance, and per-section docs (governance, plugins, providers) to align with the new three-source configuration model.

Changes

Source of Truth & Reconciliation Documentation

Layer / File(s) Summary
New source-of-truth reference page
docs/deployment-guides/config-json/source-of-truth.mdx
New page covering file-only vs DB-backed setups, default split mode seeding/hashing/preservation flow, config.json authoritative mode, missing vs empty section pruning semantics, and a recommended-use table.
Schema reference: version and source_of_truth entries
docs/deployment-guides/config-json/schema-reference.mdx
Adds version row to Top-Level Keys table and inserts a new source_of_truth section with mode contrast, missing/empty section semantics, and a JSON pruning example.
Overview and quickstart updates
docs/deployment-guides/config-json.mdx, docs/quickstart/gateway/setting-up.mdx
Replaces two-mode framing with a three-source Configuration Sources section; rewrites quickstart Configuration Modes with DB-backed reconciliation rules, config_store bootstrap/hash semantics, and file-only mode details.
Per-section reconciliation notes
docs/deployment-guides/config-json/governance.mdx, .../plugins.mdx, .../providers.mdx
Inserts <Note> blocks in governance, plugins, and providers docs explaining split vs config.json reconciliation, hash-based preservation, empty-array pruning, and links to the new reconciliation page.
Storage clarifications, Helm fix, and nav entry
docs/deployment-guides/config-json/storage.mdx, docs/deployment-guides/helm/governance.mdx, docs/docs.json
Rewords storage docs to clarify omitted config_store creates SQLite and enabled: false means file-only; fixes Helm governance sourceOfTruth key path and adds link; registers the new page in docs navigation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • maximhq/bifrost#3722: Updates the same docs/quickstart/gateway/setting-up.mdx file with overlapping config.json vs config_store/DB reconciliation and content-hash semantics changes.

Suggested reviewers

  • akshaydeo
  • danpiths

Poem

🐇 Hop, hop, through the config maze,
Split or truth — two separate ways!
A hash preserved, a row in store,
Empty arrays prune what came before.
The rabbit writes the docs today,
So deployments find their way! 🗂️

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (3 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is entirely an unfilled template with no substantive content in any sections—no summary, changes explanation, or details about the documentation updates. Complete the PR description by filling in the Summary, Changes, and Related Issues sections with details about the source of truth documentation being added.
Linked Issues check ⚠️ Warning The linked issue #123 requests Files API support for OpenAI/Anthropic, but the PR changes document config.json source of truth reconciliation—completely unrelated topics. Verify the correct issue is linked or clarify if this PR should address a different issue related to config.json documentation.
Out of Scope Changes check ⚠️ Warning The PR adds comprehensive documentation about config.json reconciliation and source of truth behavior, which is out of scope relative to the linked issue #123 about Files API support. Ensure the PR is linked to the appropriate issue(s) related to config.json documentation, not the Files API implementation issue.
Title check ❓ Inconclusive The title '[docs] : docs for source of truth' is vague and generic, using non-specific language like 'docs for' without clarifying the actual documentation topic or changes. Make the title more specific and descriptive, e.g., 'Document config.json source of truth reconciliation behavior' to clearly convey the documentation's purpose.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 06-17-_docs_docs_for_source_of_truth

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 17, 2026
@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

Documentation-only change; the one incorrect Helm field name left in complexity-router.mdx would cause users to silently set a no-op value.

The Helm field correction in helm/governance.mdx was not applied to the same stale reference in docs/features/governance/complexity-router.mdx, where bifrost.governance.sourceOfTruth remains. A user following the complexity-router guide and copying that snippet will set a field the chart does not recognise, with no effect on governance state.

docs/features/governance/complexity-router.mdx — still references the old field name bifrost.governance.sourceOfTruth that was corrected elsewhere in this PR.

Important Files Changed

Filename Overview
docs/deployment-guides/config-json/source-of-truth.mdx New page documenting split vs config.json reconciliation modes, missing-vs-empty section semantics, and recommended setups. Content is accurate and consistent with config.schema.json.
docs/deployment-guides/config-json.mdx Rewrites the configuration modes table to distinguish file-only vs DB-backed config.json and links to the new source-of-truth page. Accurate.
docs/deployment-guides/helm/governance.mdx Corrects Helm field name from bifrost.governance.sourceOfTruth to bifrost.sourceOfTruth (matching values.yaml) and adds link to new source-of-truth page.
docs/deployment-guides/config-json/schema-reference.mdx Adds source_of_truth and version to the top-level key table and expands the source_of_truth section with examples. Consistent with config.schema.json.
docs/quickstart/gateway/setting-up.mdx Restructures the configuration modes section to clarify omitting config_store doesn't mean file-only mode, and adds a file-only mode example. Accurate.
docs/deployment-guides/config-json/plugins.mdx Adds reconciliation note for plugins; the description of split mode triggers (higher version or changed placement/order) is consistent with configstore/rdb.go implementation.
docs/docs.json Adds source-of-truth page to navigation in the correct position under config-json.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Bifrost startup] --> B{config.json present?}
    B -- No --> C[Default SQLite store\nUI/API edits enabled]
    B -- Yes --> D{config_store.enabled?}
    D -- false --> E[File-only memory load\nUI config unavailable\nRestart required]
    D -- true / omitted --> F{source_of_truth?}
    F -- split default --> G[Hash-compare each entity\nUnchanged hash keep DB edits\nChanged hash apply file version\nDB-only rows preserved]
    F -- config.json --> H[Present sections authoritative\nApplied even if hash matches\nMissing section DB rows untouched\nEmpty section prunes DB rows]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Bifrost startup] --> B{config.json present?}
    B -- No --> C[Default SQLite store\nUI/API edits enabled]
    B -- Yes --> D{config_store.enabled?}
    D -- false --> E[File-only memory load\nUI config unavailable\nRestart required]
    D -- true / omitted --> F{source_of_truth?}
    F -- split default --> G[Hash-compare each entity\nUnchanged hash keep DB edits\nChanged hash apply file version\nDB-only rows preserved]
    F -- config.json --> H[Present sections authoritative\nApplied even if hash matches\nMissing section DB rows untouched\nEmpty section prunes DB rows]
Loading

Reviews (3): Last reviewed commit: "[docs] : docs for source of truth" | Re-trigger Greptile

Comment thread docs/quickstart/gateway/setting-up.mdx
Comment thread docs/deployment-guides/config-json/source-of-truth.mdx
@Madhuvod
Madhuvod force-pushed the 06-17-_docs_docs_for_source_of_truth branch from 4604a6f to 8ae4dae Compare June 18, 2026 08:09
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 18, 2026
@Madhuvod
Madhuvod force-pushed the 06-17-_docs_docs_for_source_of_truth branch from 8ae4dae to 437c624 Compare June 18, 2026 08:22

akshaydeo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Jun 18, 9:26 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 18, 9:26 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo merged commit ebe97ea into dev Jun 18, 2026
16 checks passed
@akshaydeo
akshaydeo deleted the 06-17-_docs_docs_for_source_of_truth branch June 18, 2026 09:26
@coderabbitai coderabbitai Bot mentioned this pull request Jun 18, 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.

Files API Support

2 participants