docs(ams): port docs/env-reference.md to a generated website docs page (docs.ams-env-reference.tsx) - #6385
Conversation
…e (docs.ams-env-reference.tsx) Extend packages/loopover-miner/scripts/generate-env-reference.mjs to also emit apps/loopover-ui/src/lib/ams-env-reference.ts (AMS_ENV_REFERENCE_ROWS + AMS_ENV_REFERENCE_MARKDOWN), mirroring scripts/gen-selfhost-env-reference.mjs's renderSelfHostEnvReferenceModule exactly. npm run miner:env-reference(:check) now writes/verifies both the existing markdown doc and the new TS module, so a new LOOPOVER_MINER_*/MINER_* read still fails CI drift-check until both are regenerated. packages/loopover-miner/docs/env-reference.md is untouched in content (still generator-owned, "do not edit manually") and stays the canonical source shipped in the npm package. Add content/docs/ams-env-reference.mdx, which imports AMS_ENV_REFERENCE_MARKDOWN and renders it via <CodeBlock>, the same pattern docs.self-hosting-configuration.tsx already uses for SELFHOST_ENV_REFERENCE_MARKDOWN -- not a hand-copied table. Add the page to docs-nav.tsx's "AMS: deployment" subgroup and to docs.index.tsx's Maintainers audience card, and repoint ams-operations-runbook.mdx's and ams-config-precedence.mdx's GitHub-blob env-reference.md cross-references to the new in-app route. Extend test/unit/miner-env-reference-script.test.ts with module-generation and drift-detection tests mirroring test/unit/selfhost-env-reference-script.test.ts.
… module-generation exports Root tsc --noEmit resolves types for generate-env-reference.mjs from its hand-maintained .d.mts sidecar, not from the .mjs source -- the sidecar was missed when renderMinerEnvReferenceModule/writeMinerEnvReferenceModule/ DEFAULT_MODULE_OUTPUT_PATH were added, so root typecheck failed with "has no exported member" even though the .mjs implementation was correct.
…eration time The project's Prettier config prefers double quotes (singleQuote: false) but still switches a given string to single quotes when that needs fewer escapes. Every markdown line whose row has a quoted-string defaultValue (rendered as `""` / `"production"` in the table) embeds literal double quotes, so JSON.stringify-ing that line (always double-quoted) produced output ui:lint's prettier/prettier rule immediately flagged as needing single-quote reformatting -- and since this file is generated, a one-off --fix would just be undone by the next `npm run miner:env-reference`. Replicate Prettier's fewer-escapes quote choice in the generator itself (quoteJsStringLiteral), so a fresh run's output is already lint-clean.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6385 +/- ##
=======================================
Coverage 95.60% 95.60%
=======================================
Files 599 599
Lines 47238 47238
Branches 15031 15031
=======================================
Hits 45160 45160
Misses 1291 1291
Partials 787 787
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-16 06:00:46 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual previewClick any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 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.
|








Summary
packages/loopover-miner/scripts/generate-env-reference.mjsto also emitapps/loopover-ui/src/lib/ams-env-reference.ts(AMS_ENV_REFERENCE_ROWS+AMS_ENV_REFERENCE_MARKDOWN), mirroringscripts/gen-selfhost-env-reference.mjs'srenderSelfHostEnvReferenceModuleexactly.npm run miner:env-reference(:check) now writes/verifies both the existing markdown doc and the new TS module, so a newLOOPOVER_MINER_*/MINER_*read still fails CI drift-check until both are regenerated.packages/loopover-miner/docs/env-reference.mdis untouched in content (still generator-owned, "do not edit manually") and stays the canonical source shipped in the npm package.content/docs/ams-env-reference.mdx, which importsAMS_ENV_REFERENCE_MARKDOWNand renders it via<CodeBlock>— the same patterndocs.self-hosting-configuration.tsxalready uses forSELFHOST_ENV_REFERENCE_MARKDOWN— not a hand-copied table, per the issue's explicit requirement.apps/loopover-ui/src/routes/docs.ams-env-reference.tsx, a thin loader +docsClientLoaderroute matching every other migrated docs page.docs-nav.tsx's "AMS: deployment" subgroup and todocs.index.tsx's Maintainers audience card, and repointsams-operations-runbook.mdx's andams-config-precedence.mdx's GitHub-blobenv-reference.mdcross-references to the new in-app route.test/unit/miner-env-reference-script.test.tswith module-generation, Prettier-quoting, and drift-detection tests mirroringtest/unit/selfhost-env-reference-script.test.ts.packages/loopover-miner/scripts/generate-env-reference.d.mts(a hand-maintained sidecar declaration file) gained declarations for the new exports, and the generator's markdown-line embedding now replicates Prettier's fewer-escapes quote choice so its own output is already lint-clean.This is a resubmission of #6376, which was auto-closed on a CI-only failure (
Cannot find module 'collections/browser') — a known cache-hit gap invalidate-code's dependency-restore step, unrelated to this page's content. The maintainer's own PR #6375 (merged) fixes it at the CI-workflow level by regenerating fumadocs collections unconditionally; this branch is rebased on top of that fix.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally —packages/loopover-miner/scripts/**is outside vitest's coverage-collection scope (onlysrc/**,packages/loopover-engine/src/**, andpackages/loopover-miner/lib/**are instrumented percodecov.yml's own comment), and the.tsx/.mdxpage is outsidecoverage.include;codecov/patchdoes not apply. New generator behavior is still covered by real unit tests regardless.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderatenpm run miner:env-reference:checkpasses for both generated outputsnpm run test:cirun locally from a cleannpm ciinstall, rebased on top of fix(ci): regenerate fumadocs collections unconditionally in validate-code #6375's CI fix, green: 905 test files / 17,310 tests passedSafety
Notes