Help System errors

Common error signatures

Errors in the help system fall into three main categories:

Where errors originate

The following functions are the most common raise sites. The cause and the likely fix are paired for each:

How to diagnose

  1. Check MaintenanceResult.failed after run_maintenance(). A non-empty failed list means specific features could not be regenerated. Re-run with dry_run=True first to see what check_staleness() reports without making changes.

  2. Call check_staleness() directly to isolate hash mismatches. Compare StalenessReport.stale_features against your expected feature names. If the list is unexpectedly large, get_changed_files(project_root) shows which source files triggered the staleness.

  3. Confirm populate() receives the correct generated_dir. When populate() returns None, call search_by_tag() or list_tags() with the same generated_dir to confirm templates exist there. A result of {} means the directory is wrong or empty.

  4. Validate Feature fields before generation. generate_feature_templates() raises ValueError: Invalid feature name: {...} synchronously. Log feature.name, feature.files, and feature.tags before the call to confirm the Feature dataclass is populated correctly.

  5. Check resolve_topic() when get_workflow_help() returns an empty list. get_workflow_help() relies on resolve_topic(query, manifest) to map a workflow name to a feature. If resolve_topic() returns None, no templates are returned. Pass your workflow_name to resolve_topic() directly and inspect the result.

Source files

Tags: help, templates, docs