Skip to content

docs(selfhost): document ams-observability and backup in the compose PROFILES header - #6109

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:docs/compose-profiles-header-drift
Jul 15, 2026
Merged

docs(selfhost): document ams-observability and backup in the compose PROFILES header#6109
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:docs/compose-profiles-header-drift

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

Summary

  • docker-compose.yml's top-of-file PROFILES comment banner — the documented entry point for "which --profile flags does this file support" — was missing two real, wired profiles: ams-observability (used by the ams-reporting-exporter service, which exports AMS/loopover-miner attempt-log/prediction-ledger data to Grafana) and backup (used by the backup and backup-exporter services). Both are already documented elsewhere (.env.example, the website docs), just not in the one place an operator is most likely to look first.
  • Adds both to the banner with a one-line description matching the existing entries' style, and realigns the whole table's description column since ams-observability is longer than any prior entry.
  • Adds a regression test (test/unit/docker-compose-profiles-header.test.ts) that parses every profiles: [...] array any service actually declares and every --profile <name> token in the header banner, and asserts the two sets are equal — so a future profile addition/removal that forgets to update the banner fails CI instead of shipping silent doc drift.
  • The new test includes both the pass case (the real file, confirmed zero drift after this fix) and two fail cases (a fixture with a declared-but-undocumented profile, and one with a documented-but-undeclared profile), proving the check actually fails when the lists diverge.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Closes #5812

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • The local machine is under persistent memory contention from multiple concurrent processes on this shared box, and the full npm run test:ci chain's local tsc --noEmit step OOM-crashes reproducibly. This PR changes zero application .ts/.js source logic — only a comment block in docker-compose.yml and one new self-contained test file (readFileSync/yaml's parse, mirroring test/unit/docker-compose-override-example.test.ts's own docker-compose.yml-parsing pattern already in the suite). What I could run locally is green: actionlint, db:migrations:check, npm audit, and the new test file plus its sibling docker-compose-override-example.test.ts in isolation via npx vitest run — all pass, including both fail-case fixtures proving the new check works. CI's validate-code/validate-tests jobs run on GitHub's own isolated runners with no such contention and will independently confirm the rest (typecheck included) before merge — the same pattern used successfully for PRs fix(selfhost): correct stale gittensory_ metric names in .env.example #6079 and fix(observability): correct LoopoverOrbExportErrorRateHigh's stale runbook metric name #6094 earlier this session.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Not applicable: this is a compose-file comment + test-only change, no UI/auth/session/API surface touched.

Notes

…PROFILES header (JSONbored#5812)

Both are real, wired --profile flags (ams-reporting-exporter and the
backup/backup-exporter services) but were missing from
docker-compose.yml's own top-of-file PROFILES banner, the first
place an operator looks to discover what --profile flags exist.
Realigns the whole table to accommodate ams-observability, the new
longest entry.

Adds a regression test (test/unit/docker-compose-profiles-header.test.ts)
that parses every profiles: [...] a service actually declares and
every --profile <name> token in the header banner, and asserts the
two sets match -- so a future profile addition/removal that forgets
the banner fails CI instead of shipping silent doc drift.
@galuis116
galuis116 requested a review from JSONbored as a code owner July 15, 2026 09:38
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-15 09:50:42 UTC

2 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a small, well-targeted docs fix that adds two missing profiles (ams-observability, backup) to the docker-compose.yml PROFILES header banner and realigns the description column formatting to accommodate the longer new entry. It's backed by a genuine regression test that parses actual service `profiles:` declarations and header `--profile` tokens and asserts set equality, with both a passing real-file case and two fabricated fixtures proving the check actually fails on drift in either direction. The change is narrowly scoped to comments and a new test file, closes a linked issue (#5812), and the diff is internally coherent with its stated intent.

Nits — 5 non-blocking
  • The header alignment realignment (docker-compose.yml:13-33) is manually maintained ASCII spacing — a future entry longer than `ams-observability` will require re-aligning the whole block by hand again; consider a generation script if this recurs.
  • test/unit/docker-compose-profiles-header.test.ts:16 `HEADER_PROFILE_TOKEN_PATTERN` assumes profile names match `[a-z0-9-]+`; if a future profile uses uppercase or underscores the regex would silently under-match rather than fail loudly.
  • The `servicesIndex` lookup in test/unit/docker-compose-profiles-header.test.ts:29 hardcodes `\nservices:` — if the top-level key is ever indented differently or preceded by other top-level keys before `services:`, the header slice could be wrong, though this is unlikely given compose file conventions.
  • Consider extracting the alignment column width as a computed constant or lint rule so future profile entries don't require manual re-padding of every line.
  • The regression test is solid; consider also asserting the header entries appear in the same relative order as service declarations for extra drift protection, though this is optional.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5812
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 1909 registered-repo PR(s), 1260 merged, 50 issue(s).
Contributor context ✅ Confirmed Gittensor contributor galuis116; Gittensor profile; 1909 PR(s), 50 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: minor
Linked issue satisfaction

Addressed
The diff adds both ams-observability and backup to the docker-compose.yml PROFILES header banner with one-line descriptions matching existing style, and adds test/unit/docker-compose-profiles-header.test.ts that parses declared profiles vs. header tokens and asserts equality, including two deliberately-broken fixture cases proving the check fails on divergence.

Review context
  • Author: galuis116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 1909 PR(s), 50 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit b2df9a1 into JSONbored:main Jul 15, 2026
14 checks passed
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.24%. Comparing base (66a0c27) to head (d51f0e0).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6109   +/-   ##
=======================================
  Coverage   95.24%   95.24%           
=======================================
  Files         595      595           
  Lines       47047    47067   +20     
  Branches    15015    15016    +1     
=======================================
+ Hits        44809    44829   +20     
  Misses       1493     1493           
  Partials      745      745           
Flag Coverage Δ
shard-1 43.96% <ø> (-0.01%) ⬇️
shard-2 36.62% <ø> (+<0.01%) ⬆️
shard-3 32.10% <ø> (+0.12%) ⬆️
shard-4 33.04% <ø> (-0.76%) ⬇️
shard-5 31.46% <ø> (-0.01%) ⬇️
shard-6 44.86% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(selfhost): docker-compose.yml PROFILES header is missing ams-observability and backup

1 participant