Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/content/docs/docs/concepts/safety-model.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: Safety Model
description: What FlagLint auto-rewrites, what it skips, and why the safety-over-coverage principle guides every pattern.
lastUpdated: 2026-06-22
lastUpdated: 2026-07-06
---

This page covers **flaglint-js**'s `migrate --apply` rewrite safety model, which is specific to the JavaScript/TypeScript CLI — flaglint-go does not have an automated migration/rewrite command (audit, scan, and validate only). See [flaglint-go's concepts docs](/docs/go/concepts/identity-model/) for the Go CLI's own safety guarantees.

Comment on lines +4 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Root files mentioning the Go concepts path:\n'
rg -n "/docs/go/concepts/identity-model/|flaglint-go's concepts docs|concepts/identity-model" src content docs . --glob '!**/node_modules/**' || true

printf '\nCandidate files under docs:\n'
git ls-files 'src/content/docs/**' | sed -n '1,200p'

printf '\nCheck whether the referenced Go docs file exists:\n'
fd -a 'identity-model\.md$|identity-model/index\.md$' src/content/docs content/docs docs 2>/dev/null || true
fd -a 'safety-model\.md$' src/content/docs content/docs docs 2>/dev/null || true

Repository: flaglint/flaglint.dev

Length of output: 3885


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Safety model excerpt:"
cat -n src/content/docs/docs/concepts/safety-model.md | sed -n '1,120p'

echo
echo "Find any Go docs files in this subtree:"
git ls-files 'src/content/docs/go/**' 'src/content/docs/docs/go/**' | sed -n '1,200p'

echo
echo "Search for the referenced route in the repo:"
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' "/docs/go/concepts/identity-model/|identity-model" src/content/docs

Repository: flaglint/flaglint.dev

Length of output: 10234


Gate the Go docs links on the Go docs section PR. The /docs/go/... target isn’t present here, so this page would ship a dead link unless the Go docs subtree lands with it. Also applies to lines 50-51.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/content/docs/docs/concepts/safety-model.md` around lines 4 - 8, The
safety-model docs page currently links to a Go docs target that does not exist
in this change, so update the content in the safety-model markdown to avoid
shipping dead `/docs/go/...` links. Gate or defer the Go documentation reference
in this page until the Go docs subtree is part of the same PR, and apply the
same treatment to the later Go docs link(s) referenced in the file so both
`flaglint-go` mentions only point to existing pages.

FlagLint is conservative by design. It separates inventory, review, and source edits so teams can inspect every migration change before it lands in production.

## Safety Model Diagram
Expand Down Expand Up @@ -45,7 +47,8 @@ When every condition is met, FlagLint produces an idempotent, argument-order-cor
| **Wrappers not configured in `.flaglintrc`** | FlagLint cannot distinguish a custom wrapper from an unrelated function unless it is explicitly declared | Add wrapper declarations to `wrappers: []` in `.flaglintrc`, then re-run |
| **Ambiguous fallback types** — e.g. `null`, a variable, or a union-typed expression | FlagLint cannot determine which `get*Value` method to use without a concrete literal type | Replace the fallback with an explicit literal (`false`, `""`, `0`, `{}`) at the call site |
| **Non-LaunchDarkly providers** | FlagLint is a LaunchDarkly-specific static analysis tool | No action; these calls are reported in the inventory but never touched |
| **Non-Node.js SDKs** — browser SDK, Go SDK, Java SDK | Only the Node.js server-side SDK import provenance is verified | Migrate browser and other-language calls manually |
| **Non-Node.js SDKs** — browser SDK, Java SDK | Only the Node.js server-side SDK import provenance is verified | Migrate browser and other-language calls manually |
| **Go SDK** | flaglint-js only verifies the Node.js server-side SDK import — Go usage is out of scope for this tool entirely | Use [flaglint-go](/docs/go/) to audit Go usage; it has no `--apply`-style rewrite yet, only `scan`/`audit`/`validate` |

## Why Fallback Value Does Not Equal Production Value

Expand Down
8 changes: 6 additions & 2 deletions src/content/docs/docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ v1.0.0 is the CI-readiness release. The core scanner and migrator are stable. Th
- **ADR 005 — Cleanup command** (DEFERRED) — documents the safe path for
automated branch removal via `--assume`/`--flag-values`; deferred until
`--assume` mechanism is designed.
- **ADR 006 — Go language support** (PROPOSED) — tree-sitter-go parser design,
import tracing for `go-server-sdk`, go.mod boundary handling, 6-phase plan.
- **ADR 006 — Go language support** (PROPOSED, later superseded) —
tree-sitter-go parser design, import tracing for `go-server-sdk`, go.mod
boundary handling, 6-phase plan. Go support ultimately shipped as a
separate project, [flaglint-go](https://github.com/flaglint/flaglint-go),
built around Go's native `go/parser`/`go/ast` instead of tree-sitter — see
[flaglint-go's docs](/docs/go/).
Comment on lines +78 to +83

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

git ls-files src/content/docs | sed -n '1,200p'

Repository: flaglint/flaglint.dev

Length of output: 2830


🏁 Script executed:

rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' '/docs/go/|flaglint-go|Go language support|go/parser|go/ast' src/content/docs

Repository: flaglint/flaglint.dev

Length of output: 1646


🏁 Script executed:

git ls-files | sed -n '1,200p'

Repository: flaglint/flaglint.dev

Length of output: 3564


🏁 Script executed:

sed -n '1,220p' public/_redirects && printf '\n---\n' && sed -n '1,240p' src/content.config.ts && printf '\n---\n' && sed -n '1,220p' astro.config.mjs

Repository: flaglint/flaglint.dev

Length of output: 7216


Hold the /docs/go/ link for now
src/content/docs/docs/reference/changelog.md:83 points to a page that doesn’t exist in this site yet, so this changelog entry would publish a 404.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/content/docs/docs/reference/changelog.md` around lines 78 - 83, The
changelog entry in the ADR 006 section should not publish a broken internal link
to the nonexistent Go docs page. Update the markdown in the changelog to either
remove the `/docs/go/` link or replace it with a non-link placeholder until the
target page exists, keeping the surrounding text in the same `ADR 006 — Go
language support` entry.


### Fixed

Expand Down
7 changes: 5 additions & 2 deletions src/content/docs/docs/reference/supported-scope.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: Supported Scope
description: What FlagLint detects, migrates, reports for manual review, and excludes.
lastUpdated: 2026-07-01
lastUpdated: 2026-07-06
---

This page covers **flaglint-js**, the JavaScript/TypeScript CLI. For the Go CLI's supported scope, see [flaglint-go: Supported Scope](/docs/go/reference/supported-scope/).

Comment on lines +4 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the docs-related files and routes.
git ls-files | rg '^(src/content/docs|astro|docs|src/pages|src/content).*$'

# Look for references to the Go docs base path and supported-scope page.
rg -n "/docs/go/|supported-scope|flaglint-go" src/content docs astro src/pages . 2>/dev/null || true

Repository: flaglint/flaglint.dev

Length of output: 6898


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the docs collection and any routing/redirects for a Go docs section.
sed -n '1,220p' astro.config.mjs
printf '\n--- src/content.config.ts ---\n'
sed -n '1,220p' src/content.config.ts
printf '\n--- public/_redirects ---\n'
sed -n '1,120p' public/_redirects 2>/dev/null || true

printf '\n--- go docs files ---\n'
fd -t f '.*' src/content/docs | rg '/go/'

Repository: flaglint/flaglint.dev

Length of output: 7287


Gate the Go docs links until that section exists.
/docs/go/ and /docs/go/reference/supported-scope/ aren’t routed in this site yet, so they’ll 404 until the Go docs pages land.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/content/docs/docs/reference/supported-scope.md` around lines 4 - 8, The
supported-scope doc currently links to the Go docs before those routes exist,
causing broken navigation. Update the content in the supported-scope page so the
Go CLI reference link is gated or omitted until the Go docs section is actually
added, using the existing supported-scope page content as the place to adjust
the cross-link.

FlagLint currently supports LaunchDarkly Node.js server-side SDK evaluation calls in JavaScript and TypeScript from:

- `@launchdarkly/node-server-sdk`
Expand All @@ -30,7 +32,8 @@ React SDK hooks, HOC, and provider are detected and reported for manual review.
| React SDK hooks (`useFlags`, `useLDClient`, `useVariation`) | Yes | No | Yes | No |
| React SDK HOC (`withLDConsumer`) | Yes | No | Yes | No |
| React SDK provider (`LDProvider`, `asyncWithLDProvider`) | Yes | No | Yes | No |
| Go, Java, Python, or other SDKs | No | No | No | Yes |
| Go SDK | Handled by the separate [flaglint-go](/docs/go/) CLI | — | — | — |
| Java, Python, or other SDKs | No | No | No | Yes |
| Non-LaunchDarkly providers | No | No | No | Yes |

## Supported Import Provenance
Expand Down
Loading