gtm-demo-validation-cache-regression-repair
Diagnose and repair GTM demo validation failures caused by legacy cache files missing intermediate chart data, especially in nested digitalmodel demo scripts using --from-cache.
Best use case
gtm-demo-validation-cache-regression-repair is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Diagnose and repair GTM demo validation failures caused by legacy cache files missing intermediate chart data, especially in nested digitalmodel demo scripts using --from-cache.
Teams using gtm-demo-validation-cache-regression-repair should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gtm-demo-validation-cache-regression-repair/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gtm-demo-validation-cache-regression-repair Compares
| Feature / Agent | gtm-demo-validation-cache-regression-repair | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Diagnose and repair GTM demo validation failures caused by legacy cache files missing intermediate chart data, especially in nested digitalmodel demo scripts using --from-cache.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# GTM demo validation cache regression repair Use when `digitalmodel/examples/demos/gtm/tests/test_gtm_demos.py` fails on a `--from-cache` smoke test after a demo script was retrofitted to cache more intermediate chart data. ## Trigger pattern Typical symptom: - `PYTHONPATH=examples/demos/gtm:src uv run pytest examples/demos/gtm/tests/test_gtm_demos.py -q` - one failing demo, often Demo 2 wall thickness - error from cached path like `NameError: PipeDefinition is not defined` Root cause pattern: - the script's cached mode assumes newly added intermediate keys exist in old committed JSON - legacy cache only contains core keys like `metadata/results/summary` - chart builders fall through into engineering-calculation code paths, which require symbols that cached mode never initialized ## Proven workflow 1. Reproduce in the nested repo, not only the outer workspace-hub repo. - `cd /mnt/local-analysis/workspace-hub/digitalmodel` - `PYTHONPATH=examples/demos/gtm:src uv run pytest examples/demos/gtm/tests/test_gtm_demos.py -q` 2. Inspect the failing script and the committed cache JSON together. - confirm which intermediate keys the script now expects - inspect the current results JSON to see whether those keys actually exist 3. Prefer a compatibility fix over forcing cache deletion. - add a helper like `_cache_has_intermediate_data(cached)` - if `--from-cache` loads a legacy JSON without required intermediate keys, log a clear message and fall back to full recalculation - also initialize any constants/imports still needed by downstream chart builders even in cache/regeneration mode 4. Re-run both: - full GTM test suite - targeted failing subset, e.g. `-k wall_thickness` 5. Clean generated artifact churn before committing. - GTM tests can rewrite tracked HTML/JSON outputs - revert unrelated regenerated files with `git checkout -- ...` - commit only the code fix unless output regeneration is intentionally part of the change ## Minimal repair pattern In the script: - define required cache keys - detect whether loaded JSON has them - if not, switch from cache mode to full-calc mode - initialize code-name constants/imported enums for both cache and full modes when chart builders depend on them ## Verification standard Required: - `PYTHONPATH=examples/demos/gtm:src uv run pytest examples/demos/gtm/tests/test_gtm_demos.py -q` passes - targeted regression subset passes - nested repo `git status` is clean except for intended code changes before commit ## Important notes - `digitalmodel` is a nested git repo under `workspace-hub`; status/history/commits must be checked there. - A green GTM pytest suite clears the test-suite blocker for workspace-hub issue tracking, but does not by itself satisfy higher-level GTM approval gates like browser validation or hand checks.
Related Skills
data-validation-reporter
Generate interactive validation reports with quality scoring, missing data analysis, and type checking. Combines Pandas validation, Plotly visualization, and YAML configuration for comprehensive data quality reporting.
plan-gated-issue-validation-workflow
Systematic validation pattern for plan-approved GitHub issues with pre-existing deliverables
multi-repo-sync-diagnosis-repair
Diagnose and repair failed pulls across multi-repo ecosystems with stale locks, submodule conflicts, and untracked files
multi-repo-sync-diagnosis-and-repair
Systematic approach to diagnosing and repairing failures across a multi-repo workspace
blocker-reporting-outcome-validation
Pattern for closing issues where the deliverable is documented blockers rather than feature completion
batch-syntax-repair-from-injection-errors
Detect and fix systematic syntax errors caused by line-injection scripts that split multiline constructs
repair-legacy-llm-wiki-frontmatter-dates
Diagnose and repair legacy llm-wiki source pages that have ingested timestamps but are missing required added/last_updated frontmatter dates.
gtm-demo-workflow-gif-generation
Generate GTM demo GIF assets from validated HTML reports, including both report-scroll GIFs and one higher-fidelity workflow-style GIF, while avoiding Playwright/Python environment traps.
gtm-demo-validation-and-preview-gif-workflow
Validate digitalmodel GTM demos end-to-end, recover from legacy Demo 2 cache regressions, regenerate fresh artifacts, and produce lightweight preview GIFs for issue
github-actions-cross-platform-validation-gotchas
Execution-time GitHub Actions pitfalls discovered while fixing cross-platform CI workflows — path-filter non-triggers, Windows shell parsing mismatches, and job-scoped validation.
diagnose-stale-pycache-import-mismatch
Diagnose Python ImportError cases where a symbol cannot be imported even though the source file already defines it; verify live source, interpreter/venv selection, clear stale __pycache__, and rerun targeted imports/tests.
test-suit-repair-pattern
Systematically fix failing tests in a test suite — root cause analysis, targeted patches, regression verification, and documentation.