You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'main' into feat/profile-content-diff
Resolves the conflicts with the no-team diff (#56):
- internal/api/client.go: keep this branch's GetProfileContent and
EnrichProfileContents alongside main's updated GetScripts doc comment.
- internal/api/client_test.go and internal/diff/differ_test.go: both branches
appended tests, so git interleaved them. Rebuilt from main's file plus this
branch's blocks; every test function from both sides is present.
- internal/diff/differ.go: the no-team profile diff added in #56 now passes
the profile enricher through, so profiles on hosts with no team get the same
content-level diff as any team's. Covered by TestDiffNoTeamProfileContent.
Verified against the live Fleet instance: the real no-team file diffs clean,
and a locally modified profile still reports its changed key by name.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEpzMNJnGaBLAfrPeqknCy
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ go vet ./...
15
15
golangci-lint run
16
16
```
17
17
18
-
Coverage target: >= 75% per package, enforced by `codecov.yml`. Current: 83.8%
18
+
Coverage target: >= 75% per package, enforced in CI by `scripts/coverage-floor.sh`. Current: 84.7%
19
19
overall, every package at or above 78.9%. All packages have `_test.go`. Tests use `testdata/` as a shared fleet-gitops fixture. Table-driven throughout.
|`GET`|`/api/v1/fleet/global/policies`| Global policies (when default.yml parsed) |
12
+
|`GET`|`/api/v1/fleet/teams/0/policies`| Policies for hosts on no team (when the repo has a no-team file) |
12
13
|`GET`|`/api/v1/fleet/queries`| Per-team and global queries |
13
14
|`GET`|`/api/v1/fleet/configuration_profiles`| MDM configuration profiles (list includes each profile's checksum) |
14
15
|`GET`|`/api/v1/fleet/configuration_profiles/{uuid}?alt=media`| Profile content, for key-level diffing (only when the checksum differs) |
@@ -20,4 +21,6 @@ All read-only. fleet-plan never writes to your Fleet server.
20
21
21
22
Global endpoints (`/config`, `/global/policies`, `/queries` with teamID=0) are only called when `default.yml` defines global sections.
22
23
24
+
The "hosts on no team" bucket is fetched only when the repo has a no-team file (`teams/no-team.yml` or `fleets/unassigned.yml`). Its resources live behind `team_id=0` on `/configuration_profiles` and `/scripts`, and behind `/teams/0/policies` for policies — note that `/global/policies` is a *different* set. Fleet does not report configured software for this bucket, so software is not diffed there.
Copy file name to clipboardExpand all lines: docs/Architecture.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,8 @@ Walks `teams/*.yml`, resolves `path:` references, produces `ParsedRepo`. Also pa
89
89
90
90
Compares `FleetState` (API) vs `ParsedRepo` (YAML). Produces `[]DiffResult` per team + a `(global)` result when `default.yml` is present.
91
91
92
+
Fleet's "hosts on no team" bucket is absent from `GET /teams`, so it is fetched separately (`team_id=0`) and diffed like any other team for policies, profiles, and scripts, baseline subtraction included. Software and queries are reported as skipped there: Fleet exposes configured software only through the teams list, and scopes queries to a real team or the global scope. When the bucket was not fetched, the diff falls back to summarizing what the repo configures for it.
@@ -157,4 +159,4 @@ This mirrors how fleet-gitops environment overlays work. The merged result is wr
157
159
go test -race ./...
158
160
```
159
161
160
-
All packages have `_test.go`. Tests use `testdata/` as a shared fleet-gitops fixture. Table-driven throughout. Coverage target: >= 75% per package, enforced by `codecov.yml` (current: 83.8% overall, lowest package 78.9%).
162
+
All packages have `_test.go`. Tests use `testdata/` as a shared fleet-gitops fixture. Table-driven throughout. Coverage target: >= 75% per package, enforced in CI by `scripts/coverage-floor.sh` (current: 84.7% overall, lowest package 78.9%).
0 commit comments