Skip to content

[quality] Dakota has zero test coverage β€” gen-filemap.py needs unit testsΒ #810

@kubestellar-hive

Description

@kubestellar-hive
Dakota πŸ¦–  Β·  issue pipeline
─────────────────────────────────────────────────
  β–Ά  filed      report received
  Β·  approved   β€”
  Β·  queued     β€”
  Β·  claimed    β€”
  Β·  done       β€”
─────────────────────────────────────────────────
  report:       missing     Β·  confirms: 0
  area:         β€”         Β·  priority: β€”
  next action:  same bug? ujust confirm 810

---## Finding

The projectbluefin/dakota repository has zero test files and no CI test workflow. The most critical untested code is scripts/gen-filemap.py (193 lines), which generates the filemap.json used by chunkah for file→BST-element mapping.

This script has non-trivial logic:

  • Subprocess calls to bst show for dependency resolution
  • Regex-based parsing of BST output
  • File-to-element mapping with conflict resolution
  • JSON output generation

There is no way to catch regressions in this script without running a full image build.

Recommendation

  1. Add a tests/ directory with pytest-based unit tests for gen-filemap.py
  2. Mock the bst show subprocess calls to test parsing logic in isolation
  3. Add a CI workflow (unit-tests.yml) that runs on PR and push to main
  4. Add a codecov.yml config consistent with other repos (75% target)

Priority

  • Impact: high β€” filemap generation failure breaks the entire image build pipeline
  • Effort: medium β€” script is well-structured and testable with mocks

Filed by quality agent (hold-gated mode)

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageNeeds human review β€” set kind, priority, and area.status/discussingStructured issue flow in progress; not ready for the agent queue yet.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions