Skip to content

feature(oem): Dell OEM hybrid pattern (self-contained scripts)#77

Open
Gumbees wants to merge 3 commits into
mainfrom
feature/oem-dell-self-contained
Open

feature(oem): Dell OEM hybrid pattern (self-contained scripts)#77
Gumbees wants to merge 3 commits into
mainfrom
feature/oem-dell-self-contained

Conversation

@Gumbees

@Gumbees Gumbees commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the now-closed #75 (foundation) and #76 (Dell with src/ structure) with self-contained Dell OEM scripts at the repo root. Single PR against development.

Per the design refinement on #74: the CI fat-script build system (src/ + published/ branch + # %INCLUDE markers + GHA assembly) was overengineered for this repo's scale (~12 scripts that'd benefit from shared helpers, 5 contributors). Self-contained scripts with inlined helpers are the simpler path. ~30-50 lines duplicated across Dell + HP + Lenovo is the accepted trade.

Carried forward from the prior design (the genuinely-good parts):

  • configure naming, not baseline
  • $env:BIOS_* canonical settings with per-OEM translation tables
  • Internet check at install step only (offline-safe exit 0)
  • Per-OEM four-leaf shape: *-configure.ps1 / *-command-update-install.ps1 / *-command-update-run.ps1 / *-debloat.ps1

Dropped: src/ directory, published branch, # %INCLUDE marker syntax, GHA fat-script workflow.

Files added

oem-dell/
├── dell-configure.ps1                  263 lines  (BIOS config from $env:BIOS_* env vars; inlined translation map)
├── dell-command-update-install.ps1     161 lines  (DCU install; internet-checked; inlined Test-InternetAvailable)
├── dell-command-update-run.ps1         146 lines  (DCU /scan + /applyUpdates; documented exit-code table)
└── dell-debloat.ps1                    186 lines  (uninstall SupportAssist + Dell consumer AppX; keeps Command tools)

Each script self-contains the helpers it needs:

  • Test-DellHardware ... inlined into all four leaves.
  • Test-DCUInstalled / Get-DCUVersion / Get-DCUCliPath ... inlined into dell-command-update-install.ps1 and dell-command-update-run.ps1.
  • Test-InternetAvailable ... inlined into dell-command-update-install.ps1 only.
  • $dellBiosSettingsMap translation table ... lives inside dell-configure.ps1 only.

Get-OEMManufacturer is intentionally not used in the Dell leaves ... they each know they're Dell scripts and use the simpler Test-DellHardware check. HP and Lenovo will follow the same pattern.

CLAUDE.md updates

New "OEM Vendor Scripts" section under Development Standards / Common Patterns. Covers:

  • The four-leaf shape and what each leaf does
  • Why configure, not baseline
  • The $env:BIOS_* canonical settings table with per-OEM support matrix (Dell / HP / Lenovo)
  • Internet check pattern (install leaves only)
  • Self-contained guidance with the standard gate sequence

TODOs captured in code

  • dell-command-update-install.ps1 ... canonical Dell-hosted DCU 5.7 installer URL. The placeholder https://dl.dell.com/FOLDER/Dell-Command-Update-Application_WIN_5.7.0_A00.EXE needs the real folder ID captured from a fresh manual download against https://www.dell.com/support/kbdoc/en-us/000177325/dell-command-update. The $env:DCUInstallerURL RMM variable overrides this, so the script ships functional even with the placeholder.
  • dell-configure.ps1 ... map cctk exit codes to friendly messages once we have real-endpoint runs (e.g. 113 = password required).
  • dell-command-update-run.ps1 ... capture any additional DCU exit codes observed in production beyond the documented 0-8 set.

No REPLACE_WITH_REAL_HASH placeholders ... they're gone for good. No runtime lib fetch.

Smoke tests

PowerShell parser check on each script:

OK:   oem-dell\dell-configure.ps1 (263 lines)
OK:   oem-dell\dell-command-update-install.ps1 (161 lines)
OK:   oem-dell\dell-command-update-run.ps1 (146 lines)
OK:   oem-dell\dell-debloat.ps1 (186 lines)

Executed each script in RMM mode on a non-Dell dev workstation (iBUYPOWER). All four hit the "Not a Dell endpoint. Skipping." gate cleanly, started/stopped transcripts to $env:RMMScriptPath\logs\, and exited 0. Confirms:

  • Three-section template structure is intact.
  • $TranscriptStarted guard pattern (PR Fix Stop-Transcript error when transcript not active #34) wraps Stop-Transcript calls properly.
  • RMM mode routing to $env:RMMScriptPath\logs\ works.
  • Manufacturer gate fires before any Dell-specific work.

Full Dell-endpoint testing (cctk invocation, DCU install/run, AppX removal) is pending against real Dell hardware. The TODOs above will be resolved as part of that pass.

References

Test plan

  • Real Dell endpoint, RMM mode: dell-configure.ps1 with $env:BIOS_TPMEnabled=Enabled + correct $env:BIOS_AdminPassword. Verify cctk exit 0 and BIOS reflects the change.
  • Real Dell endpoint, no DCU installed: dell-command-update-install.ps1 with valid $env:DCUInstallerURL. Verify install completes and Get-DCUVersion reports the target.
  • Real Dell endpoint, DCU installed: dell-command-update-run.ps1. Verify /scan then /applyUpdates runs and exits with a documented code.
  • Real Dell endpoint with consumer SKU bloat: dell-debloat.ps1. Verify SupportAssist + AppX removals; verify Dell Command Update and Dell Command Configure are kept.
  • Offline endpoint: dell-command-update-install.ps1. Verify clean exit 0 with offline-skip log line.

Gumbees and others added 3 commits May 11, 2026 13:14
…67)

