Skip to content

docs(enterprise): document Windows admin-tier lifecycle script path - #2651

Open
HughChaw (Hughhhhcoder) wants to merge 1 commit into
microsoft:mainfrom
Hughhhhcoder:fix/lifecycle-docs-windows-policy-path
Open

docs(enterprise): document Windows admin-tier lifecycle script path#2651
HughChaw (Hughhhhcoder) wants to merge 1 commit into
microsoft:mainfrom
Hughhhhcoder:fix/lifecycle-docs-windows-policy-path

Conversation

@Hughhhhcoder

Copy link
Copy Markdown

TL;DR

The Lifecycle Scripts doc only referenced the Linux admin-tier policy directory (/etc/apm/policy.d/*.json). This PR adds the Windows path (C:\ProgramData\APM\policy.d\*.json) so Windows fleet admins can find where admin-tier lifecycle scripts live.

Closes #2621.

Problem

_get_policy_scripts_dir() in src/apm_cli/core/lifecycle_scripts.py resolves the admin-tier policy directory per-platform:

def _get_policy_scripts_dir() -> Path:
    system = platform.system()
    if system == "Windows":
        return Path(r"C:\ProgramData\APM\policy.d")
    return Path("/etc/apm/policy.d")

But the docs page only documented the POSIX path, leaving Windows administrators without the correct location.

Approach

Updated every reference to the admin-tier path in docs/src/content/docs/enterprise/lifecycle-scripts.md to mention both platforms:

  • Tier overview paragraph
  • Script file format section
  • Discovery locations table (added a note below the table)
  • Trust model bullet
  • Analytics use-case example

Validation

  • npm ci && npm run build in docs/ — 123 pages built, all internal links valid:
    [build] 123 page(s) built
    [+] Checked 969 relative link(s) across generated pages. No broken relative links found.
    

No code changes; no tests affected.

Copilot AI 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.

Pull request overview

Updates the Enterprise “Lifecycle Scripts” documentation to include the Windows admin-tier policy directory location, aligning the docs with the platform-specific behavior of lifecycle script discovery.

Changes:

  • Documented the Windows admin-tier policy path (C:\ProgramData\APM\policy.d\*.json) alongside the existing Linux/macOS path.
  • Updated the admin-tier path references across the tier overview, file format section, discovery notes, trust model, and analytics example.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Hughhhhcoder

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@Hughhhhcoder
HughChaw (Hughhhhcoder) force-pushed the fix/lifecycle-docs-windows-policy-path branch from f8a053c to ff898ba Compare August 24, 2026 08:47
@Hughhhhcoder

Copy link
Copy Markdown
Author

Updated the branch onto the latest main and resolved the documentation conflict while preserving the current lifecycle-script trust and kill-switch wording.

Validation:

  • uv run --extra dev ruff check src/ tests/ passed
  • uv run --extra dev ruff format --check src/ tests/ passed
  • git diff --check passed
  • The unit suite started successfully but stopped at an unrelated existing environment-sensitive failure in tests/unit/adapters/test_hermes_client_adapter.py::TestHermesConfigPath::test_default_config_path (the test expected /fake/home/.hermes/config.yaml, while the process resolved /Users/davis/.hermes/config.yaml).

@Hughhhhcoder

Copy link
Copy Markdown
Author

The latest pull-request workflow runs are completed with action_required (CI, CodeQL, Deploy Docs, NOTICE Drift Check, and Merge Gate). Could a maintainer approve these workflows for this first-time contributor PR when convenient? This is a workflow-permission gate; the local validation noted above remains clean apart from the unrelated environment-sensitive test.

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.

[BUG] Add Windows admin tier lifeycle script location to documentation

2 participants