* improvement(docs): sync CLAUDE.md with DTC canonical change-taxonomy

Replace the deprecated enhancement/ + problem/ two-prefix model with the
canonical four-prefix taxonomy (bug/, refactor/, improvement/, feature/)
and two-tier GitHub labels (type:* + category:*). Mirrors
https://kb.dtctoday.com/books/developer-operations-devops/page/change-taxonomy.

- Rewrite Git Workflow section to reflect main-as-release (this repo has
  no development branch; the prior section described a model that did
  not match the actual repo).
- Add Halo Type / Category / GitHub labels / Branch prefix / Default
  semver mapping table.
- Note BREAKING: PR title override as future-state (no semver yet).
- Add dependabot categorization rule and 'name the branch after the
  change' guidance.
- Mark legacy enhancement/ and problem/ prefixes accepted on existing
  branches; new work uses the four-prefix model.
- Add db-* to the Category Organization list (db-mysql/ exists on disk).

* docs(taxonomy): add Enhancement/Refactor row + clarify Refactor spans both types
* Add NinjaRMM GUID to Halo PSA GUID Sync Script

Syncs DTC Org GUID from NinjaRMM custom fields to DTC Client GUID field in Halo PSA for all matching clients by name.

* Update ninja-halo-guid-sync.ps1

Fix Halo custom field name to CFDtcClientGuid

* Fix NinjaClientSecret placeholder comment typo

* Remove hardcoded credentials — replace with placeholders

Secrets were exposed in script body. Rotated all credentials. Real values stored in NinjaRMM script body (never leaves Ninja) and 1Password. GitHub copy uses placeholders only.

* Update script — use Script Variable injection for secrets

Refactored to inject client secrets via NinjaRMM Script Variables at runtime. Client IDs hardcoded (not secrets). Secrets never stored in repo. Validated working in production.

* Fix: Bring script into compliance with DTC PowerShell engineering standard

Addresses CodeRabbit review concerns on PR #49:
- Add RMM variable declaration block per script-template-powershell.ps1
- Add Start-Transcript/Stop-Transcript with C:\ProgramData\DTC\Logs\ output
- Add $ScriptLogName and $Description audit trail variables
- Replace Write-Host with Write-Information per output stream standard
- Add $ErrorActionPreference = 'Stop' and $ProgressPreference = 'SilentlyContinue'
- Add explicit exit codes (0/1/2 per DTC convention)
- Wrap all work in try/catch/finally per page 3299
Four Dell OEM leaf scripts at the repo root under oem-dell/, each
self-contained with inlined helpers. Replaces closed #75 (foundation)
and #76 (Dell with src/ structure) per the design refinement on #74.

Carried forward from the prior design:
- configure naming, not baseline
- $env:BIOS_* canonical settings with per-OEM translation tables
- internet check at install step only (offline-safe exit 0)
- four-leaf shape per OEM

Dropped: src/ directory, published branch, # %INCLUDE marker syntax,
GHA fat-script workflow.

CLAUDE.md adds an OEM Vendor Scripts section covering the four-leaf
shape, configure vs baseline naming, the canonical $env:BIOS_* table
with Dell/HP/Lenovo support matrix, internet-check pattern, and the
self-contained guidance with the standard gate sequence.

TODOs in code:
- dell-command-update-install.ps1: canonical Dell-hosted DCU 5.7
  installer URL (placeholder URL ships functional via overridable
  $env:DCUInstallerURL).
- dell-configure.ps1: map cctk exit codes once real-endpoint runs
  capture them.
- dell-command-update-run.ps1: capture additional DCU exit codes
  observed in production beyond the documented 0-8 set.

Smoke-tested: PowerShell parser passes on all four; each executed in
RMM mode on a non-Dell dev workstation gates cleanly via
"Not a Dell endpoint. Skipping." with exit 0 and clean transcripts.

Refs #74. Supersedes #75 #76.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Gumbees Gumbees added type:enhancement New work that adds or improves capability (Halo: Enhancement) category:feature Net-new capability the customer/operator didn't have labels May 11, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, push a new commit or reopen this pull request to trigger a review.

@Gumbees Gumbees changed the base branch from development to main June 25, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:feature Net-new capability the customer/operator didn't have type:enhancement New work that adds or improves capability (Halo: Enhancement)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants